From 04bce7c357b7d6722a98c4a15b8179e40fc74ec5 Mon Sep 17 00:00:00 2001
From: "Peter J. Holzer" <hjp@wsr.ac.at>
Date: Sun, 19 Feb 2017 10:20:24 +0100
Subject: [PATCH 1/7] Merge .vimrc from mri

---
 .vimrc | 41 +++++++++++++++++++++++++----------------
 1 file changed, 25 insertions(+), 16 deletions(-)

diff --git a/.vimrc b/.vimrc
index a43c1b9..5a61ccf 100644
--- a/.vimrc
+++ b/.vimrc
@@ -1,17 +1,26 @@
-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=hex
+set nu
+set printoptions=paper:A4,formfeed:y,portrait:n,number:y,left:10mm,right:10mm
+set ruler
+set secure
+set sm
+set sw=4
+set tw=72
+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

From 2c1919752ec1cc496ba40effd843d492fb04895c Mon Sep 17 00:00:00 2001
From: "Peter J. Holzer" <hjp@wsr.ac.at>
Date: Wed, 16 Aug 2017 16:32:08 +0200
Subject: [PATCH 2/7] Store marks, registers, buffers in viminfo, ignore hls

---
 .vimrc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.vimrc b/.vimrc
index 5a61ccf..18f781b 100644
--- a/.vimrc
+++ b/.vimrc
@@ -16,6 +16,7 @@ set secure
 set sm
 set sw=4
 set tw=72
+set viminfo='100,<50,s10,h,%
 colorscheme hjp
 syntax on
 map <F7> :cp

From 5e59c96b35ab0e631399aa074fd562557d6b0407 Mon Sep 17 00:00:00 2001
From: "Peter J. Holzer" <hjp@wsr.ac.at>
Date: Wed, 27 Sep 2017 09:40:01 +0200
Subject: [PATCH 3/7] Add shell function venv to activate python virtual
 environment

---
 .zshrc | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/.zshrc b/.zshrc
index 70fd666..7277db2 100644
--- a/.zshrc
+++ b/.zshrc
@@ -79,6 +79,16 @@ 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
 
 # assume pseudo terminals are from a "safe" terminal

From 520ed4b06453ab6384a6e8ed27dd294ae7d070ff Mon Sep 17 00:00:00 2001
From: "Peter J. Holzer" <hjp@wsr.ac.at>
Date: Wed, 27 Sep 2017 09:40:53 +0200
Subject: [PATCH 4/7] Make TERM recognition a bit more flexible

---
 .znewterm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/.znewterm b/.znewterm
index 29d2163..fd204fa 100644
--- a/.znewterm
+++ b/.znewterm
@@ -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?,%{[32m%}:-),%{[31m%}:-()%{[30m%}%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

From a24decedd3c2580eacdbc324860f478149b0df27 Mon Sep 17 00:00:00 2001
From: "Peter J. Holzer" <hjp@hjp.at>
Date: Wed, 27 Sep 2017 13:32:44 +0200
Subject: [PATCH 5/7] scrolloffset, incremental search no octal numbers

---
 .vimrc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/.vimrc b/.vimrc
index a43c1b9..0c97bdf 100644
--- a/.vimrc
+++ b/.vimrc
@@ -15,3 +15,8 @@ syntax on
 se comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-,n:\|
 set expandtab
 se nojoinspaces
+set scrolloff=5
+if has('reltime')
+  set incsearch
+endif
+set nrformats-=octal

From 2903ac6e5b233d3569bf3b29935e0fbaacaa35b4 Mon Sep 17 00:00:00 2001
From: "Peter J. Holzer" <hjp@wsr.ac.at>
Date: Thu, 19 Oct 2017 12:13:34 +0200
Subject: [PATCH 6/7] Allow full name in venv and break after first match

---
 .zshrc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.zshrc b/.zshrc
index 7277db2..351cd83 100644
--- a/.zshrc
+++ b/.zshrc
@@ -80,11 +80,12 @@ man () {
 }
 
 venv() {
-    for d in venv/"$1" ve/"$1" ~/venv/"$1"
+    for d in venv/"$1" ve/"$1" ~/venv/"$1" "$1"
     do
         if [ -f "$d"/bin/activate ]
         then
             . "$d"/bin/activate
+            break
         fi
     done
 }

From a391f81b3d4267b392767d964eaafcc6e8ba88cb Mon Sep 17 00:00:00 2001
From: "Peter J. Holzer" <hjp@wsr.ac.at>
Date: Thu, 19 Oct 2017 12:23:16 +0200
Subject: [PATCH 7/7] Move syntax on out of set block

---
 .vimrc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.vimrc b/.vimrc
index 6a3e3b2..9c94eb1 100644
--- a/.vimrc
+++ b/.vimrc
@@ -19,11 +19,12 @@ set sm
 set sw=4
 set tw=72
 set viminfo='100,<50,s10,h,%
-syntax on
 if has('reltime')
   set incsearch
 endif
+
 colorscheme hjp
+syntax on
 map <F7> :cp
 map <F8> :cn
 map!  >I<yypa/O
