Skip to content

Commit

Permalink
refactor(vim): move keymaps together
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillmorozov committed Mar 19, 2024
1 parent 39203d6 commit 38bac4c
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions vim/.vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ set nohlsearch
" Enable incremental searching
set incsearch

" Center search results
nnoremap n nzz
nnoremap N Nzz

" Enable text wrapping
set wrap
Expand Down Expand Up @@ -124,15 +121,17 @@ autocmd BufNewFile,BufRead,BufReadPost Jenkinsfile setfiletype groovy
autocmd FileType yaml setlocal tabstop=2 softtabstop=2 shiftwidth=2 expandtab

" Key mappings
nnoremap <leader>f :find<Space>
nnoremap <leader>b :buffer<Space>
nmap <leader>w <c-w>
vnoremap <leader>y "+y
map <leader>p "+p
map <leader>P "+P
map <leader>p "+p
nmap <leader>/ :grep<Space>
nmap <leader>w <c-w>
nnoremap <leader>b :buffer<Space>
nnoremap <leader>f :find<Space>
nnoremap N Nzz
nnoremap n nzz
vnoremap <leader>y "+y
" Use Ripgrep for search if it's installed
" Use ripgrep for search if it's installed
if executable("rg")
set grepprg=rg\ --vimgrep\ --smart-case\ --follow
endif
Expand Down

0 comments on commit 38bac4c

Please sign in to comment.