# HG changeset patch # User Steve Losh # Date 1394638341 14400 # Node ID 2d90283382c3f130c5d5e16733882378323219fe # Parent 4fae0d3611397904704fc8205fd2e9e9fe01bc30# Parent b1920eefa0212c61b0f99ecbcc47eebeb364b2f2 Merge. diff -r b1920eefa021 -r 2d90283382c3 agignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/agignore Wed Mar 12 11:32:21 2014 -0400 @@ -0,0 +1,6 @@ +tags +tags.bak +*.wsdl +target +*.public.key +*.private.key diff -r b1920eefa021 -r 2d90283382c3 bin/bootstrap.sh --- a/bin/bootstrap.sh Wed Mar 12 00:56:21 2014 -0400 +++ b/bin/bootstrap.sh Wed Mar 12 11:32:21 2014 -0400 @@ -43,6 +43,7 @@ ensure_link "lib/dotfiles/hgignore" ".hgignore" ensure_link "lib/dotfiles/gitignore" ".gitignore" ensure_link "lib/dotfiles/ffignore" ".ffignore" +ensure_link "lib/dotfiles/agignore" ".agignore" ensure_link "lib/dotfiles/ctags" ".ctags" ensure_link "lib/dotfiles/grc" ".grc" ensure_link "lib/dotfiles/bash_profile" ".bash_profile" diff -r b1920eefa021 -r 2d90283382c3 fish/config.fish --- a/fish/config.fish Wed Mar 12 00:56:21 2014 -0400 +++ b/fish/config.fish Wed Mar 12 11:32:21 2014 -0400 @@ -1,6 +1,7 @@ # Useful functions {{{ function ef; vim ~/.config/fish/config.fish; end +function eff; vim ~/.config/fish/functions; end function ev; vim ~/.vimrc; end function ed; vim ~/.vim/custom-dictionary.utf-8.add; end function eo; vim ~/Dropbox/Org; end diff -r b1920eefa021 -r 2d90283382c3 fish/functions/ag.fish --- a/fish/functions/ag.fish Wed Mar 12 00:56:21 2014 -0400 +++ b/fish/functions/ag.fish Wed Mar 12 11:32:21 2014 -0400 @@ -22,6 +22,9 @@ # that little tidbit and can we please get a shell without complete # bullshit as a scripting language syntax? if grep -q 'pragma: skipvcs' '.agignore' + # If .agignore contains pragma: skipvcs, then we'll run ag in + # "disregard .gitignore/.hgignore/svn:ignore" mode. This lets us + # still search in files the VCS has ignored. actual_ag --search-files -U $argv else actual_ag --search-files $argv diff -r b1920eefa021 -r 2d90283382c3 vim/vimrc --- a/vim/vimrc Wed Mar 12 00:56:21 2014 -0400 +++ b/vim/vimrc Wed Mar 12 11:32:21 2014 -0400 @@ -459,6 +459,10 @@ " This should preserve your last yank/delete as well. nnoremap zl :let @z=@"x$p:let @"=@z +" Ranger +nnoremap r :silent !ranger %:h:redraw! +nnoremap R :silent !ranger:redraw! + " Insert Mode Completion {{{ inoremap @@ -1812,16 +1816,26 @@ xnoremap iN :call NumberTextObject(1) function! s:NumberTextObject(whole) - normal! v - - while getline('.')[col('.')] =~# '\v[0-9]' + let num = '\v[0-9]' + + " If the current char isn't a number, walk forward. + while getline('.')[col('.') - 1] !~# num normal! l endwhile + " Now that we're on a number, start selecting it. + normal! v + + " If the char after the cursor is a number, select it. + while getline('.')[col('.')] =~# num + normal! l + endwhile + + " If we want an entire word, flip the select point and walk. if a:whole normal! o - while col('.') > 1 && getline('.')[col('.') - 2] =~# '\v[0-9]' + while col('.') > 1 && getline('.')[col('.') - 2] =~# num normal! h endwhile endif