Hacker News
The Traditional Vi (2007)
JdeBP
|next
[-]
* https://mastodonapp.uk/@JdeBP/116793159030149624
You can see it here in Ritter vi on lines 83 et seq. of ex_vis.h . vi actually has three flavours of its 'open' mode, for cursor addressable video terminals, non-cursor addressable video terminals, and actual paper terminals.
There's an as-yet unfilled niche for the retrocomputeristas with genuine ADM-3s or (as someone pointed out) TI Silent 703s and suchlike to do a YouTube video showing Joy+Horton vi in its 3 open modes.
Joker_vD
|root
|parent
[-]
JdeBP
|root
|parent
[-]
* https://ex-vi.sourceforge.net/viin/paper-7.html#section53
It's basically the answer to the question of how one does vi-like visual editing when the cursor cannot be moved to arbitrary locations on the terminal, or sometimes cannot even be moved upwards.
Amusing factoid: It's actually sort of the other way around. open mode was added to ex before visual mode was. visual mode is the answer to the question of how you can take advantage of an ability to move the cursor around arbitrarily.
* https://www.oreilly.com/library/view/learning-the-vi/1565924...
VIM and STEVIE never implemented it. VIM makes :open do the same as :visual . nvi and nvi2 issue a 'not implemented' error for the :open nex command. Watcom vi does not even have :open . Nor do NeoVIM, nextvi, neatvi, and viless.
Mortice Kern vi has open mode. So does elvis version 2.
imglorp
|next
|previous
[-]
Of course when I got onto the BSD VAX, someone set me straight and it was Emacs from there on..
GaryBluto
|next
|previous
[-]
voidUpdate
|root
|parent
|next
[-]
himata4113
|root
|parent
|next
|previous
[-]
deadbabe
|root
|parent
[-]
lunar_rover
|root
|parent
|next
[-]
himata4113
|root
|parent
|previous
[-]
christophilus
|root
|parent
|next
|previous
[-]
nosioptar
|root
|parent
|previous
[-]
Looks like dog shit on mobile.
I agree that this general style is good, just without some of this page's fuckups.
kps
|root
|parent
[-]
heftig
|root
|parent
|next
[-]
<meta name="viewport" content="width=640, initial-scale=1">
This matches the max-width specified by the CSS. However, a smaller viewport width might be appropriate to increase the text size on mobile.
Fwirt
|next
|previous
[-]
rav
|root
|parent
[-]
What do you mean by "roff/troff macros"?
EDIT: Ah, you're probably talking about the "section-wise" movements, defined in POSIX with language like "A line whose first character is a <period> and whose second and third characters match a two-character pair in the 'sections' edit option (see ex)" - that's the first time I've stumbled upon the 'sections' and 'paragraphs' options in the Vim manual ... Very quaint!
senthil_rajasek
|next
|previous
[-]
"Gunnar Ritter <gunnarr@acm.org> 2007-11-29"
mghackerlady
|next
|previous
[-]
JdeBP
|root
|parent
|next
[-]
* https://jdebp.uk/FGA/vi-family.html#elvis (https://news.ycombinator.com/item?id=48132452)
whartung
|next
|previous
[-]
My favorite features are the ranges on the commands (like substitute or delete), piping the buffer into the bottomless utility of the classic UNIX command line, and the . do again command.
About the only vim feature I use today is being able to navigate while entering text, but even after all this time, that is not automatic to me.
I have used syntax coloring a couple of times, I find it particularly useful for XML, especially XML with chunks of XML commented out.
soraminazuki
|root
|parent
|next
[-]
- deleting past the insertion point in insert mode
- visual mode
- split screen
- multiple buffers
- text objects
- macros
So even for people who don't care about Vim's syntax highlighting or autocomplete features, I'd assume real vi is a non-starter. I'd choose it over nano (no offence), but still.
sawyers
|root
|parent
|previous
[-]
whartung
|root
|parent
[-]
When shredding things like log files, or raw data file, being able to do things like:
:g/bad line/d
To delete all of the "bad lines". When manually paring down some files, you can use `ma` to do "Mark A" (vs `mb`, which is Mark B). So, I can be scrolling through the file, do the mark when I get to the top of a garbage section, and page or scroll or search to the next "keep" section, and then do `d'a` which means "delete to A", and so it removes all of the stuff I've skipped through.Doing simple things like:
!Gformat (! to shell out, G for "the entire buffer", format is the program)
Which runs the entire buffer through the `format` command to wrap paragraphs. I don't necessarily need that feature in my editor, I have a utility that I can use instead.Of course, you can use `!'a` to a mark. or `!/thing` to run current line to the next "thing" (use `?` for previous).
Banging to utilities is a nice way to develop a pipeline, you basically get to see stuff step by step. So instead of:
grep thing file | cut -f 1 | sort
You can vi the file, `!Ggrep thing`, "Yup!", `!G cut -f 1`, "Ok!", `!G sort` and easily see the intermediate steps. (Not recommended on enormous files, since the entire region is replaced.)The `.` is great for `/word` to find a "word", `cwnew-word`, and apply it selectively. `n` to "search next", and it you like it, `.` to do the `cw` again. Otherwise, keep using `n` until you find the one you like.
And I have no problem running a chunk through a bang command to see what's what, only to just `u`ndo it. (With modern `vim`, you can undo that all the way back to the start if you're doing that pipeline thing.)
And, I would routinely do something like:
ma$%:'aw/tmp/x.x!vi other.txt then /wherever, :r /tmp/x.x
Mark A, `$` to EOL, `%` to closing brace (imagine a C function header), write from mark A to current line to /tmp/x.x, `!` to shell out to a new `vi` session, then read in the snippet.Old school, single session, copy and paste. My /tmp is scattered with x.x, x.y, x.1, etc. files.
Along with regex replaces, this is 95% of how I use `vi`. I'm sure there's a bunch of other features, especially in `vim`, but these few bits are flexible and powerful enough to cover my needs. Since I haven't really been found "wanting", I'm not really "looking".
And it started because `vi` was a singular common denominator across all of the disparate UNIX minis I used to work on, so I just managed to work with what was available wherever I went.
jbverschoor
|next
|previous
[-]
Just give me basic vi, or a complete editor
fragmede
|next
|previous
[-]
JdeBP
|root
|parent
|next
[-]
:x is a vi feature, that was introduced by Mary Ann Horton to actual Joy+Horton vi in February 1980.
* https://code.illumos.org/plugins/gitiles/illumos-gate/+/refs...
Ritter's vi is derived from Joy+Horton vi. Illumos has the original.