Fedora 16 安装 vim 以及整合部分插件(for Python)

Linux大全评论1K views阅读模式
  1. su -c 'yum install 'python-devel''  

这是为了后面准备将vim绑定python的解析器(提供auto-complete功能),

安装成功后将会看到类似的内容:

  1. [xinz@fedora workshop]$ python-config   
  2. Usage: /usr/bin/python-config [--prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help]  

可以解决vim编译时绑定解析器可能遇到的问题:

(cached) checking Python's configuration directory... (cached)

can't find it!

compile and link flags for Python are sane... no: PYTHON DISABLED

1.Fedora16默认情况下只提供一个vim-minimal精简版工具,当前下载vim7.3的
src

2.解压,cd vim73

3.

  1. ./configure --enable-pythoninterp --enable-multibyte  
  1. " Execute file being edited with <Shift> + e:   
  2. map <buffer> <S-e> :w<CR>:!/usr/bin/env python % <CR>   
  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 <F2> :set nonumber!<CR>:set foldcolumn=0<CR>   
  12. autocmd FileType python set omnifunc=pythoncomplete#Complete   
  13.   
  14. let Tlist_Ctags_Cmd='/usr/local/bin/ctags'  
  15. map <leader>tt :TlistToggle<CR>   
  16.   
  17. set fileencodings=utf-8  
  18. set termencoding=utf-8  
  19. set encoding=utf-8  

企鹅博客
  • 本文由 发表于 2019年7月17日 12:32:41
  • 转载请务必保留本文链接:https://www.qieseo.com/210359.html

发表评论