With Vim, all my configuration is in files, which can be backed up. I have them in a dotfiles repo on Github. As I make tweaks, I regularly pull and push from my various computers and they are always up to date. If I'm on a computer that doesn't have my .vimrc, I'm just a `git pull` away from having it. (Same goes for zsh config, etc.)
The most likely time for me not to have my .vimrc is when sshing into a server, in which case I can use stock vim just fine. If my main editor were a GUI, I wouldn't have it available at all, so I think Vim has a leg up in that, too.
"...become attached to nothing in life that you can't walk away from in 30 seconds if you spot the "Heat" around the corner."
Except I apply this to customised/complicated software rather than "things" in my life.
dropbox-update-dotfiles () {
src="$HOME/Dropbox/dotfiles"
dst="$HOME"
if [[ ! -d "$src" ]]; then
print "Directory $src not found."
fi
for f in "$src"/*~*(.swp|~|.pyc)(D); do
if [[ -h "$dst/${f:t}" ]]; then
# exists as symlink
elif [[ -e "$dst/${f:t}" ]]; then
print "WARNING: ${f:t} exists, but is not a symlink."
else
ln -sv "$f" "$dst"
fi
done
}I link my dot files as well as Documents, Pictures, Music, and Desktop directories that are also normally controlled by OSX. Having those shared across multiple computers is awesome. Sit down at a computer, and it's there.
I also have my zsh files checked in to bitbucket (https://bitbucket.org/tednaleid/shared-zshrc/) so even if the computer doesn't have dropbox (like many of the linux servers I have access to), as long as it has mercurial, I can clone the repo and be ready to go.
cd
hg clone http://bitbucket.org/sjl/dotfiles .dotfiles
ln -s `pwd`/.dotfiles/vim/.vimrc ~/.vimrc
cd -
My full Vim config is now installed, plugins included thanks to Mercurial's subrepos.But really, I don't find myself editing files directly on servers all that often. And when I do I usually prefer bcvi anyway, because I can use MacVim instead of Vim through a terminal (which I hate because of all the shadowed keys).
The power of VIM as an effective and consistent text editor is far more important to me than the power of VIM as a highly configurable editor.
set nocp
set hidden
set ts=2
set sw=2
set autoindent
set incsearch
filetype on
filetype plugin on
map <C-J> <C-W>j
map <C-K> <C-W>k
map <C-l> <C-W>l
map <C-h> <C-W>h
For buffer management, combination of :ls, :b and :b# does the job well enough, compiling command-t plugin isn't necessary :). For listing of files there is :sexplore . For code browsing there is plain old ctags. There you go, almost 90% of environment created. Other things like surround or snipets support would be better. But I don't use them most of the time :).Everything else is gravy for me. While an extended rc is handy and I often store one where I can get to it, if I'm just editing a couple of files, vanilla + the tab size I want and a shortcut to highlighting search terms gets me going. YMMV
I tried to get into emacs, but I kept coming back to vim. Probably because the first editor I really used was a version of 'ed' back when I played MUDs.
" turn off highlighted results (set nohlsearch) when pressing enter.
" just pressing n or N will turn the highlight back again
nnoremap <cr> :noh <cr>
https://github.com/sce/dotfiles wget -qO - bit.ly/newbox | sh
or curl -Ls bit.ly/newbox | sh
and am up and running. No sweat. I keep this stuff in Dropbox too, just in case.Also, why do you symlink your dotfiles into your cloned git repo, rather than just checking out the git repo as ~? Personally, I just move the .git directory from the clone to ~, and then "git checkout -f".
Also due to laziness I don't want to add a bunch of stuff to .gitignore, or add * and then add exceptions. I like having the symlinks.
I try and keep my .vimrc limited to configuration and enhancement and not change how the core works. Things like rebinding builtin actions will never be seen in my .vimrc.
Then I have to ask: what exactly are you doing in that other computer?
If it's just some temporary sysadmin stuff and the like, then you surely can get by with the basic vim functionality.
Now, If you're gonna be using that other computer for a longer period, then why not just add your .vimrc there? With github, bitbucket, dropbox et al you can have your configuration pushed to the other computer in seconds.
I also find that with everybody having laptops these days, the need to use some "other computer" is much less frequent.