When using curly braces navigation, {, }, to move between paragraph, overwrites the "last jump" mark (the one accessible via ''). I would find it more useful if it left this mark untouched. Is there any way to configure vim like this?

1 Answer 1


I asked the same question over at unix.stackexchange.com where DJMcMayhem prvoided an excellent answer:

You can use the keepjumps command. From :h :keepjumps:

                        *:keepj* *:keepjumps* :keepj[umps] {command}
        Moving around in {command} does not change the |''|,
        |'.| and |'^| marks, the |jumplist| or the
        Useful when making a change or inserting text
        automatically and the user doesn't want to go to this

So in your case, you'd want

nnoremap } :keepjumps normal! }<cr>
nnoremap { :keepjumps normal! {<cr>

Or, if you want it to work for visual mode too (which your probably do):

xnoremap } :<C-u>keepjumps normal! gv}<cr>
xnoremap { :<C-u>keepjumps normal! gv{<cr>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.