I understand to backup my vimrc file but what about my plugins? Will I have to reinstall them if I move to another machine? Or can I just copy paste the directories in my vim folder ( but what if i go from windows to linux) ?
The system vimrc should normally be left unmodified and is located in the $VIM * directory.
You can place Vim plugins in the ~/. vim/pack/vendor/start/plugin_name directory. Note that the plugin_name folder name will vary from plugin to plugin.
The vimrc file contains optional runtime configuration settings to initialize Vim when it starts. On Unix based systems, the file is named .vimrc , while on Windows systems it is named _vimrc . : help vimrc. You can customize Vim by putting suitable commands in your vimrc.
vimrc . If you use a plugin manager like Vundle and keep the list of plugins in ~/. vimrc , then you'll need to source it after changing the list of installed plugins. There's no need to quit and restart!
Generally, it is sufficient to take the vimfiles
/.vim
directory with you. However, in my experience the Linux builds of Vim are much more fussy about plugin line-endings than the Windows ones. Therefore, it is worth checking that all of your plugins and other vim configuration files have Unix line endings so that they work on Windows and Linux without issues.
In my set-up, I have the whole of .vim
under version control: this makes synchronising multiple computers very straightforward. To make this work well, put your _vimrc
into your vimfiles
directory and name it (e.g.) vimrc
. Then in the place where you normally have _vimrc
add a file with this content:
runtime vimrc
Do the same for _gvimrc
if you have one. This means you can keep everything in one folder (plugins and vimrc
) and keep that folder under version control or just synchronise it by some other means if you prefer.
This might help: http://vimcasts.org/episodes/synchronizing-plugins-with-git-submodules-and-pathogen/
In most cases taking the directories with you should do the trick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With