python自动补全软件_python的tab自动补全

很久不写blog了。

最近发现python的自动补全是个好东西。

分享一下。

直接粘贴了。

——————————

#mkdir -p ~/.vim/after/ftplugin/

#mkdir -p ~/.vim/bundle/pydiction/

#unzip pydiction-1.2.3.zip

#cd pydiction

#cp after/ftplugin/python_pydiction.vim ~/.vim/after/ftplugin/

#cp complete-dict ~/.vim/bundle/pydiction/

#cp pydiction.py ~/.vim/bundle/pydiction/

#vim ~/.vimrc

filetype plugin on

let g:pydiction_location = ‘~/.vim/bundle/pydiction/complete-dict’

let g:pydiction_menu_height = 3

python交互模式下

#cat python-tab-completion.sh

#!/bin/bash

cat >> ~/.python-tab-completion.py

#!/usr/bin/env python

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

EOF

echo ‘export PYTHONSTARTUP=~/.python-tab-completion.py’ >> ~/.bashrc

#bash python-tab-completion.sh

文章知识点与官方知识档案匹配,可进一步学习相关知识Python入门技能树首页概览215682 人正在系统学习中 相关资源:板式家具数控开料机补板/补单软件–支持导出NC代码_NC代码-智能…

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2020年11月18日
下一篇 2020年11月18日

相关推荐