Neovim
{% include JB/setup %}
Compile
macOS
pip install --upgrade pip
pip3 install --upgrade pip
pip -V
pip3 -V
pip install --upgrade neovim
pip3 install --upgrade neovim
gem install neovim
brew tap neovim/neovim
brew update
brew reinstall --HEAD neovim
brew install global
Add these line to ~/.zshrc
alias vi='nvim'
alias vim="nvim"
alias vimdiff="nvim -d"
Configuration
Plugins
Check
run :CheckHealth
Profile
vim --cmd "profile start profile.txt" --cmd "profile file ~/.config/nvim/core/main.vim" +q && vim profile.txt
Tags
Build from LLVM
tar xf libcxx.src.tar.xz
cp -R libcxx/include ~/.config/nvim/tags/libcxx
ctags -f libcxx.tags -R --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ --sort=foldcase -I _NOEXCEPT libcxx
Build from GCC
cp -R gcc/libstdc++-v3/include ~/.config/nvim/tags/libstdcpp
find libstdcpp -type f -print0 | xargs -0 sed -i '' 's/namespace std _GLIBCXX_VISIBILITY(default)/namespace std/g'
ctags -f libstdcpp.tags -R --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ --sort=foldcase -I _GLIBCXX_NOEXCEPT libstdcpp
Build from system or Modified Headers
cp -R /usr/include/c++/$GCC_VERSION ~/.config/nvim/tags/old_libstdcpp
# it is not necessary to rename headers without an extension
# replace the "namespace std _GLIBCXX_VISIBILITY(default)" with "namespace std"
find old_libstdcpp -type f -print0 | xargs -0 sed -i '' 's/namespace std _GLIBCXX_VISIBILITY(default)/namespace std/g'
ctags -f old_libstdcpp.tags -R --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ --sort=foldcase -I _GLIBCXX_NOEXCEPT old_libstdcpp
Generate ctags
Generate CTAGS for libstdc++ Changing All Occurrences in a Folder