0

How do I remap the esc (escape) key on my Mac (Mountain Lion) for Janus (VIM).

What is the command?

And in what file do I insert this code?

AdamT
  • 6,405
  • 10
  • 49
  • 75
  • In the simplest form: `map iWhy?` But... this seems a little dangerous. How would you exit edit mode? You'd have to map another key to do what escape does. Maybe there's something about Janus that makes this more sensible (I've never heard of Janus). – jahroy Mar 04 '13 at 19:48
  • 1
    1. Remove any trace of that Janus crap on your machine. 2. Create an empty `~/.vimrc` file. 3. Populate it with reasonable defaults. 4. Add `inoremap whatever`. – romainl Mar 04 '13 at 20:22
  • I've never heard of Janus sytsems, but one look at their website makes me agree with @romainl - that looks atrocious!!! – jahroy Mar 04 '13 at 20:58
  • @jahroy, "Janus systems"? Not sure how you found that. Janus is found here: https://github.com/carlhuda/janus – AdamT Mar 04 '13 at 21:11
  • @romainl, what defaults do you not like about Janus? – AdamT Mar 04 '13 at 21:12
  • @NewB - Right on. I'm wrong as usual... I had never heard of it, and my googling let me to something called Janus Systems, which was a bunch of .net looking stuff. Apologies. – jahroy Mar 04 '13 at 22:04
  • 1
    Now I see that Janus is just training wheels for Vim, so I'm back to saying it looks lame ;-) – jahroy Mar 04 '13 at 23:04
  • 3
    @NewB, Janus is hard to customize and debug and hides too many Vim features behind plugins, settings and mappings chosen by someone else. If you are serious about learning Vim, get rid of that crap and learn/customize/extend Vim properly with settings/mappings/plugins that *work for you*. Vim is incredibly customizable, using someone else's customization makes no sense. And spend some months with a normal `Esc>` before attempting to remap it. – romainl Mar 05 '13 at 06:31
  • @romainl, "someone else's customization"? this is an opensource project. Customizations were community driven (defaults chosen by communal knowledge). I'd be dismissing all that knowledge by assuming I know better. I'm as new to VIM as anyone who's been using it for a year (so not so new). I've taken the time to use most of the Janus plugins and am happy with them. I've `:help ` already in vim so feel comfy with VIM too. So yes, someone else's defaults are working just fine for me. Only prob, the ESC key, so that's why I'm asking. Janus is opinionated, and I like that opinion, done. – AdamT Mar 05 '13 at 16:38
  • That community is "someone else". If you are comfortable with that "someone else" deciding what mappings you should use, what settings are good for you and what plugins to use or how to organize your setup then by all means keep using Janus. – romainl Mar 05 '13 at 17:56

1 Answers1

1

Remapping Caps-lock to Esc can't be done in Vim itself (or in Janus) because Vim is unable to recognize the Caps-lock key anyway.

You'll need a third party tool for that:

Maybe there are others.

romainl
  • 186,200
  • 21
  • 280
  • 313