Git Product home page Git Product logo

vim-fetch's Introduction

Project status Current release Open issues License

Fetch that line and column, boy!

vim-fetch enables Vim to process line and column jump specifications in file paths as found in stack traces and similar output. When asked to open such a file, in- or outside Vim or via gF, Vim with vim-fetch will jump to the specified line (and column, if given) instead of displaying an empty, new file.

If you have wished Vim would have a better understanding of stack trace formats than what it offers out of the box, vim-fetch is for you.

Usage

  • vim path/to/file.ext:12:3 in the shell to open file.exton line 12 at column 3
  • :e[dit] path/to/file.ext:100:12 in Vim to edit file.ext on line 100 at column 12
  • gF with the cursor at ^ on path/to^/file.ext:98,8 to edit file.ext on line 98, column 8
  • gF with the selection |...| on |path to/file.ext|:5:2 to edit file.ext on line 5, column 2

Besides the GNU colon format, vim-fetch supports various other jump specification formats, including some that search for keywords or method definitions. For more, see the documentation.

Rationale

Quickly jumping to the point indicated by common stack trace output should be a given in an editor; unluckily, Vim has no concept of this out of the box that does not involve a rather convoluted detour through an error file and the Quickfix window. As the one plug-in I found that aims to fix this, Victor Bogado’s file_line, had a number of issues (at the time of this writing, it didn’t correctly process multiple files given with a window switch, i.e. -o, -O and -p, and I found it choked autocommand processing for the first loaded file on the arglist), I wrote my own.

Installation

  1. The old way: download and source the vimball from the releases page, then run :helptags {dir} on your runtimepath/doc directory. Or,
  2. The plug-in manager way: using a git-based plug-in manager (Pathogen, Vundle, NeoBundle etc.), simply add kopischke/vim-fetch to the list of plug-ins, source that and issue your manager's install command.

License

vim-fetch is licensed under the terms of the MIT license according to the accompanying license file.

vim-fetch's People

Contributors

blueyed avatar kopischke avatar

Watchers

 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.