I am learning to use Vim and I want to have a portable version on my USB to edit my code here everywhere. I knew there are a portable version of Vim, but while i was searchi
Despite all the portable forks and complicated HOWTOs, making plain vim portable is pretty easy, actually I can't imagine it could get easier as you only need single line in config. At least on Windows, but I expect it to work elsewhere as well, let me know if I am wrong.
let $HOME=$VIM
$VIM
variable is relative to the executable and points to parent directory (Z:\vim-portable
in our case).
Let's mix in directory structure and pathogen.
Unpack the zips in vim74
dir:
Create your _vimrc
config file and insert:
" Make vim portable.
let $HOME=$VIM
" Load and run pathogen.
runtime bundle/vim-pathogen/autoload/pathogen.vim
execute pathogen#infect()
git clone pathogen into vimfiles/bundle
dir. You could also just autoload
pathogen, but I like it this way.
And the tree looks like this:
Z:\vim-portable
| _vimrc
|
+---vim74
| | gvim.exe
| | vim.exe
| +---autoload
| +---colors
| +---compiler
| +---doc
| +---ftplugin
| +---indent
| +---keymap
| +---lang
| +---macros
| +---plugin
| +---print
| +---spell
| +---syntax
| +---tools
\---vimfiles
\---bundle
\---vim-pathogen