In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly analyzes the relevant knowledge points of VsVim for everyone, the content is detailed and easy to understand, the operation details are reasonable, and it has certain reference value. If you are interested, you may wish to follow Xiao Bian to have a look. Let's follow Xiao Bian to learn more about "what are the knowledge points of VsVim".
VsVim--Record the accumulation of bits and pieces on the programming road first, and sort them out slowly in the future:
Copy and paste inside and outside vim
1. "+ y means copy from vim to system cut; 2. "+ p means paste from external file (system cut) to vim;
vim mass delete blank lines
The first option: In command mode, type: g/^\s $/d; Enter, done. Command explanation: : g stands for full document scope ^Represents the beginning of a row \s * stands for white space characters & represents the end of the line d stands for deletion 3 paragraphs separated by//The second option: delete blank lines: g/^\n *$/d #g for global Regular is: start of line + newline... Actually/^\n/can. d is a command indicating deletion.
Switching between vim and shell
: shell You can switch to shell command line without closing vim: exit from shell back to vim
vim Every other line: 1. Insert one line, 2. Insert three lines
1):%s/\n\n/\r/g2):g/^/norm 3o The norm command means that the following parameters are treated as keys in normal mode.
vim file browsing
: Ex opens the directory browser, you can browse all files in the current directory, and you can select: Sex to divide the current window horizontally, and open the directory browser in a window: ls to display the current buffer situation.
vim switches between files and adjusts windows
1, open multiple windows open multiple windows command the following: horizontal cut window: new + window name (After saving, it is the file name): split + window name, which can also be abbreviated as: sp + window name Vertical cut window name: vsplit + window name, which can also be abbreviated as: vsp + window name 2. Switch between files Ctrl +6-Next file: bn-Next file: bp-Previous file3. How to switch between panes Ctrl + w + h/j/k/lCtrl + ww--Switch back to the next pane in turn 4. Window resizing Vertical adjustment: ctrl + w + Vertical expansion (increase the number of rows): ctrl + w-Vertical reduction (decrease the number of rows): res (ize) num For example: res 5, adjust the number of rows displayed to 5: res (ize)+ num Increase the height of the current window num rows: res (ize)-num Decrease the height of the current window num rows Horizontal adjustment: vertical res (ize) num Specify the current window num columns: vertical res (ize)+ num Increase the current window num columns: vertical res (ize)-num Decrease the current window num columns 5, rename the window: f file 6, vim open multifile vim a b c: e file Edit multiple files in separate windows vim-o: Split display horizontally vim-O: Vertical split display : qa Close all windows: n Skip to the next file, you can also directly specify the file to jump, such as: n c, you can directly jump to c file: e #Go back to the file you just edited
Add double quotes to words in batches
One two three four five six I want to change to "one","two","four","five","six" First position the cursor at the beginning of the line, using ^. Then type f (indicates a space), with the cursor positioned in the space between one and two, and type c ","(modify the space to enter insert mode, then add ","): one","two three four five six then press;., The cursor will first look for the next space, i.e. repeat f, which is between two and three, and then. You can repeat the last modification operation, i.e. c ",": one "," two "," three four five six "and then repeat the press several times;. You can modify all the middle characters: one "," two "," three "," four "," five "," six ". Finally, apply I and A, and add the first and last double quotes. One of the things vimer has to understand from this example is: make your actions repeatable!! If we use l or-> to locate spaces in the above example, since the length of the words one, two, and three is uncertain, we cannot know in advance how many times l needs to be pressed, so the l location is unrepeatable. And by f we can repeat our search operation, so as to accurately locate the space. In addition, if we substitute xi "," instead of c "," it is also non-repeatable, because xi "," means to delete spaces first, then enter insert mode and type "," so that there are two separate modification operations, and the most recent operation becomes "Enter insert mode and type",". If you pass. Repeating this operation will not remove spaces.
Multiline text becomes single-line with commas
one two four wants to be "one, two, three, four" First position the cursor at o of one, Ctrl + v, 3 j,$, A,, Esc, V, 3 j, J. And then there's this one, two, three, four,
Substitution: before and after letters/up and down lines, insert N identical characters
xp exchange current character and next character If you are interested, you may wish to follow Xiao Bian to have a look. Let's follow Xiao Bian to learn more about "what are the knowledge points of VsVim".
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.