Work for three years, has been in the semi-command line, the state of the semi-IDE, slowly summed up part, easy to use later."Basic" 1. tabOpen a file in a new tab:tabedit filenameVim has added multi-tab switching functionality from VIM7, which is
Edit commandC: Delete commandcc: Directly delete the cursor line, the cursor jumps to the beginning and transitions to the input mode#cc: Delete the next # line in the row where the cursor is located, and the cursor jumps to the beginning of the
Vim batch Modify multi-file data: ar[gs] Print parameter list: Arga[dd] Add item to parameter list: Argd[elete] Delete item from parameter list: Arge[dit] Add item to parameter list and edit this item: Argdo executes a command for all items in the
Category: The use of vim for so long, but has been unable to remember some basic operating instructions. Today when looking for a keyword, can't think of how to find "next", so Google and solve, by the way to paste the useful all over. Find
One, vim repeat command 1. Repeat the last commandIn normal mode . (decimal point) means the last command operation is repeatedCopy test files to a local directory$ cp /etc/protocols .Open a file for editing$ vim protocolsNormal mode input x ,
Text substitution in vim: 1. Replace the contents of the current line: :s/from/to/ (S is substitude) :s/from/to/ : replaces the first from in the current line with a to. If the current row contains more than one
Vim Using tips Ctags pluginAfter joining ctags , the root of the project ctags -R will be executed automatically in this directory to generate tags filesIn the source file, you Ctrl + ] can jump to the definition of a function and Ctrl + o return to
1. Installing Ctags[Email protected]:~#apt-get Install Ctags2. Setting the ctags of the kernel directory[Email protected]:/study/linux-git/linux-git/linux-3.18.3# lsArch documentation include kernel NET securityBlock drivers init Lib README
Vim View function prototypesVim View function prototype can be divided into system functions and custom functionsFirst, the system function:I use Shift+kSecond, the custom function: Vim with ctags realization function prototype fast
1. Change your mind-vim no mouse text Editing toolIn the bird's Linux private dish, this explains Linux:1. Vim is a very powerful text editing tool in the Linux like system with a long history and many systems have built this tool.2. Vim has the
The final results and documents arehttp://gist.github.com/zhuzhenpeng/5939304c8f298c82352bGCC, Clang, LLVM concepts and relationshipsCompiler sub-front and back endFront-end mainly for syntax and semantic analysis, input is the source code, output
@1: Winmanager:#1: The shortcut key to open Winmanager is configured in. VIMRC, which defaults to ": Wmtoggle", and nmap can be used to map it to other commands.#2:
Show Help
If the cursor is a directory,
Command HistoryCommands with: and/begin with a history, you can first type: or/Then press the up and down arrows to select a history command.start VimEnter the following command in the Command line windowVim starts vim directlyVim filename opens vim
Here is a simple introduction to the vim of the search and replace, it is well known that VIM support for regular expressions is very good, for programmers in the analysis of large amounts of data, the use of VIM this function is undoubtedly a
The color theme of Vim is in the/usr/share/vim/vim73/colors directory. After you open vim, enter ": ColorScheme" in normal mode to view the current theme, change the theme using the command ": ColorScheme MyColor", MyColor is you usr/share/vim/vim73
Common vi/vim commands and vivim commands
Vi/vim commands are complex and powerful. Here we will introduce some commonly used commands that can meet general needs.
Move the cursor: -Shift left: h-Move Down: j-Move up: k-Shift right: l-Flip: ctrl
Vi and vim Editor (11): advanced editing method (2)
Save command:
Vi and ex provide many methods to save a long string of command sequences. In this way, you only need to enter a few characters to call the saved sequence.
Abbreviation:
You can
Search and replace linux vim shortcut keys, linuxvim
Search
/Csdn: Find a string named csdn.
? Csdn looks up a string named csdn
N is an English letter, indicating to continue searching for the previous search.(Used with the above operations)
N
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