Quantcast
Channel: How to validate and reference digraph /special character in Vim? - Vi and Vim Stack Exchange
Viewing all articles
Browse latest Browse all 3

Answer by Vivian De Smedt for How to validate and reference digraph /special character in Vim?

$
0
0

The special character ^[ is actually Esc.

If you want to include it in a regex you can type it using the following key sequence:

Ctrl vEsc

In general in presence of a special character you can discover its code using the ga command. Move the cursor on the character and hit ga.

The output gives you:

  • The decimal code (27 in case of Esc)
  • The hexadecimal code (1b in case of Esc)
  • The digraph if any (EC in case of Esc)

You can use that information to reinsert the same character in insert mode:

  • Ctrl v027
  • Ctrl vx1b
  • Ctrl kEC

Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>