Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Following on from my other recent question: How do I map <cmd>-<shift>-f to run Ack plugin in Vim?

Is is possible to use the <cmd> key in Vim at all?

If Vim doesn't recognise the key, is it possible to remap the key outside of Vim (somehow?) to something else and map that key within Vim?

I'm using iTerm 2 on Lion with Vim 7.3.

Thanks!

share|improve this question

1 Answer 1

up vote 6 down vote accepted

<D-> only works in MacVim.

A quick google will return a bunch of hacks and third party solutions. All the solutions I know either work system-wide or are application-specific: if you remap Cmd in iTerm2 only, how are you going to open a new window or a new tab? With… with… the… MOUSE?

I can't imagine a good reason to remap the Cmd key to anything on a Mac. That would be insane.

Vim is not TextMate or whatever other editor you have used before. There is no way to transfer all your old habits seamlessly, point blank.

Instead of wasting your time trying to make Vim and your terminal into something that it's not and can't be you should learn how to use and customize Vim wisely. All your Cmd+Shift+Ctrl+Alt combos won't lead you anywhere. Especially in a terminal where Alt is often problematic and Cmd unusable.

Consider using <leader> (:help leader):

  • it's portable on every platform
  • it's less prone to conflicts with your OS or terminal emulator
  • it opens a lot of easy to remember possibilities
share|improve this answer
    
Haha, thank you grawity, it's much cleaner now. –  romainl Feb 9 '12 at 14:14
    
Thanks for the reply. I had heard of the <leader> but I wasn't sure how it should be used. I agree with your point about portability, this is part of the reason I am moving to Vim. Thanks. –  jordelver Feb 10 '12 at 23:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.