Vim/vi Mode of work
First, insert text
Command
Describe
I
Inserts text match either the current character
I
Inserts text at the beginning of a line
A
Add text after the current
In the previous section (http://blog.csdn.net/lu_embedded/article/details/76732965) we have downloaded and installed some plug-ins through Vundle, some of which can be used directly, some need to be configured, Some need to compile, below we Yi
Vim + Autocomplpop + clang_complete Build the C + + IDE VIM code hints, so vim can be comparable to the IDE Vim/gvim concise VIM training strategy Autocomplpop has appeared in the completion of the full installation of words AUTOC Omplpop plug-ins,
1. General mode
In general mode, you can copy and paste the newly opened interface such as:
X,x x to delete one character backwards, X to delete a character previouslyNX (n represents number) Delete n characters backwardsDD Delete when forwardD
Setting set wrap in. VIMRC is not effective today. It was later found that Gvim's configuration files were different from Vim's. No culture, it's terrible ...
First, there will be three files and folders under the current user directoryVim this
1, the location of the configuration fileUnder the directory/etc/, there is a name named
VIMRCFile, which is the public vim profile in the system and is valid for all users. In each user's home directory, you can create a private profile of your own,
several commands in the [VIM] Visual mode
Vim's visual mode allows us to select a text area and manipulate it. Vim has three visual modes for manipulating character text, line text, and block text, respectively. in Visual mode, many common-mode
Http://blog.sina.com.cn/s/blog_94a93cff0101b5gv.html
To replace text in VIM:1. Replace the contents of the current line:: s/from/to/(S-substitude): s/from/to/: Replaces the first from in the current row with the to. If the current row
1. Establish a location
(1) Unix
~/.vimrc
(2) Ms-windows
$HOME/_VIMRC
$VIM/_VIMRC
Note: ①.VIMRC is a point in front, indicating that the hidden files in Linux, you can directly open, if you need to see if you should use the LS-A command.
②
Ctags CV include header file index
At some point, in order to easily see the definition of the related structure or data type in the header file, we want to delve into the head file, where Vim is not as visible as the various IDE tools under
1, first install Vim (Linux is the Vi,vim is the VI Upgrade enhanced version): sudo apt-get installVim (before executing this command, it is best to configure Ubuntu with a software source and update it so that the version of Vim installed will be a
Vim+ctags+cscope
Note: First read this article before the best is already familiar with the Linux operation, because I did not step-by-step to tell you how to configure, and some specific usage is not detailed, just share some configuration
Vim file +line
For example:
root@xxx-ubuntu:/ics-android/ics-src/system/core/init# grep init.rc *-rn init.c:706:init_parse_config_file ("/
Init.rc "); util.c:79: * ("/dev/socket") as dictated in init.rc. This socket was inherited by the
Syntax highlighting does not require a plugin to be installed, just add a few lines to the. VIMRC configuration file:
Augroup Vimrcex
autocmd!
" Syntax highlighting for specific files
autocmd bufread,bufnewfile *.md set
Often forget some of the vim of the operation of the shortcut keys, it is now recorded, convenient for later review (this is defined as the right side of the text before the text left direction for the following):Left and RIGHT ARROW keys: K, J, H,
1. Download Pathogen and install
Pathogen's download address is: Https://github.com/tpope/vim-pathogen
Create a . Vim under ~ and then create bundles under. Vim AutoLoad
# CD ~
# mkdir. Vim
# mkdir. Vim/bundle
# mkdir. Vim/autoload
Bundle is the
VIM basic CommandsVim Editor is case sensitive
i editor enters text input mode, ESC exits edit mode
[Baskspace] Key (or press [ctrl-h] key) to delete text
[Return] key to the next line
[ESC] key into command mode, regardless of the
One, VIM: is the enhanced version of VI, Visual Interface improved, it is full screen editor, modal editor, text version processing tool.Vim Editor four modes: Edit mode (command line mode), input mode, last line mode, visual mode.Second, vim open
Original: https://www.ibm.com/developerworks/cn/linux/l-cn-vimcolumn/Before you beginThe human brain's processing of words is flat, so we browse articles, find materials, or refactor code, either horizontally or vertically, or use search to make
. cmd background, font, etc. configuration(1) Setting the background color44 50 59(2) Set Font size colorCourier New 20 White2.ubuntuvim configuration (ETC/VIM/VIMRC):(1) Configuration VIMRC"set to automatically load when files are
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.