# HTTPS needs no SSH key - use it on a fresh or contract machine.
git clone https://github.com/dudarev/dotvim.git ~/.vim
# or, once keys are set up: git clone git@github.com:dudarev/dotvim.git ~/.vim
cd ~/.vim
# This repository is public. Before committing, configure a repository-local
# public or GitHub noreply email so a work identity never enters its history.
# For example: git config --local user.email YOUR_PUBLIC_OR_NOREPLY_EMAILmkdir -p ~/.config/nvim
ln -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.vimTo 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.
Personal paths and machine-specific settings belong in ~/.vim/local.vim.
That file is loaded automatically by both configurations and ignored by Git.
For example, keep Python provider paths there rather than editing the tracked
nvim_init.vim:
if has('nvim')
let g:python_host_prog = '/full/path/to/neovim/bin/python'
let g:python3_host_prog = '/full/path/to/neovim/bin/python'
endifBased 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 $PATHln -s ~/.vim/ideavimrc ~/.ideavimrcThis lineage uses pathogen and the bundle/ submodules. It is intentionally
inactive in the normal Neovim setup; initialize it only when explicitly using
plain Vim or MacVim.
Based on http://vimcasts.org/episodes/synchronizing-plugins-with-git-submodules-and-pathogen/
ln -s ~/.vim/vimrc ~/.vimrc
ln -s ~/.vim/mvimrc ~/.mvimrc
git submodule update --init --recursiveOn macOS, Neovim follows the host's system appearance without depending on a
terminal profile's light/dark colours. This works in terminals such as iTerm2
and Ghostty. When Neovim runs on a non-macOS host, including Linux over SSH,
mac_appearance.vim is skipped; it cannot inherit the client Mac's appearance.
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 match Neovim's defaults - block in normal and terminal modes,
thin bar in insert mode - but 'guicursor' also names the Cursor highlight
group in every entry:
set guicursor=n-v-c-sm:block-Cursor,i-ci-ve:ver25-Cursor,r-cr-o:hor20-Cursor,t:block-blinkon500-blinkoff500-CursorNeovim's default normal/insert entries name no highlight group, while its stock
terminal-mode entry uses TermCursor. Assigning 'guicursor' replaces that
whole default, so this configuration explicitly assigns Cursor to every mode;
otherwise the omitted modes fall back to the terminal profile's cursor colour.
In the TUI, naming a highlight group lets Neovim request the cursor colour from
compatible terminals. 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.
No custom terminal colour is required. If iTerm2's Context-aware cursor color is already enabled and overrides the requested box cursor, disable that setting in the active profile.
These commands apply only to the inactive plain-Vim/pathogen lineage.
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.