Use (update) vim on Fedora and integrate some plug-ins (forPython). Note the following: 0. preparation in advance: 0.1 'python-config' tool, fedora provides the installation package 'python-devel 'Su-C' yuminstall 'python-devel' 'to bind vim to python later.
Use (update) vim on Fedora and integrate some plug-ins (for Python) as follows:
0. prepare in advance:
0.1 'python-config' tool, Fedora provides the installation package 'python-devel'
- Su-c'Yum install'Python-devel''
This is to bind vim to the python Parser (providing the auto-complete function ),
After the installation is successful, you will see similar content:
- [Xinz @ fedora workshop] $ python-config
- Usage:/usr/bin/python-config [-- prefix | -- exec-prefix | -- includes | -- libs | -- cflags | -- ldflags | -- extension-suffix | -- help]
It can solve problems that may occur when you bind a parser DURING vim Compilation:
(Cached) checking Python's configuration directory... (cached)
Can't find it!
Compile and link flags for Python are sane... no: PYTHON DISABLED
1. Fedora16 provides only one vim-minimal lite tool by default. Currently, src of vim7.3 is downloaded.
2. decompress the package and run cd vim73.
3.
- ./Configure -- enable-pythoninterp -- enable-multibyte
Note: The two options are to bind vim to the python parser and allow vim to display Chinese characters normally.
You can use
./Configure -- help
4. make & sudo make install
After the installation is complete, run vim -- version to view the + python + multi_byte
5. Because the vim plug-in is not used by all liunx/unix users by default, you must create a file for plug-in configuration :~ /. Vimrc.
$ Vim
: Echo & runtimepath
You will see the configuration path of the load to the vim runtime.
If you want to load the default (share) Plug-in configuration, you can use
Set runtimepath + =/usr/local/share/vim/vim73
6. Sort out the current configuration (edit in ~ /. Vimrc)
- "Execute file being edited + E:
- Map : W :! /Usr/bin/env python %
- Syntax on
- Filetype indent plugin on
- Set modeline
- Set tabstop =4
- Set expandtab
- Set softtabstop =4
- Set shiftwidth =4
- Set nonumber
- Nnoremap : Set nonumber! : Set foldcolumn = 0
- Autocmd FileType python set omnifunc = pythoncomplete # Complete
- Let Tlist_Ctags_Cmd ='/Usr/local/bin/ctags'
- Map Tt: TlistToggle
- Set fileencodings = utf-8
- Set termencoding = utf-8
- Set encoding = utf-8