Fedora16 install vim and integrate some plug-ins (forPython)

Source: Internet
Author: User
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'

  1. 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:
  1. [Xinz @ fedora workshop] $ python-config
  2. 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.
  1. ./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)

  1. "Execute file being edited + E:
  2. Map : W :! /Usr/bin/env python %
  3. Syntax on
  4. Filetype indent plugin on
  5. Set modeline
  6. Set tabstop =4
  7. Set expandtab
  8. Set softtabstop =4
  9. Set shiftwidth =4
  10. Set nonumber
  11. Nnoremap : Set nonumber! : Set foldcolumn = 0
  12. Autocmd FileType python set omnifunc = pythoncomplete # Complete
  13. Let Tlist_Ctags_Cmd ='/Usr/local/bin/ctags'
  14. Map Tt: TlistToggle
  15. Set fileencodings = utf-8
  16. Set termencoding = utf-8
  17. Set encoding = utf-8

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.