vim:keys: Keep the cursor position when formatting

Quickly formatting multiple paragraphs is now not as simple as before,
but the benefits still prevail.
This commit is contained in:
2023-01-08 13:59:17 +01:00
parent 5dc975c155
commit fed62f3b6d

View File

@@ -200,8 +200,8 @@ inoremap <CR> <C-G>u<CR>
nnoremap gm :Man <C-r><C-a><CR>
xnoremap gm :Man <C-r><C-a><CR>
" Format the current paragraph
nmap Q gqap
" Format the current paragraph, while keeping the cursor position
nmap Q gwap
" Swap movement mappings that act on display lines with the normal ones, making
" it easier to navigate long wrapped lines.