Let's start DIY ~!!
Execute command under Terminal: Whereis vim will list the path to the vim installation.
Otherwise execute sudo apt-get install vim with vim.
To successfully install VIM, simply create the. vimrc file in the user root directory and write the following information under the configuration file.
Like what:
"Quotation marks represent comments
Set Hlsearch "High brightness anti-white
Set backspace=2 "can be removed at any time with the rewind key
Set autoindent "Auto Indent
Set ruler to show the status of the last row
Set Showmode the state of the row in the lower left corner
Set Nu "can display line numbers at the front of each line
Set Bg=dark "show different shades of background
Syntax on "Grammar check, color display
Set wrap "Automatic wrapping
Set shiftwidth=4
Set tabstop=4
Set softtabstop=4
Set Expandtab "Replace tab with the appropriate number of spaces
Set Smartindent
##### #下面可根据自己的需要, can not choose #############
Set Guifont=dorid Sans Mono:h14:uft8 "Gvim font settings
Set Encoding=utf8 "Sets the internal code to UTF8
Set Fileencoding=utf8 "currently edited file encoding
Set FILEENCODINGS=UFT8-BOM,UTF8,GBK,GB2312,BIG5 "Open a file that supports encoding
"Resolving Consle output garbled
Language Messages Zh_cn.utf-8
"Fix Menu garbled
SOURCE $VIMRUNTIME/delmenu.vim
SOURCE $VIMRUNTIME/menu.vim
First, how to install the Phpcomplete plug-in
If it is more than VIM7.0, do not need to download Phpcomplete.vim this plugin, because the installation comes with, in the directory/usr/share/vim/vim73/autoload/phpcomplete.vim.
Add such two lines to the ~/.VIMRC:
FileType plugin on
Autocmd FileType PHP Set omnifunc=phpcomplete#completephp
How to use:
VI index.php
After inserting a section of PHP code, for example:
Htmlsp
First press the ctrl+x into the ^x mode, and then press Ctrl+o, you can see the prompt list box, as well as the corresponding function, as well as corresponding functions such as parameters and so on
CTRL + N, ctrl+p up and down Select, ESC to cancel the prompt
[attachment=28884]
Second, how to install PHP documentor plugin
http://www.vim.org/scripts/script.php?script_id=1355
According to the installation examples provided by the official website, we do the following:
Download Php-doc.vim
CP./php-doc.vim/usr/share/vim/vim73/autoload/php-doc.vim
Install details
Installation
=========
For example include into your. VIMRC:
VI ~\.VIMRC
Source/usr/share/vim/vim73/autoload/php-doc.vim
Inoremap <C-P> <esc>:call phpdocsingle () <cr>i
Nnoremap <C-P>: Call Phpdocsingle () <CR>
Vnoremap <C-P>: Call Phpdocrange () <CR>
How to use:
In the function definition Comment press Ctrl+p
[attachment=28886]
third, how to install the Nerdtree plug-in
http://www.vim.org/scripts/script.php?script_id=1658
Then unzip, unzip the Plugin,doc,syntax,nerdtree_plugin four directories to the/usr/share/vim/vim73/directory, you can complete the installation.
After entering vim: Nerdtree Open
How to use
1, in the terminal interface, input vim
2, Input: Nerdtree, enter
3, enter the current directory of the tree-type interface, through the H,J key or keypad up and down, you can move the selected directory or file
4, press the U key to the parent directory, press the O key to open or close the file. There is a + sign in front of the directory, press ENTER to expand the directory, the file is preceded by a-number, press ENTER to display the contents of the file in the right window, and the focus of the cursor to the right.
5, CTR+W+H cursor focus left tree directory, CTRL+W+L cursor focus to the right file display window. Press ctrl+w multiple times, the cursor automatically switches in the left and right window
6, cursor focus to the left of the tree-shaped window, pressed? Pop Nerdtree's help, press again? Turn off help display
7, Input: Q Enter, close the window where the cursor
Picture upload number limit, do not show the effect. Do as you can!!!
Iv. How to install Neocomplcache code Auto-complete function hint (support c/c++,java,python,php,javascrip many languages)
http://www.vim.org/scripts/script.php?script_id=2620
Then unzip, unzip and then copy the Autoload,plugin,doc three directories to the/usr/share/vim/vim73/
Add content to the ~/.VIMRC file
If &term== "Xterm"
Set T_co=8
Set T_SB=^[[4%DM
Set T_SF=^[[3%DM
endif
Let G:neocomplcache_enable_at_startup = 1
Five, how to install the zencodeing caused by the United States in the industrial 13-magnitude earthquake super weapon
http://www.vim.org/scripts/script.php?script_id=2981 Download get
Copy three directories to/usr/share/vim/vim73/after decompression
Method Two
Create a ~/. Vim folder under the user's root directory, and put the three directories that are pressurized to this folder.
To test whether the installation was successful:
Input html:4s
Hold down CTRL and press "Y" and "," to see what happened? Are you shocked??
Above plug-in installation must reboot vim to take effect
Original address: http://bbs.php100.com/simple/?t370371.html
linux+ Environment uses VIM to build php+ide