About ruvi

G

Gavin Sinclair

In the interest of emphasizing Hal's point that everyone enjoys
different subsets of VIM functionality, let me state that I, on the
other hand, use ^V *all the time*. It's one of my favorite VIM commands.
Similarly (if I may be permitted to append to Hal's list):
<<
D
*
"*y and "*p
c-V, s-V, and V


_MY_ favourite is this:

:g/abc/normal 3WdWA def

(For exvery line that contains 'abc', delete the fourth word and
append ' def' to the line.)

Another cool one is ^A/^X (increment/decrement the next number on the
line -- great in macros!)

Gavin
 
H

Hal Fulton

Gavin said:
_MY_ favourite is this:

:g/abc/normal 3WdWA def

(For exvery line that contains 'abc', delete the fourth word and
append ' def' to the line.)

Another cool one is ^A/^X (increment/decrement the next number on the
line -- great in macros!)

I have *never* heard of ^A and ^X, that is fascinating.

Hal
 
G

Gavin Sinclair

I have *never* heard of ^A and ^X, that is fascinating.

I once had to turn 1Kb of test data into 10Mb of test data. It was
copy/paste, except a unique ID was required. Enter a vim macro with
^A in it, tell it to run the macro 10000 times, make a cup of tea, and
voila - 10Mb of test data. ::licks lips::

Gavin
 
J

Jamis Buck

Gavin said:
_MY_ favourite is this:

:g/abc/normal 3WdWA def

(For exvery line that contains 'abc', delete the fourth word and
append ' def' to the line.)

Another cool one is ^A/^X (increment/decrement the next number on the
line -- great in macros!)

Gavin

Ooh, ooh. I almost forgot: ^P and ^N in insert mode. LIFE SAVERS. :)

And I, like Hal, had never heard of ^A/^X--I'll have to investigate that
one some more.

(Alex--obviously a lot of vim users on the list--I think you've got your
work cut out for you. I'm *definately* going to have to give ruvi a try...)

--
Jamis Buck
(e-mail address removed)
http://www.jamisbuck.org/jamis

"I use octal until I get to 8, and then I switch to decimal."
 
A

Alexander Kellett

Ooh, ooh. I almost forgot: ^P and ^N in insert mode. LIFE SAVERS. :)

word completion? already implemented also :)
that took around one hour. ^X^F is also there. (filename completion)
(admittedly they are a bit rough around the edges, completion doesn't
cycle through the options at the moment just completes the current)
And I, like Hal, had never heard of ^A/^X--I'll have to investigate that
one some more.

strange how different users use different things.
i use ^A/^X every day :)
(Alex--obviously a lot of vim users on the list--I think you've got your
work cut out for you. I'm *definately* going to have to give ruvi a try...)

excellent to hear :)

Alex
 
A

Alexander Kellett

_MY_ favourite is this:

:g/abc/normal 3WdWA def

(For exvery line that contains 'abc', delete the fourth word and
append ' def' to the line.)

normal really is going to change the way i use vi. i can't believe i
hadn't heard of this earlier! finally "ed" becomes more useful than
a non confirming searching replace :) (reason that i haven't yet
done a search replace implemention is because i actually use
/blah<cr>cwblub\en.n.n.n.n.n.n. i can't stand nonconfirming replace :))

Alex
 
G

Gavin Sinclair

normal really is going to change the way i use vi. i can't believe i
hadn't heard of this earlier! finally "ed" becomes more useful than
a non confirming searching replace :) (reason that i haven't yet
done a search replace implemention is because i actually use
/blah<cr>cwblub\en.n.n.n.n.n.n. i can't stand nonconfirming replace :))

If you want conforming replace, you might try adding the 'c' flag to
the search command :) For example

:%s/foo/bar/gc

That means you can use regexen as well, which the cw-n-. troika
doesn't give you.

Gavin
 
A

Alexander Kellett

Well, I owe you an apology for the Monty Python reference. It's
not my intention to insult you.

thank you. no problem.
Let me attempt to be constructive.

thanks hal.
The common perception was, I think, that a vim clone would implement
at least a large subset of vim's features. Objectively, ruvi isn't
there yet. Subjectively, everyone uses/likes different features of
vim anyway. Even if it implemented 95% of vim, there would still be
people who would want some obscure feature and throw up their hands
because it wasn't there.
agreed

FWIW, here are some of the vim commands I use (all I can think of).
The least frequently used is ^V -- the others I use pretty much on
a daily basis.

i use ^V very frequently in fact :)
:i,j<cmd> [ak: moved this line]
[n]cw

numbers/rangfes previous to commands isn't that generic yet
will be done after i return from holidays hopefully.
z. z- and z+

interesting. never seen these before

good point. missed this one

didn't know about this one :)
but reminded me that i need to implement ctrl-g :)

interesting :)
:rblah iirc i already implemented
but :r behaviour is funny :)
:!shellcmd

while :r!shellcmd
does work i didn't do ! style filtering yet.
on todo list now :)

eek. never knew this one.
always use gUl :)

true. missed this.

ummm possible missing. can't recall.

missing at the moment. i could
never find a good use for marks.
anyone got a nice non-interactive
example for a usage? (as in a nice
command rather than just use as a
bookmark i don't find single letters
all that useful :)

i'd prefer a class browser with
tags - press a shortcut on the
given class and it will be highlighted
thusly enabling easy find next time...
umm... interesting new feature :)
%
:%s/regex/text/[g]
:i,js/regex/text[g]

all three missing pretty simple though
but :g otoh will be a while load of work :)
:g//normal though is fairly easy and i actually
find this *much* more useful. thanks gavin :)
Thanks for all your work, and good luck with this project.

thanks very much for this extremely constructive positing :)
and thanks to all for the followups :)

Alex
 
J

Jamis Buck

Alexander said:
missing at the moment. i could
never find a good use for marks.
anyone got a nice non-interactive
example for a usage? (as in a nice
command rather than just use as a
bookmark i don't find single letters
all that useful :)

Well, I use s-V for this now, but before I learned about the V commands,
I used marks for defining ranges:

1) mx
2) move to another location in the file
3) y'x (or >'x or <'x or gU'x or...)

Incidentally (and if memory serves) this is the way vi does it (since vi
doesn't have the V commands). Thus, a lot of people use the mark
commands if they are coming from vi to vim (as was my case).

- Jamis

--
Jamis Buck
(e-mail address removed)
http://www.jamisbuck.org/jamis

"I use octal until I get to 8, and then I switch to decimal."
 
G

Gennady

Alexander said:
]



missing at the moment. i could
never find a good use for marks.
anyone got a nice non-interactive
example for a usage? (as in a nice
command rather than just use as a
bookmark i don't find single letters
all that useful :)

Mark a line with, say, mm, go to another line and do something like

:'m,.d
or
:'m,.>

or anything you like over the range, I use it all the time.

Thanks for your efforts, by the way, it is so cool to have two great
things (ruby and vim) combined. And thanks to Gavin for mentioning
'normal', it was an eye opener for today :).

Gennady.
 
K

Kingsley

--=-HARyEuWkpGEtQDtwi/5K
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi=20

Is anyone who is currently in London interested in meeting up say once
per month to do fun Ruby things, discuss and play with Ruby and
generally have a few items to work thru:

I was thinking perhaps a weekday evening or a Sunday afternoon or
something somewhere in central london preferably a wireless hotspot.

Anyone interested? Drop me a mail

Thanks

Kingsley



--=-HARyEuWkpGEtQDtwi/5K
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQBBZbifZ8AEccynd5gRAuQRAJ9K2bJU1rp73g+8WkQor5Wr2VjeHwCgskfD
Fex6MeXGIjqrXuPkQmSOtkM=
=8TPs
-----END PGP SIGNATURE-----

--=-HARyEuWkpGEtQDtwi/5K--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,417
Latest member
DarrenGaun

Latest Threads

Top