python vimIDE环境
添加python的vim环境
到http://www.vim.org/scripts/script.php?script_id=790下载最新的python.vim
备份原有的文件
mv /usr/share/vim/vim72/syntax/python.vim /usr/share/vim/vim72/syntax/python.vim.ori
复制python.vim
cp python.vim /usr/share/vim/vim72/syntax/
添加环境变量
alias vi='vim'
python环境支持tab补全
# python
Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/lib64/python26.zip', '/usr/lib64/python2.6', '/usr/lib64/python2.6/plat-linux2', '/usr/lib64/python2.6/lib-tk', '/usr/lib64/python2.6/lib-old', '/usr/lib64/python2.6/lib-dynload', '/usr/lib64/python2.6/site-packages', '/usr/lib/python2.6/site-packages', '/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info']
>>>
将startup.py脚本放入/usr/lib64/python2.6/ 目录下
cp startup.py /usr/lib64/python2.6/
vi startup.py
#!/usr/sbin/env python
#python startup file
import sys
import readline
import rlcompleter
import atexit
import os
#tab completion
readline.parse_and_bind('tab: complete')
#history file
histfile = os.path.join(os.environ['HOME'],'.pythonhistory')
try:
readline.read_history_file(histfile)
except IOError:
pass
atexit.register(readline.write_history_file, histfile)
del os, histfile, readline, rlcompleter
vi .bashrc
export PYTHONSTARTUP=/usr/lib64/python2.7/startup.py
添加vim支持tab补全插件
到http://www.vim.org/scripts/script.php?script_id=850下载最新的Pydiction
mkdir mkdir -p ~/.vim/after/ftplugin/
mv pydiction/ ~/.vim
tree .vim
.vim
├── after
│ ├── ftplugin
│ │ └── python_pydiction.vim
│ └── python_pydiction.vim
└── pydiction
├── after
│ ├── ftplugin
│ │ └── python_pydiction.vim
│ └── python_pydiction.vim
├── complete-dict
├── pydiction.py
├── README
└── README.md
vi ~/.vimrc
filetype plugin on
let g:pydiction_location = '/root/.vim/pydiction/complete-dict'
let g:pydiction_menu_height = 20

添加自己喜欢的配色方案
到vim.org上去找自己喜欢的配色方案
例如:http://www.vim.org/scripts/script.php?script_id=1677
或者到github.com找别人的配色方案
https://github.com/tpope/vim-vividchalk
下载后放入/usr/share/vim/vim72/colors/目录下
配置.vimrc
colorscheme distinguished #后面为配色方案的名称
到网上搜索适合编程的字体
比如,Monaco.ttf,YaHei.Consolas.1.11b.ttf
在win7控制面板中安装字体,然后就可以在xhell中选择字体了
Monaco效果

Consolas效果

posted on 2014-09-24 13:39 Mr.michael 阅读(424) 评论(0) 收藏 举报
浙公网安备 33010602011771号