This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Normal Mode, Visual Mode, and Select Mode, | |
" use <Tab> and <Shift-Tab> to indent | |
" @see http://c9s.blogspot.com/2007/10/vim-tips.html | |
nmap <tab> v> | |
nmap <s-tab> v< | |
vmap <tab> >gv | |
vmap <s-tab> <gv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 选中一段文字并全文搜索这段文字 | |
vnoremap * y/<C-R>=escape(@", '\\/.*$^~[]')<CR><CR> | |
vnoremap # y?<C-R>=escape(@", '\\/.*$^~[]')<CR><CR> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inoremap ( <c-r>=OpenPair('(')<CR> | |
inoremap ) <c-r>=ClosePair(')')<CR> | |
inoremap { <c-r>=OpenPair('{')<CR> | |
inoremap } <c-r>=ClosePair('}')<CR> | |
inoremap [ <c-r>=OpenPair('[')<CR> | |
inoremap ] <c-r>=ClosePair(']')<CR> | |
" just for xml document, but need not for now. | |
"inoremap < <c-r>=OpenPair('<')<CR> | |
"inoremap > <c-r>=ClosePair('>')<CR> | |
function! OpenPair(char) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\*\shell\cmdhere] | |
@="Cmd&Here" | |
[HKEY_CLASSES_ROOT\*\shell\cmdhere\command] | |
@="cmd.exe /c start cmd.exe /k pushd \"%L\\..\"" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" @see http://blog.chinaunix.net/u/8681/showart_1226043.html | |
" @usage 50g| jump to 50% of the lines columns. | |
nnoremap <expr> g<Bar> '<Esc>' . float2nr( round( (col('$')-1) * min([100, v:count]) / 100.0)) . '<Bar>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Js_css_compress () | |
let cwd = expand('<afile>:p:h') | |
let nam = expand('<afile>:t:r') | |
let ext = expand('<afile>:e') | |
if -1 == match(nam, "[\._]src$") | |
let minfname = nam.".min.".ext | |
else | |
let minfname = substitute(nam, "[\._\-]src$", "", "g").".".ext | |
endif | |
if ext == 'less' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Output folder: D:\Vim\vim72 | |
Extract: gvim.exe... 100% | |
Extract: install.exe... 100% | |
Extract: uninstal.exe... 100% | |
Extract: vimrun.exe... 100% | |
Extract: xxd.exe... 100% | |
Extract: diff.exe... 100% | |
Extract: vimtutor.bat... 100% | |
Extract: README.txt... 100% | |
Extract: uninstal.txt... 100% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" encoding | |
set encoding=utf-8 | |
set termencoding=utf-8 | |
set fileencoding=utf-8 | |
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1 | |
set langmenu=zh_CN.utf-8 | |
source $VIMRUNTIME/delmenu.vim | |
source $VIMRUNTIME/menu.vim | |
language messages zh_cn.utf-8 |
OlderNewer