Thursday, March 5, 2015

Re: Like vimrc, but executed last

On 2015-03-05, Paolo Bolzoni wrote:
> Dear list,
>
> I have this line in my .vimrc
>
> inoremap <nl> <esc>
>
> And normally it works fine, I can leave insert mode pressing
> ctrl-enter.
>
> However, I am using quite a bit of plugins when using vim for C++
> editing and somewhere <nl> in normal mode get remapped in
> apparently nothing.
>
> So I was wondering, is there any file like .vimrc that actually
> is executed last?

No, but you can put an autocommand in your ~/.vimrc that uses the
VimEnter event. For example (untested):

au VimEnter * inoremap <nl> <esc>

This may not help, though, if the mapping you are trying to avoid is
executed in a filetype plugin and the file that triggers it is
opened after you have started Vim.

To find where your mapping is being overridden, execute

:verbose map <nl>

Regards,
Gary

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