They're not actually the same. C-[ is the same as Esc but C-c is not.
Using C-c to leave Insert mode won't trigger InsertLeave.
If you select a vertical visual block and insert a comma at the end of each line E.g. C-v}$A, Using Esc or C-[ to leave insert mode will insert the comma at the end of every line in the paragraph but using C-c will only insert after the first line.
Also if you get used then to using C-c in Vim then you'll potentially run into issues if you try to use it in other Vi places e.g. anything that uses readline or your shell.
IMHO C-[ is a much better solution for these reasons.
:imap <C-c> <Esc>
Remapping caps lock would be good too, but I already have caps lock remapped to Ctrl and I'm just used to that. In anticipation of what seemed like the inevitable loss of my escape key, I've been trying really really hard to like Ctrl-[ the last three weeks, but I've just given up. I keep opening up Ctrl-P searches or hitting Ctrl-]. My pinky just can't do it. So I've given up and made Ctrl-C work and it's so much better.
True but you're still out of luck in other Vi like places.
As an alternative I used Karabina in the past to map Caps lock into Esc (when pressed and released) and Ctrl (when pressed with another key). I think you could also make it latch as Caps lock by using Caps-Shift but I'm not 100% on that.
Does anyone know if Karabina has been updated to work with Siera yet?
I've stayed El Capitan because I couldn't think of anything I found compelling in Sierra. I'll probably reconsider when Karabiner-Elements becomes a suitable replacement.
Agreed. I use set -o vi in bash and of course my little remapping is of no use there.
As an alternative I used Karabina in the past to map Caps lock into Esc (when pressed and released) and Ctrl (when pressed with another key).
This was something else I had suggested to me, but while probably about 50% of my computer use on a daily basis is on OSX, the other 50% is linux; for all of xkb's data-driven flexibility, I'm not sure whether it can do something like this. And I can't afford to build muscle memory for something I can only use on one platform.
That's easy - what @Lio was talking about was having Caps Lock be a tap for <Esc> and then holding it with another key would be <C->. Is that what you're talking about? Karabiner can accomplish this on macOS, but I can't find a gconf/gsetting/xmodmap combination to do this on Linux. Caps Lock as Escape is easy. Caps Lock as Ctrl is easy. Caps Lock as both doesn't seem to be possible on Linux.
Am I wrong? Can you point me toward more info on this? I'd really appreciate it - I would so love to be able to use tap-for-escape in all readline contexts.
The worry about building up muscle memory around something not portable is exactly what lead me to force myself to use C-[ as Escape too.
For vim, you can map tab to being your new esc. Chances are you are using expandtab option, so actual tab usage is not big (it exists though, left here as an exercise for a reader )
Anyway im moving to kabylake dell xps 13. After 9 years with apple. Windows from 2016 gives much better linux integration. And its good to challenge yourselfe with such a big change every 10 years. Its bicycle for your mind (c) Jobs.
Other neat insert mode shortcuts include C-h for Backspace, C-m for Return and indent/outdent with C-t and C-d.
I find Windows 10 to be an enormous improvement over 7 and 8; they finally fixed some of the stupid little things that have been issues since NT 3.1. Like the awful terminal emulator or the dialog box for editing environment variables. It seems like Microsoft is finally being run by someone who cares about details.
I am intrigued; what's your use case that requires so much uppercase text?
Not really relevant, but when Vi was originally developed, the escape key was in a more convenient location — right where the tab key is now. It was never intended for users to have to reach that far to hit such an essential key.
https://en.wikipedia.org/wiki/File%3aKB_Terminal_ADM3A.svg
Edit: also, Control-c and control-[ do the same thing.