diff options
| author | jdhao <jdhao@hotmail.com> | 2021-08-02 23:46:00 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2021-08-02 23:46:00 +0800 |
| commit | be8c917beb3d139f2b907662e9ba4e9dced6386b (patch) | |
| tree | 438d74e14fa3246f7387f5b077bf9b476c3bde3b /core/mappings.vim | |
| parent | 5acfa519df9f7ea58f81035559b99a4a3e04aa16 (diff) | |
Add more mappings
Credit: https://www.youtube.com/watch?v=hSHATqh8svM
Diffstat (limited to 'core/mappings.vim')
| -rw-r--r-- | core/mappings.vim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/mappings.vim b/core/mappings.vim index b8424e4..a7712df 100644 --- a/core/mappings.vim +++ b/core/mappings.vim @@ -180,4 +180,12 @@ onoremap <silent> iu :<C-U>call text_obj#URL()<CR> " Text objects for entire buffer xnoremap <silent> iB :<C-U>call text_obj#Buffer()<CR> onoremap <silent> iB :<C-U>call text_obj#Buffer()<CR> + +" Do not move my cursor when joining lines. +nnoremap J mzJ`z + +" Break inserted text into smaller undo units. +for ch in [',', '.', '!', '?', ';', ':'] + execute printf('inoremap %s %s<C-g>u', ch, ch) +endfor "} |
