Inspect the character under the cursor
ga
Example
Normal mode. Cursor on A.
ACursor on line 1, column 1- ga Character codes · decimal 65, hex 41, octal 101; buffer unchanged
Details & Vim help
Show a character’s numeric value in decimal, hexadecimal, and octal.
Identify a lookalike character or confirm a symbol’s code.
The buffer is unchanged. For Unicode and composing characters, output follows the current encoding; use g8 when you need the UTF-8 bytes.
With the cursor on A, ga reports decimal 65, hexadecimal 41, and octal 101.
Try it in Vim
- Place the cursor on the character.
- Press ga.
- Read the values in Vim’s message area.