8237628a8193

Merge.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 19 Aug 2011 10:45:34 -0400
parents e50c19784e1e (diff) 8a3d616d7544 (current diff)
children aacc42101f2c
branches/tags (none)
files

Changes

--- a/vim/.vimrc	Thu Aug 18 20:59:50 2011 -0400
+++ b/vim/.vimrc	Fri Aug 19 10:45:34 2011 -0400
@@ -140,7 +140,6 @@
 runtime macros/matchit.vim
 map <tab> %
 
-nnoremap Y y$
 nnoremap D d$
 
 " Make horizontal scrolling less horrible.
@@ -276,9 +275,9 @@
 " Use a swank command that works, and doesn't require new app windows.
 au FileType clojure let g:slimv_swank_cmd='!dtach -n /tmp/dvtm-swank.sock -r winch lein swank'
 
-au BufNewFile,BufRead Slimv.REPL.clj setlocal winfixwidth
+au BufWinEnter Slimv.REPL.clj setlocal winfixwidth
 au BufNewFile,BufRead Slimv.REPL.clj setlocal nowrap
-au BufNewFile,BufRead Slimv.REPL.clj normal! zR
+au BufWinEnter Slimv.REPL.clj normal! zR
 
 " }}}
 " Confluence {{{
@@ -518,6 +517,18 @@
 nnoremap <leader>1 :set cmdheight=1<cr>
 nnoremap <leader>2 :set cmdheight=2<cr>
 
+" Paste intelligently by default, use option+p to paste raw.
+function! YRRunAfterMaps()
+    nnoremap Y :<C-U>YRYankCount 'y$'<CR>
+    nnoremap p :<C-U>YRPaste 'p'<CR>v`]=`]
+    nnoremap P :<C-U>YRPaste 'P'<CR>v`]=`]
+    nnoremap π :<C-U>YRPaste 'p'<CR>
+    nnoremap ∏ :<C-U>YRPaste 'P'<CR>
+endfunction
+
+" Replaste
+nnoremap <D-p> "_ddPV`]=
+
 " Marks and Quotes
 noremap ' `
 noremap æ '
@@ -552,9 +563,6 @@
 " Toggle paste
 set pastetoggle=<F8>
 
-" Replaste
-nnoremap <D-p> "_ddPV`]
-
 " Split/Join
 " ----------
 "