Skip to content

Open up fetch API for external usage #6

@blueyed

Description

@blueyed

I've just remembered that I have the following in my vimrc:

au BufNewFile * nested let s:fn = expand('<afile>') |
\ if ! filereadable(s:fn) | let s:fn = substitute(s:fn, '^\S\{-}/', '', '')
    \ | if filereadable(s:fn) | echomsg 'Editing' s:fn 'instead' | exec 'e '.s:fn.' | bd#' | endif | endif

This helps when copy'n'pasting a path from a patch / diff header, e.g. from git diff.

I think it might be a good addition for vim-fetch, applying all specs with an optional path prefix, too.

It could be limited to just a single char prefix (a/, b/, i/, w/, ...).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions