Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

One recommends me to use the following statusline

alt text

However, I am not sure where I need to have the ASCII code and HEX code for each character. I know that ASCII is the character-encoding scheme, while HEX seems to be a 8-bit character-type.

Where do you use ASCII and HEX detections in Vim's statusline?

share|improve this question
Another question: Where do you need the exact position indicator? – Masi Jul 20 '09 at 22:00
ASCII 70 == Decimal 70 == Hexadecimal 46 – Dennis Williamson Jul 21 '09 at 0:19
Some compilers/interpreters give you not only the line number of an error, but the position within the line as well. Also, it can be handy if you're trying to line things up in columns, but the rows are not adjacent making it difficult to do visually. – Dennis Williamson Jul 21 '09 at 0:37
up vote 2 down vote accepted

Hmm, maybe if you try to reverse engineer a file format.
If you have a binary file and you would like to find out what certain pieces mean, it could be useful. Most likely you would better use a hex editor for that.

Another reason could be to find strange encoding errors. For example hyphen-minus (45) and hyphen en-dash (150) look almost identical in many fonts. If you write a program and you accidentally have an en-dash in a formula like i=j-17; you are in trouble. I really have seen this when a colleague pasted his source code from a MS Word file into the editor. Word had converted his minus to an en-dash.

All in all it can be useful in certain circumstances, but it is nothing that I would like to have in my status line all the time.

share|improve this answer
@Ludwig: What do you use in your statusline? – Masi Jul 20 '09 at 21:53
@Masi: I'm afraid it will be disappointing for you, when I say that I leave it at the default. I like it lean and clean;-) – Ludwig Weinzierl Jul 20 '09 at 22:58
@Ludwig: I like it lean and clean too. Hex value of the current character is one of very few elements in default my status line. ;) – Tadeusz A. Kadłubowski Jul 26 '09 at 17:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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