Python: vim config, history file
This commit is contained in:
1
.bashrc
1
.bashrc
@@ -88,6 +88,7 @@ done
|
||||
export DOOMWADDIR=~/dist/games/doom/wad
|
||||
export DE=generic
|
||||
export CLICOLOR=1
|
||||
export PYTHONSTARTUP="$HOME/.pythonstartup"
|
||||
|
||||
# Disable Wine creating application shortcuts and, most importantly, hijack
|
||||
# file associations!
|
||||
|
||||
19
.pythonstartup
Normal file
19
.pythonstartup
Normal 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
|
||||
2
.vim/after/ftplugin/python.vim
Normal file
2
.vim/after/ftplugin/python.vim
Normal file
@@ -0,0 +1,2 @@
|
||||
setlocal shiftwidth=2
|
||||
setlocal expandtab
|
||||
Reference in New Issue
Block a user