分享
 
 
 

vi用法集锦

王朝other·作者佚名  2006-11-24
窄屏简体版  字體: |||超大  

不好意思,是英文的:p

Enter the following subcommands in command mode. You can cancel an incomplete

command by pressing the Esc key. If you need information about the format of vi

subcommands, see "vi General Subcommand Syntax." Left Arrow or h or Ctrl-H Moves the cursor one character to the left. Down Arrow or j or Ctrl-J or Ctrl-N Moves the cursor down one line (it remains

in the same column). Up Arrow or k or Ctrl-P Moves the cursor up one line (it remains in the same

column). Right Arrow or l Moves the cursor one character to the right. Moving within a Line by Character Position Enter the following subcommands in command mode. You can cancel an incomplete

command by pressing the Esc key. If you need information about the format of vi

subcommands, see "vi General Subcommand Syntax." ^ Moves the cursor to the first nonblank character. 0 Moves the cursor to the beginning of the line. $ Moves the cursor to the end of the line. fx Moves the cursor to the next x character. Fx Moves the cursor to the last x character. tx Moves the cursor to one column before the next x character. Tx Moves the cursor to one column after the last x character. ; Repeats the last f, F, t, or T subcommand. , Repeats the last f, F, t, or T subcommand in the opposite direction. Number| Moves the cursor to the specified column. Moving to Words Enter the following subcommands in command mode. If you need information about

the format of vi subcommands, "vi General Subcommand Syntax." w Moves the cursor to the next small word. b Moves the cursor to the previous small word. e Moves the cursor to the next end of a small word. W Moves the cursor to the next big word. B Moves the cursor to the previous big word. E Moves the cursor to the next end of a big word. Moving by Line Position Enter the following subcommands in command mode. If you need information about

the format of vi subcommands, see "vi General Subcommand Syntax." H Moves the cursor to the top line on the screen. L Moves the cursor to the last line on the screen. M Moves the cursor to the middle line on the screen. + Moves the cursor to the next line at its first nonblank character. - Moves the cursor to the previous line at its first nonblank character. Enter Moves the cursor to the next line at its first nonblank character. Moving to Sentences, Paragraphs, or Sections Enter the following subcommands in command mode. You can cancel an incomplete

subcommand by pressing the Esc key. If you need information about the format of

vi subcommands, see "vi General Subcommand Syntax." ( Places the cursor at the beginning of the previous sentence, or the previous

s-expression if you are in LISP mode. ) Places the cursor at the beginning of the next sentence, or the next

s-expression if you are in LISP mode. { Places the cursor at the beginning of the previous paragraph, or at the next

list if you are in LISP mode. } Places the cursor at the beginning of the next paragraph, at the next section

if you are in C mode, or at the next list if you are in LISP mode. ]] Places the cursor at the next section, or function if you are in LISP mode. [[ Places the cursor at the previous section, or function if you are in LISP

mode. Moving by Redrawing the Screen Enter the following subcommands in command mode. You can cancel an incomplete

subcommand by pressing the Esc key. If you need information about the format of

vi subcommands, see "vi General Subcommand Syntax." z Redraws the screen with the current line at the top of the screen. z- Redraws the screen with the current line at the bottom of the screen. z. Redraws the screen with the current line at the center of the screen.

/Pattern/z- Redraws the screen with the line containing the character string,

specified by the Pattern parameter, at the bottom. Paging and Scrolling Enter the following subcommands in command mode. You can cancel an incomplete

subcommand by pressing the Esc key. If you need information about the format of

vi subcommands, see "vi General Subcommand Syntax." Ctrl-U Scrolls up one-half screen. Ctrl-D Scrolls down one-half screen. Ctrl-F Scrolls forward one screen. Ctrl-B Scrolls backward one screen. Ctrl-E Scrolls the window down one line. Ctrl-Y Scrolls the window up one line. z+ Pages up. z^ Pages down. Searching for Patterns Enter the following subcommands in command mode. You can cancel an incomplete

subcommand by pressing the Esc key. If you need information about the format of

vi subcommands, see "vi General Subcommand Syntax." [Number]G Places the cursor at the line number specified by the Number parameter

or at the last line if the Number parameter is not specified.

/Pattern Places the cursor at the next line containing the character string

specified by the Pattern parameter. ?Pattern Places the cursor at the next previous line containing the character

string specified by the Pattern parameter. n Repeats the last search for the text specified by the Pattern parameter in the

same direction. N Repeats the last search for the text specified by the Pattern parameter in the

opposite direction.

/Pattern/+Number Places the cursor the specified number of lines after the line

matching the character string specified by the Pattern parameter. ?Pattern?-Number Places the cursor the specified number of lines before the line

matching the character string specified by the Pattern parameter. % Finds the parenthesis or brace that matches the one at current cursor

position. Editing Text The subcommands for editing enable you to perform the following tasks: o Marking a specific location in a file and returning

o Adding text to a file

o Changing text while in input mode

o Changing text from command mode

o Copying and moving text

o Restoring and repeating changes Marking a Specific Location in a File and Returning Enter the following subcommands in command mode. You can cancel an incomplete

subcommand by pressing the Esc key. If you need information about the format of

vi subcommands, see "vi General Subcommand Syntax." " Moves the cursor to the previous location of the current line. " Moves the cursor to the beginning of the line containing the previous location

of the current line. mx Marks the current position with the letter specified by the x parameter. `x Moves the cursor to the mark specified by the x parameter. 'x Moves the cursor to the beginning of the line containing the mark specified

by the x parameter. Adding Text to a File (Text Input Mode) Enter the following subcommands in command mode to change the vi editor into

text input mode. If you need information about the format of vi subcommands, see

"vi General Subcommand Syntax." aText Inserts text specified by the Text parameter after the cursor. End text

input mode by pressing the Esc key. AText Adds text specified by the Text parameter to the end of the line. End text

input mode by pressing the Esc key. iText Inserts text specified by the Text parameter before the cursor. End text

input mode by pressing the Esc key. IText Inserts text specified by the Text parameter before the first nonblank

character in the line. End text input mode by pressing the Esc key. o Adds an empty line below the current line. End text input mode by pressing the

Esc key. O Adds an empty line above the current line. End text input mode by pressing the

Esc key. Changing Text While in Input Mode Use the following subcommands only while in text input mode. These commands have

different meanings in command mode. If you need information about the format of

vi subcommands, see "vi General Subcommand Syntax." Ctrl-D Goes back to previous autoindent stop. ^ Ctrl-D Ends autoindent for this line only. 0Ctrl-D Moves cursor back to left margin. Esc Ends insertion and returns to command state. Ctrl-H Erases the last character. Ctrl-Q Enters any character if xon is disabled. Ctrl-V Enters any character. Ctrl-W Erases the last small word. \ Quotes the erase and kill characters. Ctrl-? Interrupts and ends insert or the Ctrl-D key sequence. Changing Tex

[1] [2] 下一页

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有