From: "Benjamin R. Haskell" <zsh@benizi.com>
To: Richard Hartmann <richih.mailinglist@gmail.com>
Cc: Mikael Magnusson <mikachu@gmail.com>, zsh-users@zsh.org
Subject: Re: Substituting grep (and other) output to open files in Vim
Date: Tue, 10 May 2011 14:58:02 -0400 (EDT) [thread overview]
Message-ID: <alpine.LNX.2.01.1105101422470.28316@hp> (raw)
In-Reply-To: <BANLkTi=ZWhzwPxwifvPrB24BvQa1S+rUew@mail.gmail.com>
On Tue, 10 May 2011, Richard Hartmann wrote:
> On Tue, May 10, 2011 at 19:37, Mikael Magnusson wrote:
>
>> At least in my case, this is compiler errors/warnings output, and
>> similar. It's nice to just cut and paste the thing without munging
>> the :123: to +123 manually.
>
> Exactly. And half a dozen other use cases where it's faster to simply
> copy & paste.
Okay. The reason I asked, and it's validated by the responses, is that
maybe you can handle this functionality at a different layer than Zsh.
E.g. through your terminal emulator. rxvt-unicode, for example, allows
you to write Perl extensions that can do things with the selection.
So, instead of:
1. highlight text w/ mouse
2. type 'vim ' in the shell
3. paste selection (presumably middle-click pasting)
4. hit Enter (Zsh munges pasted selection to what you want)
You could:
1. highlight text w/ mouse
2. Ctrl+right click
3. pick the "launch in vim" option (provided by a hypothetical Perl
extension)
Generally, the things I've written like this are to pop things up in a
browser, but popping things up in vim in a terminal wouldn't be too much
harder.
Or, you could run `make` from within Vim itself which already handles a
lot of these type of problems. (That one really depends on the workflow
and/or source.)
Not really trying to dissuade you from the pretty-straightforward Zsh
solution. Just wanted to point out some possibilities (and double-check
that it wasn't as simple as the array-vs.-string thing).
--
Best,
Ben
next prev parent reply other threads:[~2011-05-10 18:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-10 13:46 Richard Hartmann
2011-05-10 14:12 ` Mikael Magnusson
2011-05-10 14:14 ` Jérémie Roquet
2011-05-10 18:16 ` Richard Hartmann
2011-05-11 1:00 ` Wayne Davison
2011-05-27 15:09 ` Richard Hartmann
2011-05-27 22:00 ` Wayne Davison
2011-05-28 11:51 ` Richard Hartmann
2011-05-10 15:26 ` Benjamin R. Haskell
2011-05-10 17:37 ` Mikael Magnusson
2011-05-10 18:16 ` Richard Hartmann
2011-05-10 18:58 ` Benjamin R. Haskell [this message]
2011-05-10 22:27 ` Richard Hartmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LNX.2.01.1105101422470.28316@hp \
--to=zsh@benizi.com \
--cc=mikachu@gmail.com \
--cc=richih.mailinglist@gmail.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).