How to automatically enter vim with tt and ?

I am using MacVim on Mac OS X.

I want to know how to automatically input <leader>tt and <C-e> and <leader>u when I enter vim first time.

-------------Problems Reply------------

You can use :normal (without the usual !, so that the mappings apply), triggered via the VimEnter command:

:autocmd VimEnter * execute "normal \\tt and \<C-e> and \\u"

To use the <C-e> notation, you have to use double quotes and :execute; as \<Leader> doesn't work, you have to include the actual character (the default backslash must be escaped due to the double quotes).

If those are plugin mappings, there often are alternative custom commands that do the same; I would prefer those then, as it's more obvious than using the mappings.

Category:linux Views:0 Time:2018-04-14
Tags: linux vim macvim

Related post

Copyright (C), All Rights Reserved.

processed in 0.112 (s). 11 q(s)