sponsor Vim development Vim logo Vim Book Ad

cab.vim : Vim plugin for using ack-grep with iterm for fast and easy search in project

 script karma  Rating 1/4, Downloaded by 290    Comments, bugs, improvements  Vim wiki

created by
Vadim Rachko
 
script type
utility
 
description
ONLY FOR MAC (for the present)

Cab is a Vim plugin for using ack-grep (http://betterthangrep.com) in
common with iterm (http://www.iterm2.com/) for fast and easy search in
a project from vim.
It uses current working directory as a root.
It's possible to use Cab only with iterm (not with terminal) bacause cab
uses applescript API for interaction with iterm (or iterm2).

How to use Cab:

  in the main mode:
    place the cursor on the word to search and press <Leader>f
    it will open new tab of the iterm and run the command "ack -Q <word for search>"

  in the visual mode:
    select a range of text to search and press <Leader>f
    it will open new tab of the iterm and run the command "ack -Q <text for search>"

  in the command mode:
    type :Cab <text for search>
    it will open new tab of the iterm and run the coommand "ack -Q <text for search>"

Cab automatically escape special symbols and quotes. You can search for
any text. For exaple
:Cab Search for this "quoted" 'text' and /\ slashes

You can redefine a method of invoking ack using global variable cab_ack_cmd
Example (write it in the your ~/.vimrc file):

  let g:cab_ack_cmd = "ack-grep -irn --ignore-dir=assets"

For installation use vimball:

  vim cab.vmb
  :so %
 
install details
Use vimball
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
cab.vmb 0.2 2012-02-20 7.0 Vadim Rachko Fixed defaults definition (g:cab_ack_cmd)
cab.vba 0.1 2011-07-28 7.0 Vadim Rachko Initial upload
ip used for rating: 54.204.90.135

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo