Problem Description:Select the specified character in vim to copy/cut/pasteProblem solving:into vim in visual mode, visual mode enters, there can be three ways:(1) In normal mode, the direct key V can enter the default visual mode, you can use v+j/k/h/l for text selectionNote:Use the v command in normal mode to enter visual mode, v+ j/k/h/l for text selectionPress the following key for the selected text:(1.
Reprinted from: http://www.cnblogs.com/luosongchao/p/3193153.htmlProblem Description:Select the specified character in vim to copy/cut/pasteSelect:1, Normal mode--v+hjkl to choose.2, the Visual Line mode button V can enter only to select the rowAfter pressing V, enter visual line mode and use the J/K key to select one or more rows3. Visual block mode, press CTRL + V to enterAfter pressing CTRL + V, enter th
more complex character processing. Please use the ": Reg" Command Now (press the ESC key, exit edit mode, then press: Enter command mode, then enter the Reg return), see? The output on the screen! It's not very familiar, right! Is everything you've ever copied! Perhaps at this time you also found that the vim of the shear plate has so many, according to the number and the symbol of one of the areas separated, here to give a number example-"" 5, see?
files and press Ctrl + W.Add a number to the front of the command to indicate the number of repetitions, and add a letter to indicate the name of the buffer used.For help, use: Help [content or command].
Set Tab to 4 and automatically convert to space in VI
: Set tabstop = 4 "Force tabs to be displayed/expanded to 4 spaces (instead of default 8 ).: Set softtabstop = 4 "make Vim treat : "I don't think this one will do what you want.: Set expandtab "turn tab keypresses into spaces. Soun
0 or shift+6 moves to the beginning of the bank;Shift+4 moved to the end of the bank;Copy yy; 3 yy Copy the following 3 lines, p paste the following, p paste to the top;Paste pp;Cut: 5 dd clip below 5 lines, p paste below, p
Label: POS Word Character section multiple delete line paste BSP shouldDelete command-delete character before deleting the character: x (uppercase X) Delete the character after the cursor: x (lowercase x)-word: DW Deletes the entire word, the cursor should be at the top of t
"Description"one of the most important functions of a text editor is copying pasting. Joi is now developing a text editor that can copy paste very quickly, and as an excellent program ape for Joi, you have the core task of testing the copy Paste function. The whole joi is tied to you, so you want to write a correct
vim)Vmap The copy shortcut uses marks so rather than have the entire line copied, only the text selected in Visual mode is C Opied. Finally, an undo at the end of restores the text that would otherwise has been deleted. The paste shortcut switches to paste mode so it certain options like indenting is disabled, then switches back after PA Sting the text. Note the
to paste the content in the global clipboard of the system.Note: Here, only vim. gtk or vim. gnome can use the system global clipboard. The default vim. basic cannot see the + register. Install vim. gnome and use apt-get install vim-gnome. Then vim automatically links to vim. gnome. Below www.2cto.com is the basic command for vim copy and paste: yy
http://www.tinylab.org/linux-terminal-and-paste-copy-under-vim/Under the GUI interface, we are free to copy and paste. But in the character interface, we have to use the mouse to select, and then click on the right, select Copy, a
VI copy and paste command
The VI editor has three modes: Command mode, input mode, and last line mode. It is very important to master these three modes:Command mode: After VI is started, the command mode is entered by default. From this mode, you can switch to the other two modes by using commands, in any mode, you can press the [ESC] key to return to the command mode. Enter the subtitle "I" in command mod
When I was in touch with Linux, I used the nano text editor, and personally felt that his greatest advantage was convenience and speed. Open files, modify files, to exit are very fast and simple. This is better than Vi,vim, but the nano can not display color words, the whole row can not be deleted, editing various configuration files, the total feeling is not very convenient. For the nano of these shortcomings, vim can be a good solution, and vim open the file, the word is color, this point root
the position of a specific character, therefore, P is followed by this character. P indicates that the entire row is copied and pasted before the cursor. The cursor is one row up (down), and the non-whole row is copied before (after) the cursor. Note: In a regular expression, ^ indicates the starting position of the matching string, $ indicates the end position of the matched string. Add a number to the fr
Copy:YY: Copy the line where the cursor is locatedNyy:n is a number, the copy cursor is in the down n line, for example, 20yy is copied 20 rowsY1G: Copy all data from the row to the first row of the cursorYG: Copy all data from the row to the last line of the cursorY0: Copy
1. Introduction to the VIM editor modeVim typically has 4 modes:
Normal Mode (Normal-mode)
Insert mode (Insert-mode)
Command mode (Command-mode)
Visual Mode (Visual-mode)
1.1 Normal ModeNormal mode is generally used to browse files, but also include some copy, paste, delete and other operations. In this case, the general key/key combination will be treated as a function key without
1. Select a text block. Using V to enter the visual mode, move the cursor key selection.2. The command to copy is Y, which is yank (lifted), and the commonly used commands are as follows:Y Copies the selected block to the buffer when a piece is selected using the V mode;yy copy entire row (Nyy or yny, copy n rows, n is number);y^
row where the cursor is located
O: add a line under the row where the cursor is located (and enter the input mode)
O: add a line above the row where the cursor is located (and enter the input mode)
X: Delete the character of the cursor, equivalent to the [Delete] function key.
X: Delete the prefix of the cursor, equivalent to [Backspace]
Dd: Delete the row where the cursor is located.
Yy: copy the content
v Character selection, the cursor will go through the place of the anti-white selection! V (uppercase) line selection, will be the cursor through the line anti-white selection! (commonly used, with the next key around, to make regional selection, very cool!!!) ) [ctrl]+v block selection, you can choose the data in a rectangular way y Copy the anti-white place. D to remove the anti-white place
, pasteX: Delete one character forwardX: Remove one character backwardsNX: Remove n characters backwardsDD: Which row of the delete/pre-tangent cursorNDD: Delete/Pre-tangent the line after row n rowsYY: The copy cursor is in the rowSmall p: Pastes the copied or pasted content from the line where the cursor is locatedLarge p: Pastes the copied or pasted content fr
current row and enter edit modeO: Insert a row on the current line and enter edit modeR: Replace the character at the cursorW Save gg=g Automatic alignment syntaxR: Replacement modeYY: Copy when moving forwardYYY: The current line and the following three rowsP: PasteNYW: copy n wordsU: UndoD: CutDD: Cut one lineNDD: Cut n rowsX: Delete the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.