Vim Recall繁體中文

Inspect the character under the cursor

ga

Example

Normal mode. Cursor on A.

Before
A
Cursor on line 1, column 1
  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

  1. Place the cursor on the character.
  2. Press ga.
  3. Read the values in Vim’s message area.