.vimrc

packadd! matchit
filetype plugin indent on
syntax on
set directory=~\vimfiles\swap undofile undodir=~\vimfiles\undo ruler visualbell incsearch ignorecase hlsearch smartcase showmatch autoindent backspace=2 wildmenu
set grepprg=rg.exe\ --vimgrep\ -i
set grepformat=%f:%l:%c:%m
nnoremap <leader>b <Esc>:ls<Cr>:b *
nnoremap <leader>e <Esc>:e *
nnoremap <leader>s <Esc>:split +b *
nnoremap <leader>E <Esc>:e %:h\*
nnoremap <leader>S <Esc>:s %:h\*
nnoremap <leader>w <Esc>:bw
nnoremap <leader>y "+y
vnoremap <leader>y "+y
nnoremap <leader>Y "+Y
nnoremap <leader>p "+p
vnoremap <leader>p "+p
nnoremap <leader>P "+P
nnoremap <BS>      <Esc>:let @/=""<Cr>
nnoremap <C-s>     <Esc>:up<Cr>
inoremap <C-s>     <Esc>:up<Cr>
nnoremap <A-Down>  <Esc>:cnext<Cr>
nnoremap <A-Up>    <Esc>:cprevious<Cr>

rg.exe is part of ripgrep.

Leave a comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.