- neovim
- Homebrew or Linuxbrew
use vim-plug for installing plugins and runtime files.
mkdir -p ~/.vim/autoload ~/.vim/backup ~/.vim/bundle ~/.vim/colors
cp -r ./vim/ ~/.vim/
cp -r ./config/ ~/.config/
cp .vimrc ~
cp .ctags ~
for system clipboard access on macos
brew install reattach-to-user-namespace
Open nvim and run :PlugInstall
Ale is an asynchronous linting engine.
Install eslint in your local project (or globally) and setup a default eslint config for ale to use
npm install eslint --save-dev
eslint --init
it also supports prettier!
Install prettier-eslint in your project (or globally)
npm install prettier-eslint --save-dev
For ruby linting, make sure rubocop is on your path.
For yaml linting, you need to install yamlint
brew install yamllint
fzf is a command-line fuzzy finder. It is a replacement for ctrl+p.
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
use ripgrep for searching since it supports ignoring directories like 'node_modules'
brew install ripgrep
or see ripgrep installation
then add the following to ~/.fzf.bash or ~/.fzf.zsh
# set fzf source to ripgrep and ignore some dirs
# see https://github.com/junegunn/fzf#respecting-gitignore
export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow -g "!{.git,node_modules,coverage}/*" 2> /dev/null'
#macos
brew install universal-ctags
#linux
sudo apt install universal-ctags
brew install go
In vim, type
:GoInstallBinaries
To map capslock to ctrl, add this to .bashrc
#linux
setxkbmap -layout us -option ctrl:nocaps
'jj' leave insert mode (same as esc)
'v' leave visual mode
'esc+esc' no highlight
'\s' save
'ctrl+d' scroll down
'ctrl+u' scroll up
\rtw remove trailing whitespace
\rts remove trailing whitespace
\cp copy the file path of the current buffer to the clipboard
'\be' open buffer explorer (normal)
'\bs' open buffer explorer (horiz split)
'\bv' open buffer explorer (vert split)
'\bf' buffer forward
'\bb' buffer backwards
'\bc' buffer close
'\n' toggle nerdtree
'\ff' fuzzy find files
'\fc' fuzzy find git commits
':Rg' <string|pattern>
':RgRoot' show root search dir
'mm' Add/remove bookmark at current line
'mi' Add/edit/remove annotation at current line
'mn' Jump to next bookmark in buffer
'mp' Jump to previous bookmark in buffer
'ma' Show all bookmarks (toggle)
'mc' Clear bookmarks in current buffer only
'mx' Clear bookmarks in all buffers
'\ss' Start a session
'\sr' Restore a session
'\sp' Pause a session
'\sx' Destroy a session
:PrettyPrintJSON Prettify JSON
:PrettyJSON Alias to above
:PrettyJson Alias to above
:FormatJSON Alias to above
:FormatJson Alias to above