- 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 ~
Open nvim and run :PlugInstall
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
To map capslock to ctrl, add this to .bashrc
#linux
setxkbmap -layout us -option ctrl:nocaps
brew install cppcheck
brew install clang-format
brew install go
In vim, type
:GoInstallBinaries
npm install eslint --save-dev
eslint --init
npm install prettier-eslint --save-dev
For ruby linting, make sure rubocop is on your path.
brew install yamllint
'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
']q' next item in quickfix
'[q' prev item in quickfix
'\o' toggle between source and header file
'\os' toggle and open in a split
'\ov' toggle and open in a vertical split
'\ot' toggle and open in a tab
'\be' open buffer explorer (normal)
'\bs' open buffer explorer (horiz split)
'\bv' open buffer explorer (vert split)
'\bf' buffer forward
'\bb' buffer back
'\bn' buffer next
'\bp' buffer previous
'\bc' buffer close - deletes buffer w/o closing window
'\bd' buffer delete - same as above
'\buf' same as :buf commands below.
':buf file' autocomplete filename with <Tab>
':buf + n' where n is the buffer number
'Ctrl-W H' Moves the cursor to the left window
'Ctrl-W J' Moves the cursor to the window below
'Ctrl-W K' Moves the cursor to the window upper
'Ctrl-W L' Moves the cursor to the right window
'Ctrl-W V' Opens a new vertical split
'Ctrl-W S' Opens a new horizontal split
'Ctrl-W C' Closes a window
'Ctrl-W O' Makes the current window the only one on screen and closes other windows
'Ctrl-W V' Opens a new vertical split
'Ctrl-W S' Opens a new horizontal split
'Ctrl-W C' Closes a window
'Ctrl-W O' Makes the current window the only one on screen and closes other windows
':vsplit filename' Split window vertically
':split filename' Split window horizontally
':new filename' Create new window
'\n' toggle nerdtree
'\tt' Toggle Tagbar
'\fb' fuzzy find buffers
'\fc' fuzzy find git commits
'\ff' fuzzy find files
'\fl' fuzzy find lines
'\ft' fuzzy find tags
# fzf search syntax
foo Fuzzy match (default)
^foo Starts with 'foo'
bar$ Ends with 'bar'
'baz Must Include the term 'baz'
'baz' Matches 'baz' at word boundary
foo|bar Logical OR operator. Matches 'foo' or 'bar'
!baz Inverse exact match. Items that do not include 'baz'
!^foo Inverse starts with. Items that do not start with 'foo'
!bar$ Inverse ends with. Items that do not end with 'bar'
':Rg' <string|pattern>
':RgRoot' show root search dir
'/fr' Prompts for Find/Replace text then does a ripgrep search followed by 'cfdo %s/<find>/<replace>/gc | update'
'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
'\vv' Insert
'\vb' Back
'\vs' Show available snippets based on previous text
':PrettyPrintJSON' Prettify JSON
':PrettyJSON' Alias to above
':PrettyJson' Alias to above
':FormatJSON' Alias to above
':FormatJson' Alias to above
# Motions
']m' next function start
'[m' previous function start
']M' next function end
'[M' previous function end
']]' next class/module start (class in Ruby, type/interface in Go, class in JS, struct in C)
'[[' previous class/module start
'][' next class/module end
'[]' previous class/module end
# Text Objects
'vaf' around function
'vif' inside function
'vac' around class/module (Ruby: class/module; Go: type; JS: class; C: struct/union)
'vic' inside class/module
'vab' around block ({ ... } or do/end in Ruby)
'vib' inside block
'vap' around parameter list
'vip' inside parameter list
'vas' around statement (if, for, return, etc.)
'vis' inside statement
# Incremental Selection
'gnn' start Treesitter selection at cursor
'grn' expand to next node
'grc' expand to outer scope (function/class/module)
'grm' shrink selection
- ale
- a.vim
- bclose
- bufexplorer
- CamelCaseMotion
- fzf.vim
- indentline
- lightline
- nerdtree
- nvim-treesitter
- nvim-treesitter-textobjects
- tagbar
- vim-bookmarks
- vim-commentary
- vimcompletesme
- vim-fugitive
- vim-go
- vim-gutentags
- vim-javascript
- vim-obsession
- vim-oscyank
- vim-rails
- vim-rhubarb
- vim-ripgrep
- vim-snipmate
- vim-solarized8