diff --git a/.vim/vimrc b/.vimrc rename from .vim/vimrc rename to .vimrc index a3d9474a2759f68ff14daecb775060f0288a71be..967a8ed55c6468f41fc4df50663ab7ee399c188c 100644 --- a/.vim/vimrc +++ b/.vimrc @@ -2,6 +2,14 @@ set nocompatible exrc secure filetype plugin on syntax on +call plug#begin() + Plug 'tpope/vim-commentary' + Plug 'ctrlpvim/ctrlp.vim' + Plug 'dense-analysis/ale' + Plug 'airblade/vim-gitgutter' + Plug 'mitjafelicijan/sniper.vim' +call plug#end() + set encoding=utf8 spelllang=en_us laststatus=2 tabstop=4 shiftwidth=4 set number autoindent cursorline ignorecase hlsearch incsearch signcolumn=yes set hidden nowrap nobackup noswapfile noundofile autoread updatetime=100 @@ -13,19 +21,26 @@ set omnifunc=ale#completion#OmniFunc set background=dark colorscheme wildcharm +if executable('rg') + set grepprg=rg\ --vimgrep\ --no-heading\ --smart-case + set grepformat=%f:%l:%c:%m +endif + nnoremap :bnext nnoremap :bprevious nnoremap :copen nnoremap :CtrlPBuffer nnoremap d :bd! nnoremap q :nohlsearch -nnoremap w :silent! grep! \| cwindow \| redraw! +nnoremap w :silent! grep cwindow redraw! nnoremap :ALEHover nnoremap :ALEDetail nmap gr :ALEFindReferences -quickfix:sleep 100m:copen nmap gd :ALEGoToDefinition nmap re :ALERename +nnoremap :ALEPrevious +nnoremap :ALENext imap (ale_complete) let g:ctrlp_use_caching = 0