nvim: Add fix last spelling mistake mapping
Added a quick way to fix the last spelling mistake: Use <c-s> while writing (in insert mode) or localleader-s while in normal mode. It will fix the mistake and keep your cursor at the current position.
This commit is contained in:
parent
369345880d
commit
0a867ee992
1 changed files with 6 additions and 5 deletions
|
@ -198,13 +198,14 @@ map.i.nore.silent['@@'] = '<c-g>u<c-o>:CiteRef<cr>'
|
||||||
-- map <leader>cc to insert a complete citation at cursor
|
-- map <leader>cc to insert a complete citation at cursor
|
||||||
|
|
||||||
-- SPELL CHECKING
|
-- SPELL CHECKING
|
||||||
-- Spell check set to <leader>O, 'o' for 'orthography':
|
|
||||||
-- Move to the prev/next spelling error with [S ]S
|
-- Move to the prev/next spelling error with [S ]S
|
||||||
-- Move to the prev/next spelling error or suggestion with [s ]s
|
-- Move to the prev/next spelling error or suggestion with [s ]s
|
||||||
map.n.nore['<leader>ZZ'] = ':setlocal spell! spelllang=en_us,de_de<cr>'
|
map.n.nore['<localleader>ZZ'] = ':setlocal spell! spelllang=en_us,de_de<cr>'
|
||||||
map.n.nore['<leader>ZE'] = ':setlocal spell! spelllang=en_us<cr>'
|
map.n.nore['<localleader>ZE'] = ':setlocal spell! spelllang=en_us<cr>'
|
||||||
map.n.nore['<leader>ZG'] = ':setlocal spell! spelllang=en_us<cr>'
|
map.n.nore['<localleader>ZG'] = ':setlocal spell! spelllang=de_de<cr>'
|
||||||
map.n.nore['<leader>zz'] = '1z='
|
-- undo last spelling mistake from insert and normal mode
|
||||||
|
map.i.nore['<c-s>'] = '<C-G>u<Esc>[s1z=`]a<C-G>u'
|
||||||
|
map.n.nore['<localleader>s'] = 'ms[s1z=`s'
|
||||||
|
|
||||||
-- pp to comPile a document (or file, works for some languages like go/python/c)
|
-- pp to comPile a document (or file, works for some languages like go/python/c)
|
||||||
-- o to open the resulting document (mostly for pdfs)
|
-- o to open the resulting document (mostly for pdfs)
|
||||||
|
|
Loading…
Reference in a new issue