Tao He

Tao He

  • Docs
  • API
  • Help
  • Blog

›Recent Posts

Recent Posts

  • Microsoft PowerPoint
  • Chrome
  • Alfred
  • Docusaurus
  • Git Commands

Neovim

April 22, 2015

{% 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

Navim

Plugins

lightline-buffer

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

Building libc++

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

Recent Posts
  • Compile
    • macOS
  • Configuration
  • Plugins
  • Check
  • Profile
  • Tags
Tao He
Docs
Getting Started (or other categories)Guides (or other categories)API Reference (or other categories)
Community
User ShowcaseStack OverflowProject ChatTwitter
More
BlogGitHubStar
Facebook Open Source
Copyright © 2019 Your Name or Your Company Name