diff --git a/.vimrc b/.vimrc
index 1df75f3..a28f8b4 100644
--- a/.vimrc
+++ b/.vimrc
@@ -36,6 +36,7 @@ endif
 map <F7> :cp
 map <F8> :cn
 map!  >I<yypa/O
+map! [27;5;101~ >I<yypa/O
 autocmd FileType perl let perl_fold=1
 autocmd FileType perl syntax on
 
@@ -49,3 +50,6 @@ autocmd FileType javascript set sw=2
 autocmd FileType html set sw=2
 
 autocmd FileType crontab set tw=0
+
+autocmd BufRead,BufNewFile redmine*.txt set filetype=textile
+autocmd FileType textile set tw=0 linebreak
diff --git a/.zlogin b/.zlogin
index 0921d46..5a75948 100644
--- a/.zlogin
+++ b/.zlogin
@@ -1,13 +1,7 @@
 #
-# $Id: .zlogin,v 1.9 2003-08-10 17:09:17 hjp Exp $
-#
 # this is sourced for login shells after .zshrc
 #
 mesg y
-if [ "`uname`" = "HP-UX" ]
-then
-	ps -fu $LOGNAME
-fi
 date
 uptime
 
diff --git a/.zshenv b/.zshenv
index a70b7f1..59d3a17 100644
--- a/.zshenv
+++ b/.zshenv
@@ -30,73 +30,9 @@ export DEBEMAIL=hjp@hjp.at
 export DEB_SIGN_KEYID=4ED25B463C8FC154D8189E64F20E485112FE285D
 export ACK_COLOR_FILENAME='blue on_white'
 
-
-# don't rely on a sane path at this point:
-for i in /usr/bin/preppath /usr/local/bin/preppath
-do
-    if [ -x $i ]
-    then
-    	preppath=$i
-	break;
-    fi
-done
-
-if [ -n "$preppath" ]
-then
-    if [ -r /etc/PATH ]
-    then
-	PATH=$($preppath $(cat /etc/PATH) )
-    fi
-
-    # first prepend important stuff - in order of increasing priority:
-
-    setopt NULL_GLOB
-
-    PATH=`$preppath -c /usr/bin/X11:/usr/games:/usr/contrib/bin`
-    PATH=`$preppath -c /bin:/usr/bin`
-    PATH=`$preppath -c /usr/sbin:/sbin`
-    PATH=`$preppath -c /usr/local/sbin:/usr/local/bin`
-    `$preppath -c -e /usr/local/node-v8.9.4-linux-x86/bin`
-    `$preppath -c -e /usr/local/node-v8.9.4-linux-x64/bin`
-    `$preppath -c -e -r /usr/lib/go-1.*/bin`
-    `$preppath -c -e -r /usr/local/go-1.*/bin`
-    `$preppath -c -e -r $HOME/go/bin`
-    PATH=`$preppath -c $HOME/scripts`
-    PATH=`$preppath -c $HOME/bin/hosts:$HOME/bin`
-
-    # then append less important stuff
-    PATH=`apppath -c /usr/local/www/offline/devel.fiw/bin`
-
-    unsetopt NULL_GLOB
-fi
-
-if [ -r /etc/MANPATH ]
-then
-	MANPATH=`cat /etc/MANPATH`:$MANPATH
-else
-	ALL_PATH=/usr/local/qmail/man:/usr/man:/usr/local/man:/usr/X11R6/man:/usr/share/man:/usr/local/pgsql/man:/var/qmail/man:/usr/local/rrdtool-1.0.35/man
-	NEW_PATH=""
-
-	for i in ${(s/:/)ALL_PATH}
-	do
-		if test -d "$i"
-		then
-			case "$NEW_PATH" in
-			$i:*|*:$i|*:$i:*) ;;
-			*)
-				if test -z "$NEW_PATH"
-				then
-					NEW_PATH=$i
-				else
-					NEW_PATH=$NEW_PATH:$i
-				fi
-			esac
-		fi
-	done
-	MANPATH=$NEW_PATH
-fi
-export MANPATH
-
+# Fix up locale. Must do this early or we get a lot of warnings if a
+# locale isn't installed.
+# Assume that locale and grep are in the PATH.
 
 case "`uname -sr`" in
 Linux*)
@@ -120,10 +56,58 @@ Linux*)
 	    fi
 	    export LANG
 	fi
-	# export LC_TIME=de_AT # don't remember what that was for
+        for i in LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL
+        do
+            c=$(eval "echo \$$i")
+            if [ -n "$c" ]
+            then
+                r=$(locale -a | grep "${c/UTF-8/utf8}")
+                if [ -z "$r" ]
+                then
+                    unset $i
+                fi
+            fi
+        done
 	;;
 esac
 
+
+# don't rely on a sane path at this point:
+for i in /usr/bin/preppath /usr/local/bin/preppath
+do
+    if [ -x $i ]
+    then
+    	preppath=$i
+	break;
+    fi
+done
+
+if [ -n "$preppath" ]
+then
+    # first prepend important stuff - in order of increasing priority:
+
+    setopt NULL_GLOB
+
+    PATH=`$preppath -c /usr/bin/X11:/usr/games:/usr/contrib/bin`
+    PATH=`$preppath -c /bin:/usr/bin`
+    PATH=`$preppath -c /usr/sbin:/sbin`
+    PATH=`$preppath -c /usr/local/sbin:/usr/local/bin`
+    `$preppath -c -e /usr/local/node-v8.9.4-linux-x86/bin`
+    `$preppath -c -e /usr/local/node-v8.9.4-linux-x64/bin`
+    `$preppath -c -e -r /usr/lib/go-1.*/bin`
+    `$preppath -c -e -r /usr/local/go-1.*/bin`
+    `$preppath -c -e -r $HOME/go/bin`
+    PATH=`$preppath -c $HOME/scripts`
+    PATH=`$preppath -c $HOME/bin`
+    PATH=`$preppath -c $HOME/bin/hosts`
+    PATH=`$preppath -c $HOME/bin/hosts/*(/)`
+
+    # then append less important stuff
+    PATH=`apppath -c /usr/local/www/offline/devel.fiw/bin`
+
+    unsetopt NULL_GLOB
+fi
+
 case "$LANG" in
 *.iso88591)
 	export LESSCHARSET=latin1
@@ -192,23 +176,8 @@ case "$FQDN" in
    *.hjp.at)
 	export NNTPSERVER=news.luga.at
 	;;
-   *.wsr.ac.at)
-	export NNTPSERVER=news.wsr.ac.at
-	;;
 esac
 
-case "$FQDN" in
-   pashkan.wsr.ac.at)
-	export LD_LIBRARY_PATH=`preppath -v LD_LIBRARY_PATH /usr/local/lib`
-	;;
-    hrunkner.hjp.at)
-        export LD_LIBRARY_PATH=`apppath -v LD_LIBRARY_PATH /usr/lib/jni`
-        ;;
-   *.wsr.ac.at)
-	;;
-esac
-
-
 export TABLE_DELIMITER='|'
 
 if [ -d /usr/local/pgsql/data/ ]
@@ -238,36 +207,6 @@ then
 fi
 
 case "$FQDN" in
-   shalmaneser.wsr.ac.at)
-	export WZRP_CONN=~/.dbi/fiwssd
-	;;
-   pashkan.wsr.ac.at)
-	export WZRP_CONN=~/.dbi/fiwdevel
-	;;
-   algernon.wsr.ac.at)
-	export WZRP_CONN=~/.dbi/fiwssd
-	;;
-   enmetena.wsr.ac.at)
-	export WZRP_CONN=~/.dbi/fiwdevel
-	;;
-esac
-
-case "$FQDN" in
-    shalmaneser.wsr.ac.at|pashkan.wsr.ac.at)
-	export  PERL5LIB=`apppath -c -v PERL5LIB ~/lib/perl5 /usr/local/www/offline/$USER.fiw/lib/perl5 /usr/local/www/offline/dal.fiw/lib/perl5`
-	PATH=`apppath -c /usr/local/www/offline/$USER.fiw/bin /usr/local/www/offline/dal.fiw/bin`
-	;;
-esac
-
-case "$FQDN" in
-   algernon.wsr.ac.at)
-	export PGHOST=$FQDN
-        export PGUSER=fiw
-	;;
-   pashkan.wsr.ac.at)
-	export PGHOST=$FQDN
-        export PGUSER=fiw
-	;;
     teleute.wsr.ac.at)
 	export PGHOST=wds.wifo.ac.at
         ;;
@@ -279,26 +218,11 @@ case "$FQDN" in
 	;;
 esac
 
-case "$FQDN" in
-   tsimri.wsr.ac.at)
-        export GET_PASS_FILES="/home/hjp/wrk/admin/info/pwd_work.gpg /home/hjp/Notes/pw.gpg"
-	;;
-esac
-
 if [ -f ~/perl5/perlbrew/etc/bashrc ]
 then
     source ~/perl5/perlbrew/etc/bashrc
 fi
 
-case "$FQDN" in
-   oro.wsr.ac.at)
-        cleansing=~/wrk/wds/Software/WDS/Module/30_CLEANSING
-        $(preppath -e -v PYTHONPATH -c $cleansing/lib)
-        $(preppath -e -v PYTHONPATH -c $cleansing/system/app/extraction)
-	;;
-esac
-
-
 case "$FQDN" in
    *.wsr.ac.at)
         if [ -z "$GIT_AUTHOR_EMAIL" ]
