l5.3

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3 代码 · 共 39 行

3
39 行
字号
#print		Move Alteration - Shifting   Often, especially when editing programs, it would be handy to be ableto shift parts of the file over some number of spaces to the right or left.Vi provides the '>' and '<' commands for this.  They move lines in the obvious directions eight spaces at a time.  They can take targets, like the'd', 'c', and 'y' commands, but usually you'll only want to use those whichaffect lines (e.g. not 'w' or ')'); the others all work, but probably aren'tfrequently useful.   Of course, if you double the commands (i.e. '>>' and '<<'), they refer tosingle lines.   If you'd prefer them to shift text by some amount other than 8 spaces, youcan set an option to that effect:		:set shiftwidth=nwhere 'n' is the number of spaces you want them to shift.  The word shiftwidthcan be abbreviated sw.   Type 'ready' to try out these commands.#user#create Shift  The shift commands:		     >  = Shift text right shiftwidth spaces (default 8)		     <  = Shift text left shiftwidth spaces    :set sw=n       or  		= Change the value of shiftwidth to n    :set shiftwidth=n   The :set command has many different options which can be set and changed.We'll go over a list of them in a later lesson.#vi Shift#next5.4  10

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?