2007年5月5日星期六
2007年5月3日星期四
vim useful tips
1. indent one line or many line(insert tab), just choose them in visual mode then use '>' or '<'-- one tab, '2<' or '3>' means more tabs.
2. merge two lines, there is one key--'J', this guy can help u.
3. type ':split filename' or ':vsplit filename', u can split the window horizontally or vertically. Using short key
'ctrl+w' to switch between windows.
4. ':qa' or ':qall' help u quit all windows, u can use ':x' to quit.
2. merge two lines, there is one key--'J', this guy can help u.
3. type ':split filename' or ':vsplit filename', u can split the window horizontally or vertically. Using short key
'ctrl+w' to switch between windows.
4. ':qa' or ':qall' help u quit all windows, u can use ':x' to quit.
My .vimrc
".vimrc
"Using Vim settings. rather than Vi settings(much better!)
set nocompatible
"Switching syntax highlighting on, when the terminal has colors
"Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
set tabstop=4
set shiftwidth=4
set splitbelow
"Show matching brackets
set showmatch
"set matchtime=1
set nu
set autoindent
set bs=2
filetype indent on
"set smartindent
set cindent
" Use mouse everwhere
set mouse=a
"Very usefull for paste codes from outside.
"This guy seems to be not compatiable with 'cindent', cause when I set this
"vim cann't indent, oops!
"set paste
"For ctags -R CTRL+]=go CTLR+o=back
set tags=tags;
set tr
set nowrapscan
set showmode
"set uc=0
"set t_kD=^?
"map ^H X
"map \e[3~ x
"set mousehide
set incsearch
set ruler " show the cursor position all the time
"set cmdheight=2
set ls=2 " A white bar, the ruler, appeated, on top of cmd win.
"set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ASCII=\%03.3b]\ [HEX=\%02.2B]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
set statusline=%<%f%h%m%r%=%l,%c\ \ \ \ %P\ \ [%{strftime('%H:%M')}]
set showcmd " display incomplete commands
"Using Vim settings. rather than Vi settings(much better!)
set nocompatible
"Switching syntax highlighting on, when the terminal has colors
"Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
set tabstop=4
set shiftwidth=4
set splitbelow
"Show matching brackets
set showmatch
"set matchtime=1
set nu
set autoindent
set bs=2
filetype indent on
"set smartindent
set cindent
" Use mouse everwhere
set mouse=a
"Very usefull for paste codes from outside.
"This guy seems to be not compatiable with 'cindent', cause when I set this
"vim cann't indent, oops!
"set paste
"For ctags -R CTRL+]=go CTLR+o=back
set tags=tags;
set tr
set nowrapscan
set showmode
"set uc=0
"set t_kD=^?
"map ^H X
"map \e[3~ x
"set mousehide
set incsearch
set ruler " show the cursor position all the time
"set cmdheight=2
set ls=2 " A white bar, the ruler, appeated, on top of cmd win.
"set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ASCII=\%03.3b]\ [HEX=\%02.2B]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
set statusline=%<%f%h%m%r%=%l,%c\ \ \ \ %P\ \ [%{strftime('%H:%M')}]
set showcmd " display incomplete commands
订阅:
评论 (Atom)