vimrc (2528B)
1 set runtimepath^=$XDG_CONFIG_HOME/vim 2 set runtimepath+=$XDG_DATA_HOME/vim 3 set runtimepath+=$XDG_CONFIG_HOME/vim/after 4 5 set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim 6 set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after 7 8 let g:netrw_home = $XDG_DATA_HOME."/vim" 9 call mkdir($XDG_DATA_HOME."/vim/spell", 'p') 10 11 set backupdir=$XDG_STATE_HOME/vim/backup | call mkdir(&backupdir, 'p') 12 set directory=$XDG_STATE_HOME/vim/swap | call mkdir(&directory, 'p') 13 set undodir=$XDG_STATE_HOME/vim/undo | call mkdir(&undodir, 'p') 14 set viewdir=$XDG_STATE_HOME/vim/view | call mkdir(&viewdir, 'p') 15 16 if !has('nvim') | set viminfofile=$XDG_STATE_HOME/vim/viminfo | endif 17 18 set nocompatible 19 filetype off 20 21 set rtp+=$XDG_CONFIG_HOME/vim/bundle/Vundle.vim 22 call vundle#begin('$XDG_CONFIG_HOME/vim/bundle') 23 Plugin 'prabirshrestha/async.vim' 24 Plugin 'prabirshrestha/vim-lsp' 25 26 Plugin 'prabirshrestha/asyncomplete.vim' 27 Plugin 'prabirshrestha/asyncomplete-lsp.vim' 28 Plugin 'keremc/asyncomplete-clang.vim' 29 30 Plugin 'sheerun/vim-polyglot' 31 Plugin 'bfrg/vim-cpp-modern' 32 33 Plugin 'vimwiki/vimwiki' 34 35 Plugin 'morhetz/gruvbox' 36 37 call vundle#end() 38 filetype plugin indent on 39 40 " GENERAL SETTING 41 42 " File settings 43 set encoding=utf8 44 set autoread 45 set syntax=on 46 47 " Spelling 48 set spell 49 set spelllang=en_us 50 set spellsuggest=fast,20 51 52 53 " Key remaps 54 let g:mapleader="\<space>" 55 noremap - :w<CR>:TestNearest<CR> 56 57 " Disable arrow keys 58 nnoremap <down> <nop> 59 nnoremap <left> <nop> 60 nnoremap <right> <nop> 61 nnoremap <up> <nop> 62 63 " Editor look and feel 64 set cursorline 65 set history=10000 66 set incsearch 67 set list listchars=tab:\ \ ,trail:. 68 set nowrap 69 70 let &t_ZH="\e[3m" 71 let &t_ZR="\e[23m" 72 73 set t_Co=256 74 let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum" 75 let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum" 76 set termguicolors 77 78 " Search 79 set hlsearch 80 set ignorecase 81 set incsearch 82 set smartcase 83 84 " Tabs and Spaces 85 set tabstop=4 " maximum width of actual tab character 86 set softtabstop=4 87 set shiftwidth=4 " the size of an indent 88 set expandtab " insert spaces instead of a tab character 89 90 " Panes 91 set splitbelow 92 set splitright 93 94 " Set command menu 95 set showcmd 96 set wildmenu 97 set wildmode=full 98 99 " Set line numbers 100 :set number relativenumber 101 :augroup numbertoggle 102 : autocmd! 103 : autocmd BufEnter,FocusGained,InsertLeave * set relativenumber 104 : autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber 105 :augroup END 106 107 highlight Visual ctermfg=yellow ctermbg=gray 108 109 source <sfile>:h/syntax.vim 110 source <sfile>:h/clangd.vim 111 source <sfile>:h/gruvbox.vim 112 source <sfile>:h/hex.vim 113 source <sfile>:h/wiki.vim