Use Homebrew/Linuxbrew to install and manager software, see Installation.
brew install \
cmake \
curl \
git \
python \
vim
vim-plug is a popular plugin manager designed for vim/neovim.
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
Clone this reposition to any directory, typically $HOME is a good choice to place configurations.
cd $HOME
git clone --depth 1 --branch main https://github.com/vocata/vimrc.git
Make sure you have backed up your own .vimrc file before creating a soft link to vimrc/vimrc.
ln -s vimrc/vimrc $HOME/.vimrc
-
Open vim and enter command mode, then execute :PlugInstall to clone plugins into .vim/plugged.
-
YcmCompleteMe: a code-completion engine for vim
By default, YCM is unavailable, you should install other language completers to enable it, here providing some installation instructions of common-used language completers in my daily coding. For more details, refer to official document.
c/c++
Make sure you have gcc/g++ installed in current environment.
cd ~/.vim/plugged/YouCompleteMe python3 install.py --clangd-completer
golang
Before installing golang completer, golang development tools must be available in current environment.
berw install go
then
cd ~/.vim/plugged/YouCompleteMe python3 install.py --go-completer
rust
Install rust toolchain using homebrew
brew install rust
then
cd ~/.vim/plugged/YouCompleteMe python3 install.py --rust-completer
-
LeaderF: an efficient fuzzy finder
Ripgrep is a powerful command-line search tool, which can be integrated into LeaderF to implement global fuzzy search, here is repgrep installation using homebrew.
brew install ripgrep
-
ALE: asynchronous lint engine
ALE is a lint engine noly providing functionality of linting, you must install specified language linter to enbale it, here are some common language linters and its installation.
python
Use pylint as python linter
brew install pylint
c/c++
Use clang as c/c++ linter
brew install llvm
golang
Use staticcheck as golang linter
brew install staticcheck
rust
Use cargo as rust linter
brew install rust
sh/zsh
Use shellcheck as shell script linter
brew install shellcheck
vim
Use vim-vint as vimscript linter
brew install vint
-
vim-codefmt: a code formatter wrapper
Use black as python formatter
brew install black
Use clang-format as c/c++ formatter
brew install clang-format
Use gofmt as golang formatter
brew install go
Use rustfmt as rust formatter
brew install rustfmt
Use shfmt as shell script formatter
brew install shfmt