Merge branch 'master' of github.com:hjp/dot

This commit is contained in:
Peter J. Holzer 2017-12-27 20:20:17 +01:00
commit ae60d0d62b
3 changed files with 49 additions and 20 deletions

48
.vimrc
View File

@ -1,17 +1,33 @@
se nu
se ai
se ruler
se sm
se secure
se exrc
colorscheme hjp
map!  >I<yypa/O
se tw=72
se sw=4
se list
se listchars=tab:»·,trail
se modeline
syntax on
se comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-,n:\|
set ai
" Disable (ab)use of X11 selection
set clipboard=
set comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-,n:\|
set expandtab
se nojoinspaces
set exrc
set list
set listchars=tab:»·,trail
set modeline
set nojoinspaces
set nrformats-=octal
set nrformats+=hex
set nu
set printoptions=paper:A4,formfeed:y,portrait:n,number:y,left:10mm,right:10mm
set ruler
set scrolloff=5
set secure
set sm
set sw=4
set tw=72
set viminfo='100,<50,s10,h,%
if has('reltime')
set incsearch
endif
colorscheme hjp
syntax on
map <F7> :cp
map <F8> :cn
map!  >I<yypa/O
autocmd FileType perl let perl_fold=1
autocmd FileType perl let perl_fold_blocks=1
autocmd FileType perl syntax on

View File

@ -28,8 +28,8 @@ then
TERM=xterm
fi
if [[ $TERM = xterm || $TERM = xterm-256color || $TERM = screen ]]
then
case "$TERM" in
xterm*|screen)
# indicated exit status by smiley (suggested by Stig Sandbeck Mathisen)
smiley="%b%(0?,%{%}:-),%{%}:-()%{%}%B"
prompt="%{]0;%m(%l)%n %~%}%B%m:%~ %T $smiley %h%# %b"
@ -39,9 +39,11 @@ then
# it doesn't work with konsole or gnome-terminal.
echo -n '[?67h'
stty erase 
else
;;
*)
prompt="%B%m:%~ %T %h%# %b"
fi
;;
esac
if [[ $TERM = xterm || $TERM = xterm-256color ]]
then

11
.zshrc
View File

@ -79,6 +79,17 @@ man () {
command man "$@"
}
venv() {
for d in venv/"$1" ve/"$1" ~/venv/"$1" "$1"
do
if [ -f "$d"/bin/activate ]
then
. "$d"/bin/activate
break
fi
done
}
source ~/.znewterm
# assume pseudo terminals are from a "safe" terminal