User Tools

Site Tools


linux:vim

This is an old revision of the document!


vim

:colorscheme desert

open/close folder

zf/zo

 :%!xxd
 :%!xxd -r

Split

:split filename
:vsplit filename
:new filename
:vnew filename
:only
:wall

move

Ctrl+w:h,j,k,l
Ctrl+w:H,J,K,L
Ctrl+w:w

Reference

vim-pathogen

vimrc

https://raw.github.com/pjq/config/master/.vimrc

curl -Sso ~/.vimrc https://raw.github.com/pjq/config/master/.vimrc

Install:

mkdir -p ~/.vim/autoload ~/.vim/bundle; \
curl -Sso ~/.vim/autoload/pathogen.vim \
    https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim
 

Append to ~/.vimrc

execute pathogen#infect()    

NERDTree

https://github.com/scrooloose/nerdtree

Install:

cd ~/.vim/bundle
git clone https://github.com/scrooloose/nerdtree.git

Keyboard Commands(NERDTree 快捷键辑录:http://yang3wei.github.io/blog/2013/01/29/nerdtree-kuai-jie-jian-ji-lu/)

Type :help NERDTreeMappings to read through all of the default keyboard shortcuts. These are the ones I use the most frequently:

t: Open the selected file in a new tab
i: Open the selected file in a horizontal split window
s: Open the selected file in a vertical split window
I: Toggle hidden files
m: Show the NERD Tree menu
R: Refresh the tree, useful if files change outside of Vim
?: Toggle NERD Tree's quick help
C:change tree root to the selected dir,use "C+t" to open the selected dir in new tab.

gt = next tab
gT = previous tab

Maximum Awesome

http://corner.squareup.com/2013/08/fly-vim-first-class.html

git clone https://github.com/square/maximum-awesome.git && cd maximum-awesome && rake
/var/www/dokuwiki/wiki/data/attic/linux/vim.1381568046.txt.gz · Last modified: 2016/05/05 13:06 (external edit)