Switching from Ack to Ag

This commit is contained in:
Luiz Gonzaga dos Santos Filho
2013-04-18 15:40:04 +02:00
parent b198b38864
commit bcc03b96df
4 changed files with 6 additions and 5 deletions

View File

@@ -80,7 +80,7 @@ Read on to learn what YADR provides!
Homebrew is _the missing package manager for OSX_. Installed automatically. Homebrew is _the missing package manager for OSX_. Installed automatically.
We automatically install a few useful packages including ack, ctags, git, and hub, and the silver searcher ('ag') We automatically install a few useful packages including ctags, git, and hub, and the silver searcher ('ag')
You can install macvim from brew as well, or download it from their website. You can install macvim from brew as well, or download it from their website.
### Github Issues: [ghi gem](https://github.com/stephencelis/ghi) ### Github Issues: [ghi gem](https://github.com/stephencelis/ghi)
@@ -413,6 +413,7 @@ If you omit the key combo, you'll get a list of all the maps. You can do the sam
* color_highlight - use :ColorCodes to see hex colors highlighted * color_highlight - use :ColorCodes to see hex colors highlighted
* change-inside-surroundings - change content inside delimiters like quotes/brackets * change-inside-surroundings - change content inside delimiters like quotes/brackets
* Specky - used for color highlighting rspec correctly even if specs live outside of spec/ (rails.vim doesn't handle this) * Specky - used for color highlighting rspec correctly even if specs live outside of spec/ (rails.vim doesn't handle this)
* Ag - use :Ag to search across multiple files. Faster than Grep and Ack.
#### General enhancements that don't add new commands #### General enhancements that don't add new commands

View File

@@ -144,7 +144,7 @@ def install_homebrew
puts "======================================================" puts "======================================================"
puts "Installing Homebrew packages...There may be some warnings." puts "Installing Homebrew packages...There may be some warnings."
puts "======================================================" puts "======================================================"
run %{brew install zsh ack ctags git hub tmux reattach-to-user-namespace the_silver_searcher} run %{brew install zsh ctags git hub tmux reattach-to-user-namespace the_silver_searcher}
puts puts
puts puts
end end

View File

@@ -2,8 +2,8 @@
" Open a Quickfix window for the last search. " Open a Quickfix window for the last search.
nnoremap <silent> <leader>q/ :execute 'vimgrep /'.@/.'/g %'<CR>:copen<CR> nnoremap <silent> <leader>q/ :execute 'vimgrep /'.@/.'/g %'<CR>:copen<CR>
" Ack for the last search. " Ag for the last search.
nnoremap <silent> <leader>qa/ :execute "Ack! '" . substitute(substitute(substitute(@/, "\\\\<", "\\\\b", ""), "\\\\>", "\\\\b", ""), "\\\\v", "", "") . "'"<CR> nnoremap <silent> <leader>qa/ :execute "Ag! '" . substitute(substitute(substitute(@/, "\\\\<", "\\\\b", ""), "\\\\>", "\\\\b", ""), "\\\\v", "", "") . "'"<CR>
" GitGrep the last search (my own invention) " GitGrep the last search (my own invention)
nnoremap <silent> <leader>qg/ :execute "GitGrep '" . substitute(substitute(substitute(@/, "\\\\<", "\\\\b", ""), "\\\\>", "\\\\b", ""), "\\\\v", "", "") . "'"<CR> nnoremap <silent> <leader>qg/ :execute "GitGrep '" . substitute(substitute(substitute(@/, "\\\\<", "\\\\b", ""), "\\\\>", "\\\\b", ""), "\\\\v", "", "") . "'"<CR>

View File

@@ -48,7 +48,7 @@ Bundle "tpope/vim-git"
Bundle "vim-scripts/lastpos.vim" Bundle "vim-scripts/lastpos.vim"
Bundle "sjl/gundo.vim" Bundle "sjl/gundo.vim"
Bundle "vim-scripts/sudo.vim" Bundle "vim-scripts/sudo.vim"
Bundle "mileszs/ack.vim" Bundle "rking/ag.vim"
Bundle "nelstrom/vim-textobj-rubyblock" Bundle "nelstrom/vim-textobj-rubyblock"
Bundle "kana/vim-textobj-user" Bundle "kana/vim-textobj-user"
Bundle "austintaylor/vim-indentobject" Bundle "austintaylor/vim-indentobject"