⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 motion.txt

📁 MSYS在windows下模拟了一个类unix的终端
💻 TXT
📖 第 1 页 / 共 3 页
字号:
Lowercase marks 'a to 'z are remembered as long as the file remains in thebuffer list.  If you remove the file from the buffer list, all its marks arelost.  If you delete a line that contains a mark, that mark is erased.Lowercase marks can be used in combination with operators.  For example: "d't"deletes the lines from the cursor position to mark 't'.  Hint: Use mark 't' forTop, 'b' for Bottom, etc..  Lowercase marks are restored when using undo andredo.Uppercase marks 'A to 'Z include the file name.  {Vi: no uppercase marks} Youcan use them to jump from file to file.  You can only use an uppercase markwith an operator if the mark is in the current file.  The line number of themark remains correct, even if you insert/delete lines or edit another file fora moment.  When the 'viminfo' option is not empty, uppercase marks are kept inthe .viminfo file.  See |viminfo-file-marks|.Numbered marks '0 to '9 are quite different.  They can not be set directly.They are only present when using a viminfo file |viminfo-file|.  Basically '0is the location of the cursor when you last exited Vim, '1 the last but onetime, etc.  See |viminfo-file-marks|.							*'[*'[			To the first non-blank character on the first line			of the previously operated, inserted or put text.			{not in Vi}							*`[*`[			To the first character of the previously operated,			inserted or put text.  {not in Vi}							*']*']			To the first non-blank character on the last line of			the previously operated, inserted  or put text.			{not in Vi}							*`]*`]			To the last character of the previously operated,			inserted or put text. {not in Vi}After executing an operator the Cursor is put at the beginning of the textthat was operated upon.  After a put command ("p" or "P") the cursor issometimes placed at the first inserted line and sometimes on the last insertedcharacter.  The four commands above put the cursor at either end.  Example:After yanking 10 lines you want to go to the last one of them: "10Y']".  Afterinserting several lines with the "p" command you want to jump to the lowestinserted line: "p']".  This also works for text that has been inserted.Note: After deleting text, the start and end positions are the same, exceptwhen using blockwise Visual mode.  These commands do not work when nooperator, file-read or put command has been used yet in the current file.							*'<*'<			To the first non-blank character on the first line			of the last selected Visual area in the current			buffer.  {not in Vi}.							*`<*`<			To the first character of the last selected Visual			area in the current buffer.  {not in Vi}.							*'>*'>			To the first non-blank character on the last line			of the last selected Visual area in the current			buffer.  {not in Vi}.							*`>*`>			To the last character of the last selected Visual			area in the current buffer.  {not in Vi}.							*''*''			To the first non-blank character of the line where			the cursor was before the latest jump, or where the			last "m'" or "m`" command was given (linewise).							*``*``			To the position before latest jump, or where the last			"m'" or "m`" command was given (exclusive).			Also see |restore-position|.							*'quote*'"			To the first non-blank character of the line where			the cursor was the last time the current buffer was			exited (linewise).  Defaults to the first line.			See |last-position-jump| for how to use this for each			opened file.  {not in Vi}.							*`quote*`"			To the cursor position when last exiting the current			buffer (exclusive).  Defaults to the first character			of the first line.  {not in Vi}.A "jump" is one of the following commands: "'", "`", "G", "/", "?", "n","N", "%", "(", ")", "[[", "]]", "{", "}", ":s", ":tag", "L", "M", "H" andthe commands that start editing a new file.  If you make the cursor "jump"with one of these commands, the position of the cursor before the jump isremembered.  You can return to that position with the "''" and "``" command,unless the line containing that position was changed or deleted.							*CTRL-O*CTRL-O			Go to [count] Older cursor position in jump list			(not a motion command).  {not in Vi}<Tab>		or					*CTRL-I* *<Tab>*CTRL-I			Go to [count] newer cursor position in jump list			(not a motion command).  {not in Vi}							*:ju* *:jumps*:ju[mps]		Print the jump list (not a motion command).  {not in			Vi}							*jumplist*Jumps are remembered in a jump list.  With the CTRL-O and CTRL-I command youcan go to cursor positions before older jumps, and back again.  Thus you canmove up and down the list.  There is a separate jump list for each window.The maximum number of entries is fixed at 50.For example, after three jump commands you have this jump list:  jump line  file/line    3	  1  some text    2	 70  another line    1  1154  end. >The "file/line" column shows the file name, or the text at the jump if it isin the current file (an indent is removed and a long line is truncated to fitin the window).You are currently in line 1167.  If you then use the CTRL-O command, thecursor is put in line 1154.  This results in:  jump line  file/line    2	  1  some text    1	 70  another line >  0  1154  end.    1  1167  foo barThe pointer will be set at the last used jump position.  The next CTRL-Ocommand will use the entry above it, the next CTRL-I command will use theentry below it.  If the pointer is below the last entry, this indicates thatyou did not use a CTRL-I or CTRL-O before.  In this case the CTRL-O commandwill cause the cursor position to be added to the jump list, so you can getback to the position before the CTRL-O.  In this case this is line 1167.With more CTRL-O commands you will go to lines 70 and 1.  If you use CTRL-Iyou can go back to 1154 and 1167 again.  Note that the number in the "jump"column indicates the count for the CTRL-O or CTRL-I command that takes you tothis position.If you use a jump command, the current line number is inserted at the end ofthe jump list.  If the same line was already in the jump list, it is removed.The result is that when repeating CTRL-O you will get back to old positionsonly once.After the CTRL-O command that got you into line 1154 you could give anotherjump command (e.g., "G").  The jump list would then become:  jump line  file/line    4	  1  some text    3	 70  another line    2  1167  foo bar    1  1154  end. >The line numbers will be adjusted for deleted and inserted lines.  This failsif you stop editing a file without writing, like with ":n!".							*%*%			Find the next item in this line after or under the			cursor and jump to its match (inclusive).  Items can			be:			([{}])		parenthesis or (curly/square) brackets					(this can be changed with the					'matchpairs' option)			/* */		start or end of C-style comment			#if, #ifdef, #else, #elif, #endif					C preprocessor conditionals			Parens and braces preceded with a backslash are			ignored.  When the '%' character is not present in			'cpoptions', parens and braces inside double quotes			are ignored, unless the number of parens/braces in a			line is uneven and this line and the previous one does			not end in a backslash.  '(', '{', '[', ']', '}' and			')' are also ignored (parens and braces inside single			quotes).  Note that this works fine for C, but not for			Perl, where single quotes are used for strings.			No count is allowed ({count}% jumps to a line {count}			percentage down the file |N%|).  Using '%' on			#if/#else/#endif makes the movement linewise.						*[(*[(			go to [count] previous unmatched '('.  {not in Vi}						*[{*[{			go to [count] previous unmatched '{'.  {not in Vi}						*])*])			go to [count] next unmatched ')'.  {not in Vi}						*]}*]}			go to [count] next unmatched '}'.  {not in Vi}The above four commands can be used to go to the start or end of the currentcode block.  It is like doing "%" on the '(', ')', '{' or '}' at the otherend of the code block, but you can do this from anywhere in the code block.Very useful for C programs.  Example: When standing on "case x:", "[{" willbring you back to the switch statement.						*]m*]m			Go to [count] next start of a method (for Java or			similar structured language).  When not before the			start of a method, jump to the start or end of the			class.  When no '{' is found after the cursor, this is			an error.  {not in Vi}						*]M*]M			Go to [count] next end of a method (for Java or			similar structured language).  When not before the end			of a method, jump to the start or end of the class.			When no '}' is found after the cursor, this is an			error. {not in Vi}						*[m*[m			Go to [count] previous start of a method (for Java or			similar structured language).  When not after the			start of a method, jump to the start or end of the			class.  When no '{' is found before the cursor this is			an error. {not in Vi}						*[M*[M			Go to [count] previous end of a method (for Java or			similar structured language).  When not after the			end of a method, jump to the start or end of the			class.  When no '}' is found before the cursor this is			an error. {not in Vi}The above two commands assume that the file contains a class with methods.The class definition is surrounded in '{' and '}'.  Each method in the classis also surrounde with '{' and '}'.  This applies to the Java language.  Thefile looks like this:	// comment	class foo {		int method_one() {			body_one();		}		int method_two() {			body_two();		}	}Starting with the cursor on "body_two()", using "[m" will jump to the '{' atthe start of "method_two()" (obviously this is much more useful when themethod is long!).  Using "2[m" will jump to the start of "method_one()".Using "3[m" will jump to the start of the class.						*[#*[#			go to [count] previous unmatched "#if" or "#else".			{not in Vi}						*]#*]#			go to [count] next unmatched "#else" or "#endif".  {not			in Vi}These two commands work in C programs that contain #if/#else/#endifconstructs.  It brings you to the start or end of the #if/#else/#endif wherethe current line is included.  You can then use "%" to go to the matching line.						*[star* *[/*[*  or  [/		go to [count] previous start of a C comment "/*".  {not			in Vi}						*]star* *]/*]*  or  ]/		go to [count] next end of a C comment "*/".  {not			in Vi}						*H*H			To line [count] from top (Home) of screen (default:			first line on the screen) on the first non-blank			character (linewise).  See also 'startofline' option.			Cursor is adjusted for 'scrolloff' option.						*M*M			To Middle line of screen, on the first non-blank			character (linewise).  See also 'startofline' option.						*L*L			To line [count] from bottom of screen (default: Last			line on the screen) on the first non-blank character			(linewise).  See also 'startofline' option.			Cursor is adjusted for 'scrolloff' option.<LeftMouse>		Moves to the position on the screen where the mouse			click is (inclusive).  See also |<LeftMouse>|.  If the			position is in a status line, that window is made the			active window and the cursor is not moved.  {not in Vi} vim:tw=78:ts=8:sw=8:

⌨️ 快捷键说明

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