cohama / lexima.vim

Auto close parentheses and repeat by dot dot dot...
1.01k stars 46 forks source link

Disable inoremap when b:lexima_disable is not 0 #85

Closed mopp closed 5 years ago

mopp commented 5 years ago

Hi!

What is the change

This PR suppresses lexime.vim creating mapping if b:lexima_disable is not 0.

Why I need this PR

I would like to create buffer local <ESC> mapping of insert mode.

Here is a part of my .vimrc and audocmds of my environment.

let b:lexima_disabled = 1
" It cannot work well because lexime.vim maps <ESC> when InsertEnter.
imap <silent><buffer><nowait> <ESC> <Plug>(denite_filter_quit)
nmap <silent><buffer><nowait> <ESC> <Plug>(denite_filter_quit)

https://github.com/mopp/dotfiles/blob/f0b69aaeca754127f3ffceb53a5407e8ceb8a511/.vimrc#L706-L712

So, lexime.vim overwrites my mapping for denite.nvim.

cohama commented 5 years ago

Thank!