Giter VIP home page Giter VIP logo

grep2vim's Introduction

Grep2Vim

Description

  • Open up any grep results in vim editor
  • Opens multiple files in separate vim tabs
  • Automatically go to the line matched in grep

Example Usage

$ grep -RnHsi waldo scripts
scripts/find-user-2.sh:3:# Check if the first arg is "Waldo"
scripts/find-user-2.sh:4:if test -n $1 && [[ $1 == 'Waldo' ]]; then
scripts/find-user-2.sh:5:  echo "You ARE lookin for Waldo"
scripts/find-user-2.sh:7:  echo "You are NOT lookin for Waldo"
scripts/find-user.js:3:if ( process.argv.length > 1 && process.argv[2] === 'Waldo' )
scripts/find-user.js:4:  console.log("You ARE lookin for Waldo")
scripts/find-user.js:6:  console.log("You are NOT lookin for Waldo")
scripts/find-user.sh:3:# Check if the first arg is "Waldo"
scripts/find-user.sh:4:if test -n $1 && [[ $1 == 'Waldo' ]]; then
scripts/find-user.sh:5:  echo "You ARE lookin for Waldo"
scripts/find-user.sh:7:  echo "You are NOT lookin for Waldo"
$ grep -RnHsi waldo scripts | ./grep2vim.awk
vim -c ":e scripts/find-user-2.sh|:7|:tabe scripts/find-user.sh|:7|:tabe scripts/find-user.js|:6"
$ grep -RnHsi waldo scripts | ./grep2vim.awk | xargs -o vim # Execute above vim command

grep2vim's People

Contributors

jhyland87 avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.