1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

update mappings

1. add mapping for gJ
2. remove mappings for <C-H>, since I rarely use them
This commit is contained in:
jdhao 2022-08-10 21:21:38 +08:00
parent 369687b047
commit 0c92d9a018

View File

@ -101,10 +101,6 @@ nnoremap / /\v
" Search in selected region
xnoremap / :<C-U>call feedkeys('/\%>'.(line("'<")-1).'l\%<'.(line("'>")+1)."l")<CR>
" Find and replace (like Sublime Text 3)
nnoremap <C-H> :%s/
xnoremap <C-H> :s/
" Change current working directory locally and print cwd after that,
" see https://vim.fandom.com/wiki/Set_working_directory_to_the_current_file
nnoremap <silent> <leader>cd :<C-U>lcd %:p:h<CR>:pwd<CR>
@ -171,6 +167,7 @@ onoremap <silent> iB :<C-U>call text_obj#Buffer()<CR>
" Do not move my cursor when joining lines.
nnoremap J mzJ`z
nnoremap gJ mzgJ`z
" Break inserted text into smaller undo units.
for ch in [',', '.', '!', '?', ';', ':']