[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] vi, emacs, sharp sticks
>
> Chris> Well...running external commands on a region is possible in
> Chris> vi. The '%' is just a shortcut for "all lines". Just
> Chris> replace with '10,.' or '0,4' or '100,$' as appropriate. :)
>
> Surely vi has some kind of mark and a notion of "the current region"?
>
How do you define "the current region"? vim (I've not checked pure vi) allows
you to set marks in a file which act as bookmarks into a file or sets of
files using ':m{a-zA-Z}'. But they're only set on a line - if you delete the
line, the mark dissapears. Similarly if you set a mark up with, say, :ma and
then issue ":'a,.!sort" the mark will dissapear (probably because doing the
sort deletes the line with the mark on before re-inserting it).
> Emacs is optimized for the former. It has "shell buffers", but
> they're clunkier than a real shell for shell-type work (precisely
> because Emacs usurps a lot of shell bindings). vi is optimized for
> the latter; you can do a lot of those things inside of vi, but often
> it's easier to save a file and push to a shell (rather than count
> lines or whatever).
>
True; depending on what I'm doing to a file, I'll sed/awk/grep/sort it and
then some before going into vi to do something else, even though I could do
it all within vi itself. But it's just how I work and may not be everyones
cup of tea.
> Chris> I'm not impressed because you're just showing off.
>
> Nothin' wrong with that?
>
Of course not ... just be careful to dodge the wet sponges I throw your
direction O:-)
Anyhow ... referring yo your other email...where you said:
> Peace? :)
Umm...okay. For the good of the list, I'll order all recounts to stop, and
call this a draw :-)
Chris...
--
Chris Johnson \ "If not for me then, do it for yourself. If not
sixie@nccnet.co.uk \ for then do it for the world." -- Stevie Nicks
www.nccnet.co.uk/~sixie/ ~---------------------------------------+
Redclaw chat - http://redclaw.org.uk - telnet redclaw.org.uk 2000 \______
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word
"unsubscribe" in the body of the message.
GNU the choice of a complete generation.