File Editor vim operation using

Source: Internet
Author: User

Tag:%s line number Delete tabs ignore UNIX binary highlight cursor

     

Gconf-editor#Configuration Editor/etc/vimrc#configuration file pathVim +24 File#to open a file to a specified lineVim File1 file2#Open multiple FilesVim-o2 file1 file2#Vertical split Screenvim-on file1 file2#Horizontal split ScreenSP filename#split up and down open new filesVSP filename#split left and right open new filectrl+w [Operation]#operations between multiple files Capital W # action: Close the current window c screen height = increase height + move cursor on screen right L H Upper K under J H next W: N#Edit Next file: 2n#edit the next two files: N#Edit a previous file: Rew#back to the first file: Set Nu#Open Line number: Set Nonu#Cancel Line number200G#Jump to: Nohl#Cancel Highlighting: Set Autoindent#Set auto Indent: Set FF#View Text Format: Set binary#change to UNIX formatCTRL + U#Page ForwardCTRL + D#page Backshift+ {#jump forward by code blockshift+}#jump Backwards by code blockShift+v + {#Check code blockShift+v +}#[[#Jump Document Header]]#Jump Document Trailer%#match the corresponding parentheses "' #jumps the position of the last cursorX#Document Encryption: Set ignorecase# Case insensitive: Set tabstop=4#Press the TAB key to actually enter a 4 space: Set Hlsearch#highlighting when searching: Syntax on#turn on syntax highlighting #the TAB key in Vim is set to 4 spacesvim/etc/vim/VIMRC#Add the following at the end of the fileSet TS=4set Expandtab set Autoindent/word#look under the cursor for a string named word? word#look for a string named word above the cursorN#representative repeats a search,/word will look down? Word will look upN#n is the opposite of N, which is the first search action for "reverse" because of the key. For example: After/vbird, pressing n means "up" search Vbird #using/word with N and n is extremely helpful! Can let you repeat to find some of the keywords you search: s/old/new#Old first occurrence and replace it with new: s/old/new/g#One line of command replaces all old:%s/old/new/g#Replace all the old in the file:%S/OLD/NEW/GC#Replace all old in the entire file, prompting for each replacement: n1,n2s/word1/word2/g#look for the string word1 between the N1 and N2 columns and replace the string with Word2. For example ": 100,200s/vbird/vbird/g": 1, $s/word1/word2/g#look for the word1 string from the first column to the last column and replace the string with the word2! Dd#Delete the entire column where the cursor is locatedDw#Delete the word at the current cursor locationNdd#Delete N Columnsd1g#Remove all data from the first round of the cursorDg#Remove all data from the last column of the cursord$#Delete the cursor where the last character of the columnD0#number 0, where the cursor is removed, to the first character of the columnYy#The column in which the replication cursor residesNyy#N is a number, and the load cursor is in the down N column, for example 20yy, to copy 20 columnsP#Paste

File Editor vim operation using

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.