Based on http://vimcasts.org/episodes/synchronizing-plugins-with-git-submodules-and-pathogen/
git clone git@github.com:dudarev/dotvim.git ~/.vim
ln -s ~/.vim/vimrc ~/.vimrc
ln -s ~/.vim/gvimrc ~/.gvimrc
ln -s ~/.vim/mvimrc ~/.mvimrc
ln -s ~/.vim/ideavimrc ~/.ideavimrc
cd .vim
git submodule init
git submodule updateln -s ~/.vim/nvim_init.vim ~/.config/nvim/init.vim
ln -s ~/.vim/keymap ~/.config/nvim/keymap
ln -s ~/.vim/mac_appearance.vim ~/.config/nvim/mac_appearance.vim
To install Plug:
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
In nvim: :PlugInstall.
Based on https://github.com/zchee/deoplete-jedi/wiki/Setting-up-Python-for-Neovim
pyenv install 3.13.2 # or latest stable version
pyenv virtualenv 3.13.2 neovim
pyenv activate neovim
pip install neovim
pip install flake8
pip install jedi
pyenv which python # Note the path
ln -s `pyenv which flake8` ~/bin/flake8 # Assumes that $HOME/bin is in $PATH
Make sure that the path is set correctly in ~/.config/nvim/init.vim
let g:python_host_prog = '/full/path/to/neovim/bin/python'
let g:python3_host_prog = '/full/path/to/neovim/bin/python'
Neovim follows the system appearance on its own - no terminal configuration is needed, and it works the same in iTerm2, Ghostty and over ssh.
Two pieces, both at the end of nvim_init.vim (order matters):
mac_appearance.vimsets'background'from macOS. macOS only creates theAppleInterfaceStyledefault in Dark Mode, sodefaults read -g AppleInterfaceStylesucceeding means dark and failing means light. It also re-checks onFocusGained, which is how toggling the system theme with Neovim already open re-themes it on the next click into the window.colorscheme rose-pineis applied after that, so it picks the right variant on the first paint: dawn when light, main when dark.
The cursor shapes are Neovim's defaults - block in normal mode, thin bar in
insert mode - but 'guicursor' also names the Cursor highlight group:
set guicursor=n-v-c-sm:block-Cursor,i-ci-ve:ver25-Cursor,r-cr-o:hor20-CursorThat last part matters. Neovim's stock 'guicursor' names no highlight
group, so the cursor colour is left entirely to the terminal. On this machine
that used to be handled by two iTerm2 settings (Profiles -> Colors):
- Use separate colors for light and dark mode - separate cursor colours per appearance;
- Context-aware cursor color (affects box cursor only) - iTerm2 inverting the box cursor against whatever is behind it. Note the parenthetical: the insert-mode bar cursor is excluded, so it fell through to the literal profile colour.
That works, but it lives in iTerm2's preferences rather than in this repo, it
differs between the profiles here (Default, NeoVim, nvim, tasks do not
agree), and it does not travel. Ghostty with no config gives an invisible
cursor on the light background for exactly this reason.
Naming a highlight group makes Neovim emit OSC 12 and own the colour instead.
CursorContrast() sets Cursor to Normal reversed - cursor background =
text colour - so it contrasts in both variants, and the ColorScheme autocmd
re-applies it whenever 'background' flips.
To let Neovim be authoritative in iTerm2 too, uncheck Context-aware cursor
color in the profile in use (echo $ITERM_PROFILE to see which one that is).
git submodule update --init --recursivegit submodule foreach git pull origin mastergit submodule add http://github.com/tpope/vim-fugitive.git bundle/fugitive
git add .
git commit -m "Install Fugitive.vim bundle as a submodule."- Delete the relevant section from the .gitmodules file.
- Delete the relevant section from .git/config.
- Run git rm --cached path_to_submodule (no trailing slash).
- Commit and delete the now untracked submodule files.