Authored by Kevin Cox

Vim Marks for File-Jumping

When I use marks in vim I tend to use them to jump between files as opposed to jumping within a file. So I tweaked the default mark keybindings to suit my use case. The bindings do the following things, simple code tweaks could allow any subset of these to be used.

  • Makes global mark jumps jump to the last location in the file instead of the location of the mark.
  • Swaps lowercase and uppercase.
    • ma marks the current position in the global mark A.
    • 'a jumps to the global mark A.
    • Similarly mA sets file mark a and 'A jumps to the file mark a.
  • Swaps ' and `.
    • 'a jumps to the line and column of a.
    • `a jumps to the start of the line marked by a.
file-marks.vim 485 Bytes
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment