1. 如何安装vim-python插件

用户自己的插件放在 ~/.vim/ftplugin 下面,插件的文件名应当是 <文件类型.vim>. 针对同一个文件类型有很多插件的, 可以在上述目录下建立子目录 (和文件类型一致), 例如建立 ~/.vim/ftplugi/tex 目录,然后把有关 tex 和 latex 的插件都放在这个目录中,这时候子目录下的文件名可以随便取,只要以 .vim 为后缀即可.
系统级的插件放在 /usr/local/share/vim/vim74/ftplugin 下面 (这是你自己编译安装的 vim,而且是配置在 /usr/local 中,系统自带的 vim 则放在 /usr/share/vim/vim74/ftplugin 下面,这裏的 74 是 vim 的版本号 7.4 的缩写,其他版本类似)。

2. 安装linux时会预装python和vim么

系统安装盘里都有,并且一般缺省是安装的

3. vim不支持python,是不是缺少什么东西

问题可能来自两方面: vim 没有把 python 支持特性编译进来;或者编译支持的 python 与本地安装的版本不兼容。

1. 只有编译的时候带了 python 支持的 vim 才能使用相关的功能。要想知道 vim 是否带了编译时的支持,使用:

:version

看有没有 +python 之类的字样。如果是 + 号,表示支持,如果是 - 号就是不支持(像我截图中标出的 postscript 就是 -)。python 代表 python 2,python3 表示 python 3 的支持情况。

pythonthreedll=python35.dll

这样你的电脑里必需要安装 python 3.5 才可以配合 vim 使用。注意一定要是标准版的才行,定制版(比如 Anaconda)是不行的。

vim 和 python 有相当深入的交互。除了简单的交互执行 python 语句和返回结果外,vim 的内部的数据结构(比如缓冲区、窗口之类的)和 vim-script 脚本的执行接口也全对 python 开放。因此对 python 各版本支持的灵活性就要差一些,需要在编译阶段就确定。

如果想兼容你电脑上已有的 python,需要在你的电脑上重新编译 vim,这通常比较困难。在你的电脑上配置两套 python 环境要相对容易很多。或者如果你对 python 的要求并不高的话,就用 vim 支持的那版也行。

以上的回答假定您已经对 python 有一定的了解,并且可以自己正确的安装和配置 python 的环境。如果抛开 vim,python 都不能正确执行,那么需要先解决 python 的安装和配置问题。

4. ubuntu怎么给vim添加python支持

如未安装vim,使用下面命令安装:

[python] view plain
sudo apt-get install vim

在用户目录下创建.vim目录,其下创建bundle目录:

[python] view plain
mkdir .vim\bundle

安装Bundle/Vundle:

[python] view plain
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

创建或编辑用户目录下的.vimrc文件,添加如下内容:

[python] view plain
set nocompatible
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()

" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'

" The bundles you install will be listed here
Bundle 'scrooloose/nerdtree'
Bundle 'davidhalter/jedi-vim'

filetype plugin indent on

" The rest of your config follows here.

augroup vimrc_autocmds
autocmd!
" highlight characters past column 120
autocmd FileType python highlight Excess ctermbg=DarkGrey guibg=Black
autocmd FileType python match Excess /\%120v.*/
autocmd FileType python set nowrap
augroup END

" NerdTree Shortcut.
map <f2> :NERDTreeToggle<cr>

" automatically change window’s cwd to file’s dir
set autochdir

" Prefer spaces to tabs
set tabstop=4
set shiftwidth=4
set expandtab
set nu!

打开vim,键入命令“:BundleInstall”,等待自动安装插件完成(下面显示“done”)

在vim中键入命令“:BundleList”可以查看安装的插件。

5. 为什么vim可以使用python安装版,不能使用绿色版

1. 使用Python自带的来IDLE 在开始-->程序-->Python2.5(视你安装源的版本而不同)中找到IDLE(Python GUI),
点击后弹出如下窗体:
在>>>提示符后输入代码,回车,就可以执行此代码。
IDLE支持语法高亮,支持自动缩进,支持方法提示,不过提示的很慢。
2. 在命令行窗口上运行 这种方法的前提是:你在系统的PATH变量中配置了Python的安装路径。
右键我的电脑-->属性-->高级-->环境变量,在系统变量列表中找到Path项,点击编辑按钮,在其中追加“C:\Python25;”(路径及版本视你安装而定),保存退出。
开始-->运行-->输入cmd,回车,开启一个CMD窗口。

6. vim 用什么安装python的库

如未安装vim,使用下面命令安装:

[python] view plain
sudo apt-get install vim

在用户目录下创建.vim目录,其下创建bundle目录:

[python] view plain
mkdir .vim\bundle

安装Bundle/Vundle:

[python] view plain
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

创建或编辑用户目录下的.vimrc文件,添加如下内容:

[python] view plain
set nocompatible
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()

" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'

" The bundles you install will be listed here
Bundle 'scrooloose/nerdtree'
Bundle 'davidhalter/jedi-vim'

filetype plugin indent on

" The rest of your config follows here.

augroup vimrc_autocmds
autocmd!
" highlight characters past column 120
autocmd FileType python highlight Excess ctermbg=DarkGrey guibg=Black
autocmd FileType python match Excess /\%120v.*/
autocmd FileType python set nowrap
augroup END

" NerdTree Shortcut.
map <f2> :NERDTreeToggle<cr>

" automatically change window’s cwd to file’s dir
set autochdir

" Prefer spaces to tabs
set tabstop=4
set shiftwidth=4
set expandtab
set nu!

打开vim,键入命令“:BundleInstall”,等待自动安装插件完成(下面显示“done”)

在vim中键入命令“:BundleList”可以查看安装的插件。

7. 如何配置vim的python开发环境

这是一个相当不错的 Python 代码自动完成的脚本。
可以实现下面python代码的自动补全:
简单python关键词补全
python 函数补全带括号
python 模块补全
python 模块内函数,变量补全
from mole import sub-mole 补全

8. ubuntu怎么安装有python3支持的vim

如未安装vim,使用下面命令安装:
sudo apt-get install vim

在用户目录下创建.vim目录,其下创建bundle目录:
mkdir .vim\bundle

安装Bundle/Vundle:
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

创建或编辑用户目录下的.vimrc文件,添加如下内容:
set nocompatible
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()

" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'

" The bundles you install will be listed here
Bundle 'scrooloose/nerdtree'
Bundle 'davidhalter/jedi-vim'

filetype plugin indent on

" The rest of your config follows here.

augroup vimrc_autocmds
autocmd!
" highlight characters past column 120
autocmd FileType python highlight Excess ctermbg=DarkGrey guibg=Black
autocmd FileType python match Excess /\%120v.*/
autocmd FileType python set nowrap
augroup END

" NerdTree Shortcut.
map <f2> :NERDTreeToggle<cr>

" automatically change window’s cwd to file’s dir
set autochdir

" Prefer spaces to tabs
set tabstop=4
set shiftwidth=4
set expandtab
set nu!

打开vim,键入命令“:BundleInstall”,等待自动安装插件完成(下面显示“done”)

在vim中键入命令“:BundleList”可以查看安装的插件。

9. 怎么装python编辑器vim

增加tab键长度为4的,在/etc/vimrc里面设置set tabstop=4,效果如下
设置语法高亮,主要是设回置syntax on
下载安装vundle,如下目录

安装好之答后,用VundleInstall安装nerdtree,

上面显示正在安装,之后安装完成就可以看到