2009/11/16 Peng Yu <pengyu.ut@gmail.com>
[...]
I have a similar problem, but I partially solve it by using command filtering.
In my case, what I want to do sometimes is to test updated fragments of bigger sql scripts and other times, like you, read or insert into buffer data from a databese (say any other command invoking bash or selecting whitespace).
The best solution which I found is to select the query which I want to test (writting it if I am retriving data instead of testing) and then normally execute ':!psql <database>'.
This replaces selected text by the result of the command but, if you want, you can restore the selection by undoing changes with 'u'. I did'nt found any way to avoid deletion of selected text yet.
Also, if you use folding (I use folding with markers), you can easily fold the query and then select like only one row.
[...]
> > I think he is talking about: when the command returns and he's back inYes. This is what I mean.
> > vim, how to see the command output
I have a similar problem, but I partially solve it by using command filtering.
In my case, what I want to do sometimes is to test updated fragments of bigger sql scripts and other times, like you, read or insert into buffer data from a databese (say any other command invoking bash or selecting whitespace).
The best solution which I found is to select the query which I want to test (writting it if I am retriving data instead of testing) and then normally execute ':!psql <database>'.
This replaces selected text by the result of the command but, if you want, you can restore the selection by undoing changes with 'u'. I did'nt found any way to avoid deletion of selected text yet.
Also, if you use folding (I use folding with markers), you can easily fold the query and then select like only one row.
--
Joan Miquel Torres__________________________________
Linux Registered User #164872
http://www.mallorcaweb.net/joanmiquel
BULMA: http://bulma.net http://breu.bulma.net/?l2301
--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment