On Di, 08 Okt 2013, Sam Roberts wrote:
> I map " to ' (because my fingers always do ", but our coding standards are ').
> imap <buffer> " '
> applying itself to json files.
> I tried to use vim-json, which I quite like for its highlighting and
> syntax checking... but, I don't want to C-v " every time I need a
> double quote.
> " error... in after/ftplugin/json.vim
> iunmap <buffer> "
> I've tried a few variations, including autocommands. I'm a bit baffled.
> *.json? Preferably while still using vim-json?
Don't know about vim-json, but try this autocommand:
au BufRead * if expand("<afile>") !~# ".json" | imap <buffer> " ' | endif
Mit freundlichen Grüßen
Die Welt ist voll von Leuten, die Wasser predigen und Wein trinken.
-- Giovanni Guareschi
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php