There are many articles on the internet about how to configure the. vimrc file to achieve a key in vim to compile, looked more complex. I generally do not have any big program to write, General small program a single c file is OK, so simplified the
Cursor Movement:
4 Directions
K
Hl
J
Up one page: ctrl+f
Turn down one page: ctrl+b
Flip up half page: Ctrl+u
Turn down half page: ctrl+d
Skip to the beginning of the document: GG
Skip to end of document: G
Jump to line 23:23gg or: 2
Knock the database column code today, change really hard,
vim is found in the back of the command record function, ready, 1 minutes can be done.
must be recorded.
ext: http://blog.163.com/tunzao@126/blog/static/137115484201122601749849
record and
VIM Regular Expression bulk Modify text
Demand
TXT text of country area code and area, turn into plist file example used on iOS
Test.txt
+93:afghanistan
+355:albania
Amend it to
country
Afghanistan
code
+93
country
6, Vim profile User level: ~/.VIMRC (hidden, directly created) system level/ETC/VIM/VIMRC
Use vim--version to view details GCC related (emphasis) 1, GCC workflow GCC calls other processors to complete the process preprocessing-e (using
Some students like to use space to do indentation. So a lot of code start at the beginning with a continuous repeating space, some are four spaces, some even eight spaces. Uncle can not endure aunt.
Vim has some retab options for indenting all
In Linux we often encounter coding inconsistencies resulting in garbled display problem, in fact, VIM provides us with a very powerful code conversion commands, including document encoding and display coding.
Enter in VIM: Set fenc= encoding
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
after adding the following code in. VIMRC, restarting Vim enables you to press TAB to produce 4 spaces:
Set ts=4 (Note: TS is the abbreviation of TabStop, set tab width 4 spaces)Set Expandtab
for saved files, you can use the following method for
have been looking to see if there is a quick way to
Select all , but the internet is a lot of repetition, and wrong, such as:
1, $y, what it is. To write will also be written: 1, $y, but I tell you, written: 1, $y is all copied, not
all selected
Http://outofmemory.cn/code-snippet/4016/go-to-bottom-of-file-in-vim-editor
GG: Command moves the cursor to the beginning of the documentG: Command moves the cursor to the end of the document
VI Editor in command line mode, enter G to jump
"Ctags function":
Generate index files for source variables/objects, structures/classes, functions/interfaces, macros, etc. for quick positioning. There are currently 41 languages supported, only for example C + +: Ctags can produce index files of
VIM is the God of editors
1.vimtutor (Vim comes with)2.vim-adventures3.vim Configuration
Set nocompatible
set lines=40 columns=150
set number
set go=
set ruler
syntax on
set ShowCmd
syntax enable
set Background=dark
colorscheme Molokai
set t_co=25
Vim Full-screen plain text editorVim Use1 Vim file namelast-line modecommand----> input a append i insert O open (line break)command----> Last line: w Save: q! do not save exit: Wq Save and exit: N moves to the first line (n refers to a number): Set
1.1 Installing VIMTerminal Input Command InstallationInstalling Vim:yum install vim under CentOSUbuntu installation Vim:sudo Apt-get install vimNote: If you are not prompted for permission at the time of installation, you are need to being root to
Vi:o in next line edit modeA is behind the editor ==>endThe beginning of the GG fileShift + G End of File$ File Line End^ File line beginning ==> 0 also to line beginningU fallback/Search from front to back? Search forward from behindN Next go downN
Operation in command modeReplacement characters:%s/str1/str2/gDelete all content:%dDo not save exit:Q!Save exit:wq!Execute shell command:!command such as!ls-lInsert the shell command execution result on the next line:R!command such as R!dateSpecify
The following error occurred when installing VIM on Fedora today=================================================================Downloading packages:Running transaction CheckRunning Transaction TestTransaction Check
Dd
You can delete the current line of the cursor;
Ndd
n represents the number of rows, 3DD, deleted from the current cursor down 3 lines;
Di
Deletes the contents within the specified symbol, such as an
Vim configuration file is VIMRC, location under/etc/vimSet nu--sets the line number, where Nu is the abbreviatedSet autoindent--setting Auto IndentSet ts=4--sets the indentation of the TAB key to 4 spaces, where TS is the abbreviation for TabStop,
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