How to show the current column in the statusbar in vim?

Try if setting 'ruler' option is what you are looking for. On my computer at the bottom right shows the line and column where I have the cursor.

:set ruler

EDIT TO COMMENTS:

From the help of vim (command :help ruler):

If the number of characters displayed is different from the number of bytes in the text (e.g., for a TAB or a multi-byte character), both the text column (byte number) and the screen column are shown, separated with a dash.

You can try changing it with rulerformat option, like :set rulerformat=%l,%v


See :help statusline for the many options available.

I have this in my ~/.vimrc in between a bunch of other directives:

set statusline+=col:\ %c,

which outputs

col: 64

in my statusline.

I don't have set ruler.


Another way to do this is to do 'g Ctrl-G', which prints the current position of the cursor in five ways: Column, Line, Word, Character and Byte. (from http://vimdoc.sourceforge.net/htmldoc/editing.html#g_CTRL-G)

Tags:

Vim

Statusbar