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 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 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 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

11
.zshrc
View File

@ -79,6 +79,17 @@ man () {
command 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 source ~/.znewterm
# assume pseudo terminals are from a "safe" terminal # assume pseudo terminals are from a "safe" terminal