My own (Neo)Vim configuration which focuses on JS(React, Vue, stage-0, TS, Flow), CSS(and styled-components), GraphQL and GO, however also works with C# and Python. Configuration is based on Tmux, iTerm2, OSX but I also use it on Ubuntu. I use Alt and CMD for some key mappings, so it's more suitable for Mac+iTerm.
- Have (Neo)Vim and Git installed ofcourse
- Tmux (plugins: https://github.com/sourcesoft/my-long-list/blob/master/.tmux.conf)
- If using OSX:
brew install reattach-to-user-namespace
- Rainbarf (https://github.com/creaktive/rainbarf)
- Oh My ZSH (https://github.com/robbyrussell/oh-my-zsh)
- If you're running OSX install iTerm and Dash.app (https://kapeli.com/dash)
- GO (https://golang.org/doc/install)
- The Silver Searcher (https://github.com/ggreer/the_silver_searcher)
- Free
Inconsolata
font
- Backup the old one first:
mv ~/.vimrc ~/.vimrc.bak
- Replace it:
wget -O ~/.vimrc https://raw.githubusercontent.com/sourcesoft/my-long-list/master/.vimrc
- NeoVim uses XDG configuration:
ln -s ~/.vimrc ~/.config/nvim/init.vim
- Vim uses old
.vimrc
location so there's no need to create symlink. - Copy other config files in the repository like
.bash_profile
,.gitconfig
,.tern-config
,.tmux.conf
,.zshrc
,.eslintrc.js
,prettierrc
,.gitignore
,.prettierignore
and configure more if feel comfortable.
- Before opening (Neo)Vim:
- Install necessary global node packages by running
npm install -g typescript neovim
- Install global node packages for eslint
npm i -g eslint eslint-config-airbnb eslint-config-airbnb-base eslint-config-prettier eslint-plugin-import eslint-plugin-prettier prettier eslint-import-resolver-webpack eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-redux-saga redux-saga webpack babel-eslint
or install them in the project directory as a dev dependency. - Open tmux running
tmux
and install tmux plugins withPrefix + I
- Install vim-plug: https://github.com/junegunn/vim-plug
- Download and install
Knack Nerd Font
from here and configure iTerm2 to use it. - Install plugins by running
vim +PlugInstall +qall
ornvim +PlugInstall +qall
in terminal
- Open (Neo)Vim and:
- Run
:UpdateRemotePlugins
in vim at the end. - Open NeoVim(Vim) and run :GoInstallBinaries and then :TmuxLine
- Learn key bindings by reading this file
It's much easier to use right CMD or Alt instead of reaching out escape. I also use Caps Lock for Control, since it's closer and easier to hit.
- Escape -> Right CMD or Right Alt
- Control -> Caps Lock
Tools to setup the key bindings:
- OSX: Use Karabiner to map
- Ubuntu: Install xcape (https://github.com/alols/xcape)
- Use the following command:
xcape -e 'Alt_R=Escape;ISO_Level3_Shift=Escape'
- Use the following command:
- cmd-o: 0x01 0x29 --- tmux next session
- cmd-i: 0x01 0x28 --- tmux previous session
- cmd-j: 0x2C 0x73 0x6A --- vim jump page down
- cmd-k: 0x2C 0x73 0x6B --- vim jump page up
- cmd-m: 0x2C 0x6D --- vim quickfix previous
- cmd-n: 0x2C 0x6E --- vim quickfix next
- cmd-n: 0x2C 0x71 --- vim quickfix toggle
- cmd-p: 0x2C 0x70 --- vim run tmux command
- cmd-r: 0x2C 0x72 --- vim run last tmux command
- cmd-f: 0x2C 0x66 --- vim toggle fullscreen
- cmd-;: 0x2C 0x3B --- list buffers
- cmd-a: 0x2C 0x61 --- search current buffer subdirectory
- cmd-s: 0x2C 0x73 0x73 --- run ALEFix
- ctrl-space: 0x2C 0x76 --- lookup Dash.app docs
- https://github.com/neovim/neovim/wiki/FAQ#how-can-i-change-the-cursor-shape-in-the-terminal
- https://github.com/neovim/neovim/wiki/FAQ#my-ctrl-h-mapping-doesnt-work
- neovim/neovim#2048
- http://stackoverflow.com/questions/6778961
- http://stackoverflow.com/questions/39645253
- http://www.nthelp.com/ascii.htm
- http://superuser.com/questions/259614
- NeoVim / vimrc / ag - Can't live without ya'll, not even a day.
- iTerm2 / zsh / tmux - Performant terminal and shell everywhere.
- SourceTree - I can't remember all those weird hard to memorize git commands, so this is my GUI.
- Transmit - I'm using it for what it is and It's got everything I want.
- Paw - Advanced REST client for testing my backend
- Little Snitch - Sometimes I need to monitor I/O of an application I'm developing.
- Charles - Monitoring using all the tools even the ones I have no idea what they are.
- Fritzing - Easily design electronic circuits for Arduino in no time.
- OsmondCocoa - Sometimes I need to build a ready to print for some home-made circuits.