Gnuhpc
Source: http://www.cnblogs.com/gnuhpc/
1. Configuration under Vim:
wget Https://github.com/rkulla/pydiction/archive/master.zip
Unzip-q Master
MV Pydiction-master Pydiction
Mkdir-p ~/.vim/tools/pydiction
Cp-r Pydiction/after ~/.vim
CP Pydiction/complete-dict ~/.vim/tools/pydiction
Rm-f pydiction
Ensure that the file structure is as follows:
# tree ~/.vim/root/.vim├──after│ └──ftplugin│ └──python_pydiction.vim└──tools └──pydiction └── Complete-dict
Then edit ~/.VIMRC
# cat ~/.vimrcfiletype plugin Onlet g:pydiction_location = ' ~/.vim/tools/pydiction/complete-dict '
2. Python Console command line:
# ~/.bashrcexport pythonstartup= $HOME/.pythonstartup.py
#vim ~/.pythonstartup.py
Try: ImportReadLineImportRlcompleterImportatexitImportOSexceptImporterror:Print "Python Shell enhancement modules not available."Else: Histfile= Os.path.join (os.environ["HOME"],". Pythonhistory") ImportRlcompleter Readline.parse_and_bind ("Tab:complete") ifOs.path.isfile (histfile): Readline.read_history_file (histfile) atexit.register (Readline.write_history_file, Histfile)delOS, Histfile, ReadLine, Rlcompleter, atexitPrint "Python Shell History and tab completion is enabled."
Gnuhpc
Source: http://www.cnblogs.com/gnuhpc/
Auto-complete in Python command line and vim