vim 启动 python的自动补全

如果是VIM7.3,不需要再下载 pythoncomplete.vim 这个插件,因为安装时自带了。

但是, 必须保证编译安装 VIM 的时候启用了 Python 特性, 即:

  1. ./configure --with-features=huge --enable-pythoninterp=yes 
我们可以在vim autoload 目录下看到


在 ~/.vimrc 中添加这样两行

  1. filetype plugin on  
  2. autocmd FileType python set omnifunc=pythoncomplete#Complete 
  1. import sys  
  2. print sys. 
 此时, 按下 Ctrl+x, Ctrl+o, 就能看到提示列表框,以及对应的 docstring.Ctrl+n, Ctrl+p 来上下选择

ESC 来取消提示框。

转载于:https://www.cnblogs.com/lyyyuna/archive/2013/04/18/4123909.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要在ZSH中启用Python自动补全功能,您可以按照以下步骤进行操作: 1. 首先,确保您已经安装了ZSH和Python。 2. 下载并安装zsh-autosuggestions插件,可以使用以下命令:git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions。 3. 打开.zshrc文件,可以使用vim ~/.zshrc命令进行编辑。 4. 找到plugins=(git)这一行,如果没有该行,请将其添加进去。 5. 将该行修改为如下形式:plugins=(git zsh-autosuggestions)。 6. 保存并关闭.zshrc文件。 7. 最后,重新启动ZSH终端,可以使用source ~/.zshrc命令来使更改生效。 这样,您就成功启用了ZSH中Python自动补全功能。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [wine_env:WINE虚拟环境经理](https://download.csdn.net/download/weixin_42115003/18192224)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [oh-my-zsh: shell自动补全 autocomplete](https://blog.csdn.net/hfcaoguilin/article/details/125927597)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [zsh+oh-my-zsh+命令行自动补全](https://blog.csdn.net/marina_1/article/details/120863279)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值