0

When i'm working in VIM i'll often times use ctrl+[ to exit insert mode. But if i need to press escape in other parts of the OS ctrl+[ does not act the same way as escape.

For example if search a page in safari you can't escape out of the search with ctrl+[

can anyone shed light why this is and possibly tell if it's possible to get ctrl+[ to always be escape with out custom plugins or weird 3rd party software?

  • 1
    What does Unicode have to do with this? Is that a typo? – Tom Gewecke Feb 17 at 18:27
1

For example if search a page in safari you can't escape out of the search with ctrl+[

It's because Safari is not operating in an ASCII/ANSI Terminal environment.

The Escape character is

  • octal: \033
  • hexadecimal: \x1B or ^[
  • decimal: 27

It's just a series of characters the terminal looks for that interprets it as actions or special characters.

As for working in vim (or vi), you aren't limited to sending ^[ (^ Control[), you can simply press the Escape key. It will do the same thing.

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .