43db4712c094

Commentary and yankring stuff.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Mon, 29 Aug 2011 12:42:44 -0400
parents 029b4a0891fe
children b5ede088f7f2
branches/tags (none)
files .hgsub .hgsubstate vim/.vimrc

Changes

--- a/.hgsub	Mon Aug 29 11:15:08 2011 -0400
+++ b/.hgsub	Mon Aug 29 12:42:44 2011 -0400
@@ -4,7 +4,7 @@
 vim/bundle/gundo = [hg]http://bitbucket.org/sjl/gundo.vim/
 vim/bundle/html5 = [git]git://github.com/othree/html5.vim.git
 vim/bundle/markdown = [git]git://github.com/tpope/vim-markdown.git
-vim/bundle/nerdcommenter = [git]git://github.com/scrooloose/nerdcommenter.git
+vim/bundle/vim-commentary = [git]git://github.com/tpope/vim-commentary.git
 vim/bundle/nerdtree = [git]git://github.com/scrooloose/nerdtree.git
 vim/bundle/surround = [git]git://github.com/tpope/vim-surround.git
 vim/bundle/sparkup = [git]git://github.com/sjl/vim-sparkup.git
--- a/.hgsubstate	Mon Aug 29 11:15:08 2011 -0400
+++ b/.hgsubstate	Mon Aug 29 12:42:44 2011 -0400
@@ -7,7 +7,6 @@
 9524242bda64063b3bf24c89bb89a27726da882f vim/bundle/gundo
 4ef2d418f48d30fed2f7ce00f598d6871a0010fe vim/bundle/html5
 34e28b3f6f6d702ff2963b8196eccae9344ed4bc vim/bundle/markdown
-b28e7be63235982501ab7dd30c03ea7feef7b095 vim/bundle/nerdcommenter
 2dd198c6c412b4ddd361b43586b01981e8383239 vim/bundle/nerdtree
 a0831b09f2026c3a3d52e253ffd139fe20a9360a vim/bundle/pydoc
 e824de36da30baee5adc7be980b907e50099545c vim/bundle/slimv
@@ -18,6 +17,7 @@
 17831680bc891c82b98f16718ff3a59cdadfa358 vim/bundle/threesome
 c0a4929c940e4fb32f8aaa70440da113c7064467 vim/bundle/vim-arpeggio
 b944e534bd6bbfc4fd56d4ee1a8aa831188387b0 vim/bundle/vim-coffee-script
+8d06adbd56a761684701d1c60990b72c845be3d5 vim/bundle/vim-commentary
 6362ba99c825afc046818807267d5c1143b5c887 vim/bundle/vim-javascript
 f21fbd8759d7fa6c3cb1bbb9fe05eae90422f01a vim/bundle/vim-makegreen
 2df935db63da1b6bc9031228e1f4173e32f42c45 vim/bundle/vim-orgmode
--- a/vim/.vimrc	Mon Aug 29 11:15:08 2011 -0400
+++ b/vim/.vimrc	Mon Aug 29 12:42:44 2011 -0400
@@ -392,7 +392,6 @@
 au FileType html,jinja,htmldjango nnoremap <buffer> <s-cr> vit<esc>a<cr><esc>vito<esc>i<cr><esc>
 
 " Smarter pasting
-au FileType html,jinja,htmldjango nnoremap <buffer> Y :<C-U>YRYankCount 'y$'<CR>
 au FileType html,jinja,htmldjango nnoremap <buffer> p :<C-U>YRPaste 'p'<CR>v`]=`]
 au FileType html,jinja,htmldjango nnoremap <buffer> P :<C-U>YRPaste 'P'<CR>v`]=`]
 au FileType html,jinja,htmldjango nnoremap <buffer> π :<C-U>YRPaste 'p'<CR>
@@ -606,6 +605,12 @@
 let g:CommandTMaxHeight = 20
 
 " }}}
+" Commentary {{{
+
+nmap <leader>c <Plug>CommentaryLine
+xmap <leader>c <Plug>Commentary
+
+" }}}
 " Easymotion {{{
 
 let g:EasyMotion_do_mapping = 0
@@ -755,6 +760,17 @@
 let vimclojure#WantNailgun = 0
 
 " }}}
+" YankRing {{{
+
+let g:yankring_min_element_length = 2
+
+function! YRRunAfterMaps()
+    nnoremap Y   :<C-U>YRYankCount 'y$'<CR>
+    omap <expr> L YRMapsExpression("", "$")
+endfunction
+
+
+" }}}
 
 " }}}
 " Synstack -------------------------------------------------------------------- {{{