Avoiding special characters instead of meta-key combinations for VIM on OS X

In OS X, in any program, when I type option-p , I get Ο€ , option-p I get ∏ and there is a bunch of alt / option bindings that just return Greek and other special characters.

Is there any way to disable this?

I am currently using the Auto Pairs VIM plugin and it has the following default mappings:

 <Mp> : Toggle Autopairs (g:AutoPairsShortcutToggle) <Me> : Fast Wrap (g:AutoPairsShortcutFastWrap) <Mn> : Jump to next closed pair (g:AutoPairsShortcutJump) <Mb> : BackInsert (g:AutoPairsShortcutBackInsert) 

I can't seem to use these and other meta-key based VIM mappings while this special input is on.

EDIT

From this cnet article , I actually need to know how to disable this special input shown at the bottom of the page.

+8
vim macvim osx-lion osx-mountain-lion macos
source share
2 answers

Use the macmeta parameter macmeta :set macmeta

From :help 'macmeta'

'macmeta' Use the (alt) option as a meta key. When enabled, option keystrokes are not interpreted, which allows you to bind to <M-.. >. When turned off, keys with optional keys are interpreted by the selected input method and inserted as text.

Obviously this setting is for MacVim only.

In Terminal.app Settings there is the option β€œUse the option as a meta key” on the β€œKeyboard” tab, which is disabled, for example. Option-p print Ο€. You may need to launch a new terminal window to see the effect. But for some reason, even after disabling it, I had problems setting up mappings for <Mp> , but mappings using Ctrl-v and inserting a literal do literally work.

+13
source share

Well, it looks like with MacVim, in my .vimrc, I can just match these special characters, and it will work in both the GUI and Terminal.

Since they are generated by the corresponding combinations of meta keys, it will look just like the display of meta keys.

EDIT

Some special characters are accents, and this may not work for them.

I did this on my .vimrc :

 if has("gui_macvim") let g:AutoPairsShortcutToggle = 'Ο€' " <mp> let g:AutoPairsShortcutFastWrap = 'βˆ‘' " <mw> let g:AutoPairsShortcutJump = 'βˆ†' " <mj> let g:AutoPairsShortcutBackInsert = '∫' " <mb> endif 

has("gui_macvim") runs both in the GUI and in the terminal when MacVim starts.

+3
source share

All Articles