There may still be a lot of people who don't want to use VI/Vim in CLI to write things. However, when you get used to it, its efficiency is immeasurable. The figure below is clear at a glance. From now on, learning is no longer difficult.
Note:
Vim has been using the configuration file for more than three years and has been tossing for a while. Recently, I found that an ivim configuration file is not bad. The specific installation method is as follows:
First install exuberant catgs:
Sudo
Original article: Install vim and VIM in Ubuntu-kids not reading-iteye Technology website
Install Vim in Ubuntu, VIM in Ubuntu,
Run sudo apt-Get install vim-GTK.
Use Vim to edit files
You can use gvim to open Vim in graphic mode.
Vim can be applied to some popularProgramming LanguageBut is not enabled by default.
In command mode, we can use the following command to start the PHP Automatic completion function:: Set omnifunc = phpcomplete
#
Completephp
When writing some
Two modes:■ Normal mode (Normal Mode)■ Insert mode)
In insert mode, press escape to enter normal mode. In normal mode, press I to enter insert mode.
The insert mode is used to edit text. commands are generally used in Normal Mode:
Positioning:
■
Display Settings
SSH background settings: Edit-> setting-> color
Linux background settings:
Text Size: Ctrl +/-zoom in and out
Edit-> Configure the current file-> color
A simple. vimrc
CD/etc VI vimrc
It mainly implements automatic indentation, line
Vim creates a full-featured Ruby development environment.
1. autocomplpop -- Automatic prompt
: Http://www.vim.org/scripts/script.php? Script_id = 1, 1879After decompression, there will be three folders in The. Vim directory. In particular, do not
Configuration
Modify the. vimrc File
Set number # display row number filetype on # display file type set fileformat = UNIX # Set the file format to unixset Ts = 4 # Set the tab length to 4 set expandtab # Set the tab to use space set autoindent #
For binary file editing, Windows has a very good software winhex, which will make your life very simple. However, there seems to be no dedicated binary editor in Linux, but don't forget vim.Although Vim is not designed for Binary editing, it also
Let Vim use the Chinese help document
Finishing reprint, original address: http://blog.openrays.org/blog.php? Do = showone & tid = 282
Vim Chinese Document home page is: http://vimcdoc.sourceforge.net /. It translates the Help File of VIM
Multi-File Operations
Vim supports multi-file operations, including two methods:
1. open multiple files at the same time. In normal mode, enter:
: E → open a new file. The current file must be saved.: Buffers → list all open files in current vim.:
Plugin:
Taglist:I believe that everyone knows its name and is used to provide functions such as the function list of a single source code file.
Omnicppcomplete:Provides automatic completion of C ++ code
A. VIM:Quick Switch between. h and. cpp
Source insight is the most convenient tool for viewing code in windows. However, source insight does not have a Linux version. To facilitate code browsing and learning in Linux, we can use vim and csinsight to build the source insight in
I have installed the winmanager plug-in before, but I feel that it is not very good to use. Today, we accidentally discovered a better File Manager plug-in called nerdtree. First, the red box marks the nerdtree area:
Is it really amazing? I changed
In Windows, the default mode is GB encoding, while in VIM mode, the default mode is UTF-8 (gedit is also UTF-8 by default. Modified the configuration file so that Vim supports GB encoding.$ Vim ~ /. VimrcLet & termencoding = & EncodingSet
: S/vivian/sky/Replace the first vivian in the current row with sky: S/vivian/sky/g replace all vivian in the current row with sky: N, $ s/vivian/sky/Replace the first vivian from row n to row n as sky: N, $ s/vivian/sky/g replace all vivian values
When we use vim in windows, we often choose "Edit with Vim" from the context menu to open the file. However, files opened in this way will be opened in the new window, rather than in a new tab like Ultra Edit.
VIM 7.0 already supports tabs. How can
Previous Article http://www.cnblogs.com/amaoxiaozhu/archive/2012/03/23/2414007.html
This article is very helpful:
Http://blog.csdn.net/wooin/article/details/1858917
Zero, Code Completion
Extremely powerful functions, in editing mode
Ctrl + p or
Some advanced editors will contain macro functions, which are certainly not missing in vim. It is very convenient to use Macros in vim:
: Qx starts to record macros and saves the results to register xQ exit record mode@ X macro commands for playing
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