This repository contains three configuration files:
- vimrc
- tmux.conf
- It works fine on 64bit Lubuntu with VIM 7.4.
- It should be OK for other Linux and VIM 7.+.
- Cmake is needed, apt-get install cmake
-
Install
vundle
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
-
Clone
vim.d
git clone https://github.com/tafanfly/vim.d.git ~/workspace/vim.d
-
Create
~/.vimrc
ln -s ~/workspace/vim.d/vimrc ~/.vimrc
-
Open
vim
, execute:BundleInstall
-
Patch
power-line
fontmkdir ~/.fonts git clone https://github.com/powerline/fonts.git ~/.fonts/powerline-fonts cd ~/.fonts/powerline-fonts ./install.sh
-
Install
YouCompleteMe
cd ~/.vim/bundle/YouCompleteMe ./install.sh
-
Open
vim
again, enjoy!
- Update vim.d
cd ~/Workspace/vim.d
git pull
- Open
vim
, execute:BundleClean
- Open
vim
, execute:BundleUpdate
- Copy intersted colorscheme file such as monokai.vim under ~/.vim/bundle/vim-colors-solarized/colors
- Set
colorscheme monokai
in your ~/vimrc file
- Open vim without color
vim ~/.vimrc
add line syntax on
The plugins I used are:
- gmarik/vundle
- altercation/vim-colors-solarized
- ctrlpvim/ctrlp.vim
- tacahiroy/ctrlp-funky
- FelikZ/ctrlp-py-matcher
- scrooloose/nerdtree
- NERD_tree-Project
- scrooloose/nerdcommenter
- plasticboy/vim-markdown
- majutsushi/tagbar
- bling/vim-airline
- tpope/vim-fugitive
- Valloric/YouCompleteMe
- godlygeek/tabular
- scrooloose/syntastic
- digitaltoad/vim-jade
- rking/ag.vim
- mfukar/robotframework-vim
- ntpeters/vim-better-whitespace
- elzr/vim-json
- tpope/vim-surround
- pangloss/vim-javascript
- mxw/vim-jsx
- othree/html5.vim
- airblade/vim-gitgutter
- wavded/vim-stylus
- moll/vim-node
- jiangmiao/auto-pairs
- ekalinin/Dockerfile.vim
- fatih/vim-go
- fcitx.vim
- christoomey/vim-tmux-navigator
-
,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
-
<F5>
execute "make test" in project root
-
<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; see detail inctrlp.vim
plugin -
,;
auto complete
-
,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
vim命令 | 描述 |
---|---|
,e | 打开一个文件 |
Tab | 普通模式下切换文件 |
,m | 注释一行/解注释 |
F12 | 浏览/关闭项目目录 |
Ctrl + v | 普通模式下选择列 |
Shift + v | 普通模式下选择行 |
Ctrl + v/Shift + y + p | 普通模式下选择,然后copy,再paste |
u | 撤销上一步 |
c0 | 修改行开头到当前位置 |
c$ | 修改当前位置到行未 |
0 | 跳到行头 |
$ | 跳到行末 |
^ | 跳到该行第一个字符 |
b | 跳到前一个word |
w | 跳到后一个word |
gg | 跳到文件开头 |
G | 跳到文件末尾 |
{ | 跳到上一个block |
} | 跳到下一个block |
qa
start to record macroa
- execute some steps
q
stop to record@a
execute the macro@@
execute the last executed macro
See in tmux.readme, tmux.config