add file marks for 'last file by category'

Thu, 21 Jan 2016 01:27:05 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Thu, 21 Jan 2016 01:27:05 -0500
changeset 238
67b9c904e880
parent 237
eac688905192
child 239
a99db33c13e1

add file marks for 'last file by category'

.vimrc file | annotate | diff | comparison | revisions
--- a/.vimrc
+++ b/.vimrc
@@ -293,9 +293,11 @@ augroup vimrc
   " preload templates into new buffers by file extension
   "autocmd BufNewFile * silent! 0r $MYVIM/templates/%:e.template
 
-  " simple strip trailing whitespace on save
-  "autocmd BufWritePre *.pl,*.rb,*.js,*.css,*.md :%s/\s+$//e
-
+  " Set file marks by "category" on switch-away
+  autocmd BufLeave *.css,*,less,*.scss normal! mC
+  autocmd BufLeave *.html,*.ep,*.tt    normal! mH
+  autocmd BufLeave *.js                normal! mJ
+  autocmd BufLeave *.pl,*.pm           normal! mP
 augroup END
 "}}}
 

mercurial