When are plugins loaded by vimrc or after?

When are plugins loaded by vimrc or after?

Some answers seem to suggest that vimrc is loaded before plugins, while others suggest that they are loaded during the sourcing of vimrc, at the line filetype plugin indent on. All plugins are sourced (the correct term) after your vimrc unless you source them manually. The filetype plugin indent on line doesn’t change anything to that order.

How to reference / source a custom.vimrc file?

If so, you can get your initial USER with: By placing your customized root .vimrc in /root/.vimrc.$USRNAME you can keep a reasonably secure customized vimrc file. You can do other things too, but I leave that to your imagination.

Can a.vimrc file execute arbitrary commands?

Keep in mind that .vimrc can execute arbitrary commands, if you use /home/user/.vimrc you may be creating a security issue (e.g., someone manages to compromise your user account, changes your .vimrc, and then gets root the next time you edit a file as root). You can, of course, keep a known-safe copy in ~root/ somewhere.

Is there a way to avoid pass-U on Vim?

You can use the MYVIMRC environment variable. This way, you won’t have to pass -u each time you fire up vim. (You can of course do an alias instead, but that won’t help with e.g., vipw)

Where do I find plugin list in Vim?

This lists the path of all plugins loaded when a file is opened with Vim. If you use Vundle, :PluginList. Lists local plugins added. If you use vim-plug (Plug), ” A minimalist Vim plugin manager.”:

Where do I keep my configuration files in Vim?

The best place to keep your configuration stuff is in your .vimrc file. However, it’s sourced too early, check :h startup: At startup, Vim checks environment variables and files and sets values accordingly. Vim proceeds in this order: 1.

How to run a command immediately when starting Vim?

*VimEnter* VimEnter After doing all the startup stuff, including loading .vimrc files, executing the “-c cmd” arguments, creating all windows and loading the buffers in them. Then, just place this line in your .vimrc: autocmd VimEnter * FindFileCache .