Wikia

Vim Tips Wiki

Watchlist Recent changes

Showing the ASCII value of the current character

Redirected from VimTip67

Tip 67 Printable Monobook Previous Next

created May 7, 2001 · complexity intermediate · author Erhan · version 5.7


You can learn the ASCII or Unicode value of the character under the cursor by pressing ga in command mode or :as / :ascii on the command line . This displays the value of the current character in decimal, hex and octal. (Think "get ascii.")

Seeing ASCII/Unicode values in the status lineEdit

You can also add options to the statusline option to show the ASCII/Unicode value of the character under the cursor.

:set statusline=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P

It's the %b\ 0x%B that does the trick. Note that you may need to :set laststatus=2 so that the status line is visible in with only one window showing.

ReferencesEdit

CommentsEdit

Pages on Vim Tips Wiki

Add a Page
1,601pages on
this wiki

Latest Photos

Add a Photo
66photos on this wiki
See more >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki