This repository contains five configuration files:
- vimrc
- neovim
- zshrc
- tmux.conf
- fzf-git.zsh
- It works fine on Mac OSX with VIM 8.0+ and Neovim 0.3.7.
- It should be OK for Linux with same version.
# fzf, bat, ripgrep, fd
brew install fzf
brew install bat
brew install ripgrep
brew install fd
-
Clone
vim.d
git clone https://github.com/feiyuw/vim.d.git ~/workspace/vim.d
-
Create
~/.vimrc
ln -s ~/workspace/vim.d/vimrc ~/.vimrc # vim mkdir -p ~/.config/nvim; ln -s ~/workspace/vim.d/nvim/init.vim ~/.config/nvim/init.vim # neovim
-
Open
nvim
, execute:PlugInstall
-
Patch
powerline
fontmkdir ~/.fonts git clone https://github.com/powerline/fonts.git ~/.fonts/powerline-fonts cd ~/.fonts/powerline-fonts ./install.sh
-
Install coc extensions like:
:CocInstall coc-go :CocInstall coc-rls :CocInstall coc-python :CocInstall coc-tsserver :CocInstall coc-json
-
Create
~/.config/nvim/coc-settings.json
ln -s ~/workspace/vim.d/coc-settings.json ~/.config/nvim/coc-settings.json
-
Open
nvim
again, enjoy!
- Update vim.d
cd ~/workspace/vim.d
git pull
- Open
nvim
, execute:PlugClean
- Open
nvim
, execute:PlugUpdate
The plugins I used are:
- tomasr/molokai
- scrooloose/nerdtree
- vim-scripts/NERD_tree-Project
- scrooloose/nerdcommenter
- majutsushi/tagbar
- vim-airline/vim-airline
- vim-airline/vim-airline-themes
- tpope/vim-fugitive
- feiyuw/robotframework-vim
- ntpeters/vim-better-whitespace
- elzr/vim-json
- pangloss/vim-javascript
- mxw/vim-jsx
- leafgarland/typescript-vim
- peitalin/vim-jsx-typescript
- othree/html5.vim
- airblade/vim-gitgutter
- jiangmiao/auto-pairs
- ekalinin/Dockerfile.vim
- christoomey/vim-tmux-navigator
- rust-lang/rust.vim
- neoclide/coc.nvim
- tpope/vim-sleuth
- /usr/local/opt/fzf
- junegunn/fzf.vim
- godlygeek/tabular
- plasticboy/vim-markdown
- mhinz/vim-startify
- jjo/vim-cue
-
,e
open file
-
,s
open file in split window
-
,vs
open file in vertical split window
-
,m
comment/uncomment code
-
,f
open function list of current file, like
Ctrl-R
in sublime -
<F4>
open/close tag bar on the right panel
-
<F12>
open/close project browser on the left panel
-
<Ctrl-Tab>
in
normal
mode, switch files in minibuffer; ininsert
mode, used to select code snippet -
<Ctrl-p>
in
insert
mode, used to open specified file quickly -
<Ctrl-g>
in
insert
mode, used to search content of current project -
<Ctrl-e>
in
insert
mode, used to search content of buffers -
,c
copy to system clipboard
-
,v
paste from system clipboard
- in
normal
mode,<Ctrl-v>
start to select column,<Shift-v>
to select multiple lines - after select several columns,
I
used to add content before cursor columnA
used to add content after cursor columnr
used to modify content under cursorx
used to delete content under cursor
<Ctrl-o>
move to previous edit position<Ctrl-i>
move to forward edit positionb
move to previous word,w
move to next word- try
B
andW
, and see what's the difference
- try
{
move to previous block,}
move to next block0
move to start of the line,$
move to end of the line^
move to first char of the line
gg
move to the start of the file,G
move to the end of the file<Ctrl-]>
jump to the definition of content under cursor, while<Ctrl-t>
jump back
u
undo,<Ctrl-r>
redo.
report last stepdi'
delete content in'
dt'
delete content from current position to'
cw
modify the current wordcaw
modify the current wordc0
modify from start to current positionc$
modify from current position to end of this lineR
update the content until gotESC
qa
start to record macroa
- execute some steps
q
stop to record@a
execute the macro@@
execute the last executed macro
- Try tmux and zsh on iTerm2
ln -s ~/workspace/vim.d/tmux.conf ~/.tmux.conf
# clone tmux plugin manager
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# open tmux
tmux
# Execute <C-b>I
# wait until all plugins installed
# enjoy
# install zsh
brew install zsh
# install oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
ln -s ~/workspace/vim.d/zshrc ~/.zshrc
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
ln -s ~/workspace/vim.d/fzf-git.zsh ~/.oh-my-zsh/custom/fzf-git.zsh
Reopen terminal, and enjoy!