ITPub博客

首页 > IT职业 > IT图书 > python tab键补全

python tab键补全

IT图书 作者:cookye 时间:2021-09-09 09:27:02 0 删除 编辑

#!/usr/bin/env python


# python tab 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

cat /root/.vimrc


set shiftwidth=4

set tabstop=4

set expandtab

set softtabstop=4

set pastetoggle=

set autoindent

autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class

set smarttab

set list

set list listchars=tab:


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1369/viewspace-2809938/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: GO PHP7
请登录后发表评论 登录
全部评论

注册时间:2019-04-15

  • 博文量
    91
  • 访问量
    502