Tuesday, July 18, 2017

set iminsert: why global, not local?

Hi,


Am I missing something, or is it impossible to set iminsert for a specific buffer only, not for Vim globally?

I mean, I have "set keymap=russian-jcukenmac; set iminsert=0", and if I switch to the Russian keymap via <C-^>, it does affect all open buffers. I tried creating a [conditional] shortcut with "setlocal" but with no success, unfortunately.

Help system suggests remapping <ESC> for INSERT mode like this: "inoremap <ESC> <ESC>:set iminsert=0<CR>" but then another problem arises: in terminal Vim, arrows (and probably not only arrows) stop working in INSERT mode (which is kinda obvious, since they do send <ESC> all the way long: Left is ^[[D, Right is ^[[C, etc). Probably, that's somehow related to timeout settings? Mine are "set timeout timeoutlen=3000 ttimeoutlen=100"

Summing up, my question is if it's possible to limit iminsert to a buffer? Would be grateful for any comments :).


Thank you,


--
R

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment