Giter VIP home page Giter VIP logo

v's Introduction

V(1)                             User Commands                            V(1)



NAME
       v - z for vim


SYNOPSIS
       v [-a] [-c] [-l] [-[0-9]] [--debug] [--help] [regex1 regex2 ... regexn]


AVAILABILITY
       bash, vim


INSTALLATION
       Put v somewhere in $PATH (e.g. /usr/local/bin/).
       For   the   manual   page,   put   v.1   somewhere  in  $MANPATH  (e.g.
       /usr/local/man/man1/).


DESCRIPTION
       v uses viminfo's list of recently edited files to open one  quickly  no
       matter where you are in the filesystem.

       By  default, it will open the most recently edited file matching all of
       the provided regular expressions.


OPTIONS
       -a           don't skip deleted files
       -c           restrict matches to subdirectories of the current dir
       -l           when multiple matches, show a list
       -[0-9]       edit nth most recent file
       --debug      dry run
       --help       show a brief help message


EXAMPLES
       v            list and choose from all files
       v -0         reopen most recently edited file
       v foo bar    edit first file matching foo and bar
       v -c foo bar choose files in current dir matching foo and bar
       v -l foo bar list and choose files matching foo and bar


NOTES
       Shell variables, such as $, must be escaped if used in regular  expres-
       sions.

       Behavior
       The  default  behavior is to open the most recent file that matches the
       search terms, even if there are multiple matches.

       You may find it useful to alias vl='v  -l'.  When  there  are  multiple
       matches,  this  will prompt for a choice, rather than editing the first
       match. The author is still  not  sure  which  behavior  should  be  the
       default, and has chosen one provisionally.


SEE ALSO
       vim(1), regex(7)

       Please file bugs at https://github.com/rupa/v/



v                                February 2011                            V(1)

v's People

Contributors

grota avatar rupa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

v's Issues

You can now use v with fzf

I made v work with fzf. First, modify v not to display the choice dialog when using the -l flag, then use this shell function to call it:

v() {
    if [[ -z "$@" ]]; then
        local -r choice="$(command v -l 2>&1 | fzf +s --tac --height 15 --reverse | sed -r 's/^[0-9,. \t]*//')"
        if [[ ! -z "$choice" ]]; then
            local -r file="${choice/#~/$HOME}"
            vim "$file"
        fi
    else
        command v "$@"
    fi
}

Support for Neovim

I adjusted the variable at the top to [ "$vim" ] || vim=nvim but v doesn't include files edited with neovim. (Probably, it doesn't use the same ~/.viminfo.) Could you consider supporting neovim, please?

Missing LICENSE

I noticed there's no open-source license included in this repo (first noticed in #10); unfortunately, that means this project doesn't meet Homebrew's Acceptable Formulae list for inclusion in the core Homebrew tap. Can you either:

  • Add an open-source license to this repo
  • Create your own tap so we can migrate the v formula there

If I haven't heard a reply in the next week or two, I'll open a PR in homebrew-core to delete the v formula. Thanks in advance for your help ๐Ÿ™‚

[request] TAB complete

Vim can handle tab completion in ex-commands, it would be neat if it expanded the regex on TAB so that I know what file I'm about to open exactly before I open it

eval: line 30: syntax error near unexpected token `('

V gives out this error when there are recent edited files with "(" or ")" in the file name. I think the error is caused by echoing unquoted parenthesis. I've been trying, but failed, to escape "(" and ")" in $fl.

Maintain functional continuity with Z

When you call z with no arguments, it just prints the frecency list.

When you call v with no arguments, you're presented with a prompt to enter a choice.
This isn't very useful because most vim users will have many files in their recently accessed list, and after they're presented with the list they can just re-run v with the filename they want.

[request] v multiply files

If I have opened file foo.c and bar.c, I can use v foo and v bar to open them separately.

The request is that v foo bar can open both files concurrently in vim.

Even more, we can v multiply files in one line of command.

Thank you! Both z and v are must have for every machine of me!

Multiple arguments should be opened as multiple buffers

This is more useful behaviour than matching against every regex.

E.g. if I have

$ v -l
2	~/.../json/navigation.json
1	~/.../app.js
0	~/.../sass/theme.sass

I want v app the to start vim with two buffers, one of ~/.../app.js and the other of ~/.../sass/theme.sass.

off-by-1 error compared to vim's numbering

(feel free to close this if it's not doable; just thought I'd ask)

The choice numbers are off by one compared to what you would get in vim if you hit '0, '1, etc. within vim. Would it be possible to use the same (your "1" would then become "0", etc).

On a related note, the documentation says [0-9] is allowed but the code has [1-9] :-)

I realise there're also the issue of deleted files that makes it likely to differ anyway but frankly, deleted files are rare and I can live with the two sequences going out of sync if there is one (or I will use "-a").

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.