Under Linux to do development, or even only to do management and maintenance work, but also the use of vim. As a novice, I am also just in touch, this section of my daily use or collection of vim common commands recorded.Of course, you can learn all
Advanced some of the editor, will contain the macro function, Vim is certainly not missing, the use of macros in Vim is very convenient:: QX starts recording macro and registers the result in register XQ Exit Record mode@x playing macro commands
Many things in a Linux system exist in the form of script code, configuration files, which are often edited when using Linux systems. Obviously, if there is no text editor, the road is unable to be difficult. My choice is vim. Vim is the most famous
Vim-Addons status Displays the extensions installed in the system, which are enabled for the current user, and which are disabled. Vim-Addons install extension-name Install an extension for the current user, that is, create a symbolic link
View help input: tab help, which can be opened on a new tab. jump to a topic: place the cursor over a label (e.g. | bars |) and press Ctrl-] to jump back: Type A CTRL-T or CTRL-O (repeat to continue backward) copying and deleting a Text object is a
Operations in VIM
I. Set the size-character MismatchSet ignorecase/set ICSet noignorecase/set noic2. Set to highlight and not show when searchingSet hlsearch/set HLSSet nohlsearch/set nohls3. Set to display matching points during the search process
In vim, the tab is automatically converted to a space.In vim, you sometimes need to convert tabs into spaces. Use the RET command (replace tab ).[Range] RET [AB]! [New-tabstop]For example, the tab line from the first line to the end of the file is
Use Vim to write c ++CodeBasically, there are not many completion plug-ins to choose from. I use omnicppcomplete. This plug-in relies on tags for completion, and the effect is unsatisfactory.
Clang complete was found some time ago, and the effect
Vim is an excellent open-source text editor. It is a very common text editing tool for Linux/Unix users. After one year and five days of waiting, we welcome the stable version of VIM 7.1. The revised version fixes a security issue and causes crash
Vim's learning curve is quite large (see the learning curve of various text editors). Therefore, if you see a lot of VIM command classification at the beginning, you will lose interest in this editor. The following article is translated from "Learn
Vim Quick Start
20:19:13 | classification: Linux | report | font size subscriptionVim has three modes: normal (visual command) mode, command line mode, and edit mode. Start vim and Press ESC in any mode to enter normal mode. In normal mode, enter:
Since the 70's, VI and Vim are very popular text editors among programmers. 5 years ago, I wrote an article named "100 Vim commands Every programmer shoshould know" and here is a reworked, updated version. enjoy!Basics
: E filename
Vim provides four folding modes: indent, Tag, syntax, and expression. Folding by indentation is not suitable for python, but for C #, if you do not set some settings, the folding effect is still unsatisfactory, so I modified the syntax file of the C
Http://coolshell.cn/articles/5426.html
Vim's learning curve is quite large (see the learning curve of various text editors). Therefore, if you see a lot of VIM command classification at the beginning, you will lose interest in this editor. The
Document directory
Configuration
The most useful commands
Useful plug-ins
Configure Python
Technorati label: vim
I made a note by collecting the contents of the online hosts.Most common configuration
Set nocompatible "allows vim to avoid some
Since VIM has been used for a long time, it has never been thought of as convenient and fast as VIM.
I thought for a moment, probably because I have always been dependent on the VIM editing mode.
This is no different from using other simple editors.
Nj/k/h/l
[Crtl] + f
[Ctrl] + B
0/Home
$/End
G
NG
Gg
N [Enter]
/Word
N
To continue searching for the next string named word.
N
: N1, n2s/word1/word2/g
For example: 1,100 s/man/MAN/g, search for man between 1 and 100 and replace it with
How to Use the vim command to move the cursor
It is worth mentioning that the pdf version of my vim tutorial has been completed. You can download it. Here is the download of csdn: csdn. If the download fails on the left, you can also enter the
Summary of Vim shortcuts and summary of Vim shortcuts
In July, I had to add more than one piece of water each month. Record the simplest shortcut key. (Add a little bit every day)
Alt + 4: move the cursor to the end of the row quickly;
Alt + 6: move
"/Etc/vim/vimrc is the configuration of all users ,~ /. Vimrc only affects a single user. /Usr/share/vim/vimrc is a hard link of/etc/vim/vimrc ($ ll/usr/share/vim/vimrc can be seen). Generally, only ~ /. Vimrc."Colors, plugins, and docs are all in
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