Python: vim config, history file

This commit is contained in:
2019-01-05 16:45:50 +01:00
parent 5cf53ab722
commit 8f73d9cd0f
3 changed files with 22 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
def init_prompt():
try:
import readline
import rlcompleter
except ImportError:
return
import os
histfile = os.path.join(os.environ.get('HOME', ''), '.pythonhistory')
try:
readline.read_history_file(histfile)
except IOError:
pass
import atexit
atexit.register(readline.write_history_file, histfile)
init_prompt()
del init_prompt