1, astyle Format code
Install Astyle and add the bin directory to the environment variable in VIMRC add the following setup code
"Call the Astyle program, do the code beautification
func codeformat ()
" Get the current cursor at the line
I
a/a
o/o
R +? Replace
0: The beginning of the current line of the file
$: End of current line of file
G: The last line of the file begins
1 + G to the first line
9 + G to line Nineth =: 9
DD: Delete a row
3DD: Delete 3 lines
YY: Copy a row
3
In Vim there is also the operation of the automatic formatting code, like the CTRL + Shift +f in Eclipse, which, although very powerful, usually destroys the original indentation of the Code,
So it's not recommended to use in a language such as
Introduction to Vim
To install the Vim method:
yum install -y vim-enhanced
yum install -y vim*
yum install -y vim"Vim-related packages will be installed, including vim-enhanced"Vim +n "n refers to the number of rows
This shortcut key is used in command-line mode:I means go into edit mode and operate at the cursor location.YY Copy the contents of the line where the cursor is5yy the contents of the next 5 rows, including the line where the cursor is copiedP
Range () is a new function used to generate a list containing a number sequence. Of course, it can also be used to generate row numbers:
"Add the row number for the first 30 rows: for I in range (31): Call setline (I, I.''. Getline (I): endfor
1. Vim operation command 1) Vim automatic directory completion
In the vim editing status (that is, the insert status), press Ctrl + X, and then press Ctrl + F to enter the directory auto-completion mode, which will be based on the directory in
I forgot to install the virtual machine version.
Install ubuntu-11.04-desktop-i386.
In the lab, the virtual machine does not go to the Internet for a long time and still fails. What is the net or bridge method?
The wireless network of the
I have read several installation methods from the Internet, but they are not clear enough, and the README of this project is too simple. As a result, the plug-in has been successfully installed for a long time.1. Install pysmell
Python Installation
I. Mobile
H, J, K, L corresponds to left, bottom, top, right
W move the cursor forward a word
B. move the cursor one word backward.
NW move cursor forward n words
NB moves the cursor n words backward
$ Move the cursor to the beginning of
Use Vim cs1_taglist
1. InstallationApt-Get install exuberant-ctags cs1_globalCppcomplete and taglist are to be downloaded from the extended list of www.vim.org.
Taglist:Http://www.vim.org/scripts/script.php? Script_id = 1,
Manual folding:ZfapYou will see that this section is replaced by a highlighted line of text. You have created a fold. | ZF | it is an operator, and | AP | it is a text object. You can use the | ZF | Operator together with any mobile command to
[Color = Blue] Set nocompatible "Disable VI compatibility mode syntax on" auto syntax highlight colorscheme Molokai "set color scheme set number" display row number set cursorline "highlight current row set rcategory" Open status Bar ruler set
VI/Vim basic usageThis article introduces the basic usage of VI (Vim), but it is enough for common users!
The VI editor is a standard editor for all UNIX and Linux systems. It is not inferior to any of the latest text editors. Here we just briefly
We already know that Vim is a powerful editor. On the Internet, there is an article titled "how to convert Vim into an IDE programming environment"Shows the power of vim. I used to worship it before, but I always felt that the time was not
We already know that Vim is a very powerful editor. On the Internet, there is an article titled "How to manually convert Vim into an IDE programming environment", which shows the power of vim. I used to worship it before, but I always felt that the
[Root @ Leo-desktop :~ /] # Cat. vimrc"NOTE: rename this file as. vimrc and copy it ~ /Bottom"Install/copy files under plugin to/usr/share/Vim/vim71/plugin/
Set nu "sets the row numberSet autoindent "Set automatic indentSet cindent "sets automatic
Reprinted please indicate from "LIU Da's csdn blog": http://blog.csdn.net/poechant
Let me call it a VIM-IDE, it sounds like a fight with the IDE of Eclipse, Visual Studio, xcode stream, more fun, you can call it vimide, isn't it more like
To turn
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