What's the difference between virtual column number and column number (%v and %c respectively) in the statusline?

Is it like virtualedit, where the virtual column number counts the position of the cursor even if you're in a column that doesn't exist?

I searched in the statusline help doc to see if the virtual column number was ever mentioned again, and it isn't.


1 Answer 1

  • %c -- column number, i.e. byte number.
  • %v and %V -- virtual column number, i.e. column number on your screen.

So what is the difference between the actual and virtual column number? The answer is, that when using tabs, the virtual column number is an approximation of your current column number as if you were using spaces instead of tabs.

*This answer is an excerpt from Hugo Ideler' answer at stackoverflow

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.