tweaks

Mon, 10 Oct 2016 23:59:27 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Mon, 10 Oct 2016 23:59:27 -0400
changeset 419
f860c013676f
parent 418
7a92f61a3c11
child 420
6959fd5dfb58

tweaks

.vimrc file | annotate | diff | comparison | revisions
--- a/.vimrc
+++ b/.vimrc
@@ -226,7 +226,7 @@ if has('patch-7.3-541')
 endif
 
 " set number
-set scrolloff=10
+set scrolloff=15
 set ruler
 set showcmd
 set wildmenu
@@ -346,6 +346,12 @@ augroup vimrc
   autocmd BufLeave *.html,*.ep,*.tt    normal! mH
   autocmd BufLeave *.js                normal! mJ
   autocmd BufLeave *.pl,*.pm           normal! mP
+
+  " Jump to last known pos
+  autocmd BufReadPost *
+    \ if line("'\"") >= 1 && line("'\"") <= line("$") |
+    \   exe "normal! g`\"" |
+    \ endif
 augroup END
 
 " https://mjj.io/2015/01/27/encrypting-files-with-gpg-and-vim/
@@ -481,6 +487,14 @@ let g:neocomplcache_filename_include_exp
 " }}}
 
 
+" {{{ Commands
+if !exists(":DiffOrig")
+  " Diff unsaved buffer
+  command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
+		  \ | wincmd p | diffthis
+endif
+" }}}
+
 " Local stuff, finish up
 try
   if on_windows == 1

mercurial