vimtricks.wiki Concise Vim tricks, one at a time.

How do I jump to the exact column position of a mark?

Answer

`{mark}

Explanation

The backtick command ` followed by a mark name jumps to the exact line and column of that mark, unlike the single-quote ' which only goes to the line.

How it works

  • `a jumps to the exact position (line + column) of mark a
  • 'a jumps to the first non-blank character of mark a's line
  • This distinction matters when you need precise cursor placement

Example

const result = getValue();

You set mark a with the cursor on V in getValue. Later, `a puts the cursor exactly on V, while 'a puts it on c (first non-blank).

Tips

  • `` (two backticks) jumps to the exact position before the last jump
  • '' jumps to the line of the last jump position
  • `[ and `] mark the start/end of the last changed or yanked text
  • `< and `> mark the start/end of the last visual selection

Next

How do you yank a single word into a named register?