In order to facilitate the setting of vim, write down this article record setup process and some resources, easy to consult later. (Non-tutorial)
First of all, Vim's configuration file originates from this blog, the blogger writes very well,
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.
②
Http://www.cnblogs.com/ShaneZhang/archive/2013/05/23/3094236.html
Method One
CTRL + V enters column edit mode, moves the cursor down or up, marks the beginning of the line that needs to be commented on, then presses the uppercase I (SHIFT+I),
After you install VIM, if you have not highlighted it, set the following way:
First, if there is no ~/.VIMRC, create
$vi ~/.VIMRC
Second, switch to insert mode, the following settings directly copied into:
Set AutoindentSet
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
No: Drop the option before a Boolean option, such as set number, set Nonumber custom vim:: Edit ~/.VIMRC Add your own command at the end of the command line, such as highlighting search results move the cursor H J k L Delete Delete whole line DD
use of ctags under Vim
1. Installation of Ctags
Source Installation:
Download source code./configureMakesudo make install
under Ubuntu or Debian:
sudo apt-get install ctags 2. tags file
Create tags
Ctags-r * or Ctags-r.
Configure VIMRC to
Reprint of the http://blog.csdn.net/king_on/article/details/8104235
Declaration of this digest from the network, the initial author is not clear, so did not leave the original link. If anyone knows, please tell them.
Vim is one of the best text
When using the Linux operation, will definitely use the Vim editor, about this editor will not do more introduction, you can go to Google a bit. Vim Editor's plugin is very much, this article introduces a VIM plug-in management tool pathogen. 1.Vim
Vim three modes: Command mode, insert mode, bottom line mode. Use ESC, I,: Toggle mode.
vim [path/] Target file name : Open if it exists, new and open if it does not exist.
Basic Steps : 1. Vim hello.c 2. Type I 3. Edition 4. Type [ESC] 5. Type: Wq
=================================linux VIM Replication ============================1. Copy1) Single-line copyIn command mode, move the cursor to the line that will be copied, and press "yy" to copy;2) Multi-line replicationIn command mode, move the
Vim is a well-known, powerful, highly customizable text editor similar to VI, which improves and adds many features on the basis of VI.As a Linux enthusiast, Vim is the most commonly used text editor, the default vim configuration file. VIMRC does
①vim Common Operationswww.vim.org1. Vim Working modeEnter VI filenameexit Input: Wqedit Mode Command (: Input later): Set NU Displays line numberInsert mode i/a/oCommand modeInsert mode (ESC returns command mode)edit mode:2. Insert Commanda
Linux Eighth session--------------------------------------------------------------------------------------------------------------- ------------------------------------42. VIM Basic ConceptVi:visual Interface, Text editorText editing type: line
Transferred from: https://www.cnblogs.com/yangjig/p/6014198.htmlIn the command state, use = = for the current row (double-click = two times), or n== (n is natural number) for multiple lines, to automatically indent the following n rows from the
VIM Displays the line number when it is opened by default, so that you can display the line number manually in command mode without having to edit it each time.To create a configuration file for a. vimrc.When Vim is started, the. vimrc file under
Take my Ubuntu 12.10 As an example. After Vim is installed, the python plug-in is provided.
ls /usr/share/vim/vim73/autoload/adacomplete.vim netrwFileHandlers.vim sqlcomplete.vimada.vim netrwSettings.vim syntaxcomplete.
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