GithubHelp home page GithubHelp logo

Comments (8)

aligrudi avatar aligrudi commented on June 14, 2024

from neatvi.

aaronNGi avatar aaronNGi commented on June 14, 2024

Do you mean ! vi-mode command?

No, I mean the ex command !. For example :.,+20 !sort or also super useful: :5,10 !fmt -s -p \#. So, opposed to :w !<command>, it takes a range, pipes the lines from that range to an external command and replaces them with the output of <command>.

My goal was to implement the most commonly used features mentioned
in POSIX. I also sometimes included useful and convenient features
that do not make the code very complicated.

That sounds good.

from neatvi.

aligrudi avatar aligrudi commented on June 14, 2024

from neatvi.

aaronNGi avatar aaronNGi commented on June 14, 2024

Hey, nice. The function itself works perfectly as far as I can tell. While it makes total sense when running commands normally (:!<command>), from a usability standpoint it makes more sense if there was no call to vi_wait() when using :<range>!<command>.

from neatvi.

aaronNGi avatar aaronNGi commented on June 14, 2024

I noticed something somewhat related: Since '|' is used as the ex command separator, you can't use pipes in external commands. Most vi-clones seem to ignore '|' as the command separator when the ex command is ! and always use it as parameter for the external command. That means you can't run :!echo foo | !echo bar, but maybe that's better than having to escape the '|'?!

from neatvi.

aligrudi avatar aligrudi commented on June 14, 2024

from neatvi.

aligrudi avatar aligrudi commented on June 14, 2024

from neatvi.

aaronNGi avatar aaronNGi commented on June 14, 2024

OK. Now | is not a command separator for :! command.

Thanks, it works perfectly now!

Something I just noticed, which seems to be unrelated to the last 2 commits: the read ex command fails to read from pipes. I tested r !seq 10 and it does not read anything.

I will close this issue and create a new one for it.

from neatvi.

Related Issues (20)

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.