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

This commit is contained in:
Peter J. Holzer 2017-10-16 18:02:03 +02:00
commit 87fd586248
3 changed files with 43 additions and 21 deletions

44
.vimrc
View File

@ -1,22 +1,32 @@
se nu set ai
se ai " Disable (ab)use of X11 selection
se ruler set clipboard=
se sm set comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-,n:\|
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 expandtab 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 scrolloff=5
set secure
set sm
set sw=4
set tw=72
set viminfo='100,<50,s10,h,%
syntax on
if has('reltime') if has('reltime')
set incsearch set incsearch
endif endif
set nrformats-=octal colorscheme hjp
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 TERM=xterm
fi fi
if [[ $TERM = xterm || $TERM = xterm-256color || $TERM = screen ]] case "$TERM" in
then xterm*|screen)
# indicated exit status by smiley (suggested by Stig Sandbeck Mathisen) # indicated exit status by smiley (suggested by Stig Sandbeck Mathisen)
smiley="%b%(0?,%{%}:-),%{%}:-()%{%}%B" smiley="%b%(0?,%{%}:-),%{%}:-()%{%}%B"
prompt="%{]0;%m(%l)%n %~%}%B%m:%~ %T $smiley %h%# %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. # it doesn't work with konsole or gnome-terminal.
echo -n '[?67h' echo -n '[?67h'
stty erase  stty erase 
else ;;
*)
prompt="%B%m:%~ %T %h%# %b" prompt="%B%m:%~ %T %h%# %b"
fi ;;
esac
if [[ $TERM = xterm || $TERM = xterm-256color ]] if [[ $TERM = xterm || $TERM = xterm-256color ]]
then then

10
.zshrc
View File

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