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.

I have MacVim on a UK MacBook Pro. I can use the hash on TextMate by typing alt 3 but in vim this does not work. Do you know how I can type a hash using VIM on a UK MacBook Pro?

The problem is happening in any VI/VIM with a Mac with UK keyboard. If I am in insert mode, I type alt + 3 (hash char in a MacBook Pro UK keyboard) VI exists to insert mode.

share|improve this question

migrated from stackoverflow.com Dec 3 '11 at 14:39

This question came from our site for professional and enthusiast programmers.

    
I had this exact problem, threw the stupid US keyboard that came with the Mac in the bin and plugged a Windows keyboard with a £ sign into my Mac. Worked great with vim! ;-) –  Benj Dec 1 '11 at 17:37
1  
Vim in Terminal.app or iTerm2.app or in MacVim? Do you have troubles with {[ and co as well or is it only #? –  romainl Dec 1 '11 at 18:40
    
only with # and {[ are. I do not want to use a Windows keyboard! –  rtacconi Dec 10 '11 at 13:19
    
c'on! Anyone using a mac with vim? –  rtacconi Dec 15 '11 at 9:17

2 Answers 2

cmd + '\'

gets you a '#' when RDPing to Windows from a MBP with Apple UK External Keyboard under Lion, maybe try this for Vim?

share|improve this answer

Alt (aka opt) + .

I found this by looking at Terminal Preferences and going to the Keyboard options. There's a list of keys and actions

share|improve this answer

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.