亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb

首頁 > 學院 > 操作系統 > 正文

超過130個你需要了解的vim命令

2024-06-28 13:27:48
字體:
來源:轉載
供稿:網友
超過130個你需要了解的vim命令基礎
:e filenameOpen filename for edition
:wSave file
:qExit Vim
:q!Quit without saving
:xWrite file (if changes has been made) and exit
:sav filenameSaves file as filename
.Repeats the last change made in normal mode
5.Repeats 5 times the last change made in normal mode
 在文件中移動

k or Up Arrowmove the cursor up one line
j or Down Arrowmove the cursor down one line
emove the cursor to the end of the Word
bmove the cursor to the begining of the word
0move the cursor to the begining of the line
Gmove the cursor to the end of the line
ggmove the cursor to the begining of the file
Lmove the cursor to the end of the file
:59move cursor to line 59. Replace 59 by the desired line number.
20|move cursor to column 20.
%Move cursor to matching parenthesis
[[Jump to function start
[{Jump to block start
 剪切、復制和粘貼

yCopy the selected text to clipboard
pPaste clipboard contents
ddCut current line
yyCopy current line
y$Copy to end of line
DCut to end of line
 搜索

/wordSearch word from top to bottom
?wordSearch word from bottom to top
*Search the word under cursor
//cstringSearch STRING or string, case insensitive
/jo[ha]nSearch john or joan
//< theSearch the, theatre or then
/the/>Search the or breathe
//< the/>Search the
//< ¦./>Search all words of 4 letters
///Search fred but not alfred or frederick
/fred/|joeSearch fred or joe
//</d/d/d/d/>Search exactly 4 digits
/^/n/{3}Find 3 empty lines
:bufdo /searchstr/Search in all open files
bufdo %s/something/somethingelse/gSearch something in all the open buffers and replace it with somethingelse
 替換

:%s/old/new/gReplace all occurences of old by new in file
:%s/onward/forward/giReplace onward by forward, case unsensitive
:%s/old/new/gcReplace all occurences with confirmation
:2,35s/old/new/gReplace all occurences between lines 2 and 35
:5,$s/old/new/gReplace all occurences from line 5 to EOF
:%s/^/hello/gReplace the begining of each line by hello
:%s/$/Harry/gReplace the end of each line by Harry
:%s/onward/forward/giReplace onward by forward, case unsensitive
:%s/ *$//gDelete all white spaces
:g/string/dDelete all lines containing string
:v/string/dDelete all lines containing which didn’t contain string
:s/Bill/Steve/Replace the first occurence of Bill by Steve in current line
:s/Bill/Steve/gReplace Bill by Steve in current line
:%s/Bill/Steve/gReplace Bill by Steve in all the file
:%s/^M//gDelete DOS carriage returns (^M)
:%s//r//r/gTransform DOS carriage returns in returns
:%s#<[^>]/+>##gDelete HTML tags but keeps text
:%s/^/(.*/)/n/1$//1/Delete lines which appears twice
Ctrl+aIncrement number under the cursor
Ctrl+xDecrement number under cursor
ggVGg?Change text to Rot13
 大小寫

VuLowercase line
VUUppercase line
g~~Invert case
vEUSwitch word to uppercase
vE~Modify word case
ggguGSet all text to lowercase
gggUGSet all text to uppercase
:set ignorecaseIgnore case in searches
:set smartcaseIgnore case in searches excepted if an uppercase letter is used
:%s//<.//u&/gSets first letter of each word to uppercase
:%s//<.//l&/gSets first letter of each word to lowercase
:%s/.*//u&Sets first letter of each line to uppercase
:%s/.*//l&Sets first letter of each line to lowercase
 讀寫文件

:1,10 w outfileSaves lines 1 to 10 in outfile
:1,10 w >> outfileAppends lines 1 to 10 to outfile
:r infileInsert the content of infile
:23r infileInsert the content of infile under line 23
 文件瀏覽器

:e .Open integrated file explorer
:SexSplit window and open integrated file explorer
:Sex!Same as :Sex but split window vertically
:browse eGraphical file explorer
:lsList buffers
:cd ..Move to parent directory
:argsList files
:args *.phpOpen file list
:grep exPRession *.phpReturns a list of .php files contening expression
gfOpen file name under cursor
 和 Unix 系統交互

:!pwdExecute the pwd unix command, then returns to Vi
!!pwdExecute the pwd unix command and insert output in file
:shTemporary returns to Unix
$exitRetourns to Vi
 對齊

:%!fmtAlign all lines
!}fmtAlign all lines at the current position
5!!fmtAlign the next 5 lines
 Tabs/Windows

:tabnewCreates a new tab
gtShow next tab
:tabfirstShow first tab
:tablastShow last tab
:tabm n(position)Rearrange tabs
:tabdo %s/foo/bar/gExecute a command in all tabs
:tab ballPuts all open files in tabs
:new abc.txtEdit abc.txt in new window
 分屏顯示

:e filenameEdit filename in current window
:split filenameSplit the window and open filename
ctrl-w up arrowPuts cursor in top window
ctrl-w ctrl-wPuts cursor in next window
ctrl-w_Maximize current window vertically
ctrl-w|Maximize current window horizontally
ctrl-w=Gives the same size to all windows
10 ctrl-w+Add 10 lines to current window
:vsplit fileSplit window vertically
:sview fileSame as :split in readonly mode
:hideClose current window
:­nlyClose all windows, excepted current
:b 2Open #2 in this window
 自動完成

Ctrl+n Ctrl+p (in insert mode)Complete word
Ctrl+x Ctrl+lComplete line
:set dictionary=dictDefine dict as a dictionnary
Ctrl+x Ctrl+kComplete with dictionnary
 Marks

m {a-z}Marks current position as {a-z}
' {a-z}Move to position {a-z}
''Move to previous position
 縮寫

:ab mail mail@provider.orgDefine mail as abbreviation of mail@provider.org
 文本縮進

:set autoindentTurn on auto-indent
:set smartindentTurn on intelligent auto-indent
:set shiftwidth=4Defines 4 spaces as indent size
ctrl-t, ctrl-dIndent/un-indent in insert mode
>>Indent
<<Un-indent
=%Indent the code between parenthesis
1GVG=Indent the whole file
 語法高亮

:syntax onTurn on syntax highlighting
:syntax offTurn off syntax highlighting
:set syntax=perlForce syntax highlighting

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
国产不卡精品视男人的天堂| 久久中文久久字幕| 亚洲视频在线视频| 中文欧美日本在线资源| 国产欧美日韩精品专区| 欧美大尺度电影在线观看| 国内精品伊人久久| 91麻豆桃色免费看| 国产亚洲美女精品久久久| 中文字幕日韩欧美精品在线观看| 欧美不卡视频一区发布| 日韩在线观看视频免费| 亚洲夜晚福利在线观看| 久久成人18免费网站| 91牛牛免费视频| 日韩成人在线视频| 国产精品久久久久国产a级| 日韩性生活视频| 欧美重口另类videos人妖| 97久久国产精品| 国产视频999| 97在线视频精品| 亚洲人精选亚洲人成在线| 亚洲精品国产免费| 国产精品成人一区二区三区吃奶| 久久久久国产精品免费网站| 在线精品视频视频中文字幕| 91精品美女在线| 国产精品一区二区三区毛片淫片| 亚洲精品日产aⅴ| 97视频免费观看| 欧美多人乱p欧美4p久久| 成人国产在线激情| 欧美最猛性xxxxx免费| 久久精品国产69国产精品亚洲| 久久精品久久精品亚洲人| 国内精品中文字幕| 国产精品视频精品视频| 欧美激情第1页| 亚洲国产精品字幕| 亚洲а∨天堂久久精品喷水| 亚洲sss综合天堂久久| 欧美中文在线观看| 97精品伊人久久久大香线蕉| 久久精品成人欧美大片古装| 91精品视频免费看| 668精品在线视频| 姬川优奈aav一区二区| 2024亚洲男人天堂| 色偷偷噜噜噜亚洲男人的天堂| 亚洲精品一区二区在线| 国产精品美女网站| 日韩成人av在线| 欧美在线免费观看| 2019亚洲日韩新视频| 亚洲精品视频在线观看视频| 日韩高清中文字幕| 欧美激情性做爰免费视频| 欧美激情啊啊啊| 亚洲欧洲在线播放| 成人a视频在线观看| 国产在线视频不卡| 亚洲资源在线看| 98精品国产高清在线xxxx天堂| 欧美成人小视频| 久久久亚洲天堂| 国产a∨精品一区二区三区不卡| 91午夜理伦私人影院| 中文字幕亚洲欧美一区二区三区| 日韩精品极品在线观看播放免费视频| 国产精品久久久久久一区二区| 日韩精品视频免费专区在线播放| 欧美丝袜一区二区| 91麻豆国产语对白在线观看| 精品久久久999| 亚洲午夜激情免费视频| 亚洲欧洲一区二区三区久久| 日韩精品高清在线观看| 精品在线观看国产| 亚洲综合中文字幕在线观看| 欧美日韩激情美女| 国产日韩精品视频| 久久久久亚洲精品国产| 欧洲精品久久久| 疯狂做受xxxx欧美肥白少妇| 日韩大陆欧美高清视频区| 亚洲欧美日韩另类| 成人夜晚看av| 亚洲欧美在线一区二区| 久久高清视频免费| 欧美精品在线免费| 国自在线精品视频| 日韩免费在线电影| 久久精品国产2020观看福利| 欧美成人精品在线视频| 亚洲精品v欧美精品v日韩精品| 欧美一区二区视频97| 久久久久国产精品免费| 亚洲天堂免费观看| 国产色视频一区| 最近2019中文字幕在线高清| 欧美性黄网官网| 亚洲精选一区二区| 最近中文字幕mv在线一区二区三区四区| 成人精品一区二区三区电影黑人| 日本a级片电影一区二区| 日韩成人中文电影| 国产视频在线观看一区二区| 精品国产91久久久| 亚洲欧洲av一区二区| 国产精品人成电影在线观看| 日韩黄在线观看| 国产午夜精品美女视频明星a级| 亚洲欧美日韩精品久久亚洲区| 欧美激情第6页| 国产99视频精品免视看7| 国产精品久久久久久久久久尿| 国产精品电影网站| 亚洲国产又黄又爽女人高潮的| 欧美精品在线网站| 97视频com| 亚洲午夜久久久久久久| 国产精品视频999| 久久精品亚洲国产| 黄色一区二区在线观看| 91亚洲精华国产精华| 久久深夜福利免费观看| 欧美剧在线观看| 久久久久国色av免费观看性色| 国产精品一区二区性色av| 亚洲欧美在线一区二区| 波霸ol色综合久久| 亚洲精品99久久久久| 久久精品视频在线观看| 亚洲黄色免费三级| 日韩亚洲欧美中文在线| 日韩黄在线观看| 亚洲日本欧美日韩高观看| 日韩在线观看电影| 国产97在线|日韩| 亚洲人成网站在线播| 亚洲自拍小视频免费观看| 综合欧美国产视频二区| 日韩免费在线观看视频| 成人xxxxx| 久久精品中文字幕| 国产91精品久久久久久久| 国产成人av在线| 91色琪琪电影亚洲精品久久| 欧美成人全部免费| 国产精品黄页免费高清在线观看| 久久人91精品久久久久久不卡| 亚洲国产成人精品电影| 美女撒尿一区二区三区| 亚洲天堂av综合网| 九九久久久久99精品| 欧洲中文字幕国产精品| 欧美亚洲国产视频| 黑人巨大精品欧美一区免费视频| 亚洲激情视频网站| 国产免费观看久久黄| 日韩成人在线视频观看| 2019中文字幕在线观看| 伊人久久综合97精品|