# HG changeset patch # User Steve Losh # Date 1320002140 14400 # Node ID 7f2c706a6945a7d7d83f7a4957cd2c5f49405f41 # Parent 61488a7c8ab928a98ab8d5a518711bfc659650a9 Moar. diff -r 61488a7c8ab9 -r 7f2c706a6945 .gitconfig --- a/.gitconfig Tue Oct 25 20:54:53 2011 -0400 +++ b/.gitconfig Sun Oct 30 15:15:40 2011 -0400 @@ -1,6 +1,6 @@ [user] - name = Steve Losh - email = steve@stevelosh.com + name = Steve Losh + email = steve@stevelosh.com [core] pager = cat diff -r 61488a7c8ab9 -r 7f2c706a6945 vim/.vimrc --- a/vim/.vimrc Tue Oct 25 20:54:53 2011 -0400 +++ b/vim/.vimrc Sun Oct 30 15:15:40 2011 -0400 @@ -698,6 +698,10 @@ " Substitute nnoremap s :%s// +" Emacs bindings in command line mode +cnoremap +cnoremap + " Diffoff nnoremap D :diffoff! @@ -883,6 +887,13 @@ let g:ctrlp_working_path_mode = 0 let g:ctrlp_match_window_reversed = 1 let g:ctrlp_split_window = 0 +let g:ctrlp_prompt_mappings = { +\ 'PrtSelectMove("j")': ['', '', ''], +\ 'PrtSelectMove("k")': ['', '', ''], +\ 'PrtHistory(-1)': [''], +\ 'PrtHistory(1)': [''], +\ 'ToggleFocus()': [''], +\ } " }}} " Easymotion {{{ @@ -1133,18 +1144,13 @@ " Note: If the text covered by a motion contains a newline it won't work. Ack " searches line-by-line. -nnoremap \a :set opfunc=AckMotiong@ +nnoremap \a :set opfunc=AckMotiong@ xnoremap \a :call AckMotion(visualmode()) function! s:CopyMotionForType(type) if a:type ==# 'v' - " From visual mode silent execute "normal! `<" . a:type . "`>y" - elseif a:type ==# 'line' - " Linewise motion - silent execute "normal! '[V']y" - else - " Charwise motion + elseif a:type ==# 'char' silent execute "normal! `[v`]y" endif endfunction @@ -1154,8 +1160,7 @@ call s:CopyMotionForType(a:type) - let pattern = escape(@@, "'") - execute "normal! :Ack! --literal '" . pattern . "'\" + execute "normal! :Ack! --literal " . shellescape(@@) . "\" let @@ = reg_save endfunction diff -r 61488a7c8ab9 -r 7f2c706a6945 vim/ftplugin/clojure/clojurefolding.vim --- a/vim/ftplugin/clojure/clojurefolding.vim Tue Oct 25 20:54:53 2011 -0400 +++ b/vim/ftplugin/clojure/clojurefolding.vim Sun Oct 30 15:15:40 2011 -0400 @@ -9,6 +9,8 @@ function GetClojureFold() if getline(v:lnum) =~ '^\s*(defn.*\s' return ">1" + elseif getline(v:lnum) =~ '^\s*(def .*\s' + return ">1" elseif getline(v:lnum) =~ '^\s*(defmacro.*\s' return ">1" elseif getline(v:lnum) =~ '^\s*(ns.*\s' diff -r 61488a7c8ab9 -r 7f2c706a6945 vim/plugin/grep-operator.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/plugin/grep-operator.vim Sun Oct 30 15:15:40 2011 -0400 @@ -0,0 +1,19 @@ +nnoremap g :set operatorfunc=GrepOperatorg@ +vnoremap g :call GrepOperator(visualmode()) + +function! s:GrepOperator(type) + let saved_unnamed_register = @@ + + if a:type ==# 'v' + normal! `y + elseif a:type ==# 'char' + normal! `[v`]y + else + return + endif + + silent execute "grep! -R " . shellescape(@@) . " ." + copen + + let @@ = saved_unnamed_register +endfunction