ARCHIVED: I am gradually moving my personal projects to Fossil.
My own Vim configuration. Some features:
- Foldable and thoroughly commented
vimrc
. - Loads in way less than 50ms.
- Put your customizations into
vimrc_local
. - Move freely between Vim and tmux using
⌥-h/j/k/l
(plugin-free, requires some configuration in tmux, too). - 40-column cheat sheet always two keys away (courtesy of Cheat40).
- Handcrafted, collapsible, fully customizable, "plugin-free" status line (let Vim spend a few tens of microseconds on updating the status line rather than the several milliseconds that plugins “as light as air” need). It used to support Powerline fonts up to commit ca915737, when I decided that simple is better (and Powerline fonts are an ugly hack anyway).
- Uses Zeef, aka wise man's CtrlP.
- Distraction-free mode (courtesy of Goyo and Limelight).
- Etc... (read the cheat sheet and the source!)
- A fairly recent Vim (7.4 or later) (
brew install vim
recommended on macOS).
Recommended:
- Vim 8.
- Exuberant ctags;
- A fuzzy finder, one among fzf (only the executable, not the Vim plugin), fzy, pick, selecta, or skim;
- ripgrep.
cd ~
git clone --depth 1 https://github.com/lifepillar/vimrc.git .vim
cd .vim
chmod 700 ./tmp ./tmp/{backup,swap,undo}
git checkout -b local
# We use shallow submodules; --remote makes sure we are able to check them out:
git submodule update --init --remote
# Commit changes (needed only if there are changes):
git commit -a -m "Git submodule update --remote."
cd ~/.vim
git checkout master
git pull origin master
git submodule sync
git submodule update --init --recursive
git checkout local
git rebase master
…and fix conflicts.
Make sure the repo is in a clean state.
git submodule update --remote --depth 1
git commit -a
git submodule update --recursive # Optional, only if there are plugins with submodules
To add a plugin Foo
from https://repo/foo.git
:
git submodule add --name foo --depth 1 https://repo/foo.git pack/bundle/start/foo
git config -f .gitmodules submodule.foo.shallow true
git add .gitmodules
git commit
To add Foo
as an optional plugin, change start
with opt
(it works if Vim
has packages, otherwise you also have to add the plugin to
g:pathogen_blacklist
).
To add a color scheme, change bundle/start
with bundle/opt
(create the
directory if it does not exist).