home *** CD-ROM | disk | FTP | other *** search
/ Nebula / nebula.bin / Documents / Others / viCourse+ / vi-love.txt < prev    next >
Text File  |  1992-12-20  |  16KB  |  385 lines

  1.  
  2. First, it works.
  3.  
  4. It works on high speed and low speed terminals.
  5.  
  6. It works on smart terminals, dumb terminals, and glass ttys.
  7.  
  8. It works with function keys, arrow keys, meta keys... and just plain
  9. ASCII.
  10.  
  11. It works on every brand of terminal known (Even Tektronix storage
  12. scopes).
  13.  
  14. Second, it's predictable.
  15.  
  16. It has a consistent command set.
  17.  
  18. All commands take a consistent set of arguments.
  19.  
  20. You can always back out of any command in the middle.
  21.  
  22. Third, it's well integrated with UNIX.
  23.  
  24. It uses the same regular expressions as awk, sed, grep, and so on.
  25.  
  26. It handles filters cleanly with little overhead.
  27.  
  28. It doesn't lose file permissions, create backup files, and so on.
  29.  
  30. It doesn't take a lot of resources.
  31.  
  32. Fourth, it's reliable.
  33.  
  34. It keeps a journal file, which has saved my butt after system
  35. crashes more times I can count.
  36.  
  37. It never hides information off teh side of the screen, or in
  38. hidden formatting entries.
  39.  
  40. It never dies silently. If something's wrong, it tells me.
  41.  
  42. It's not for editing huge files, to be sure. But it's a good solid workhorse,
  43. the ADM3A of UNIX editors...
  44.  
  45. I know its quirks, and I rely on its strengths. I don't have to worry about
  46. it letting me down.
  47.  
  48. -------
  49.  
  50. I can count on it being there.  It's on every system that I have
  51. as soon as the machine is running.  No porting, no fumbling with
  52. different keyboard mappings, no worrying about versions (is it GNU,
  53. Unipress, microemacs, etc.).  
  54.  
  55. -------
  56.  
  57. I use vi, emacs, and ed on a regular basis, and like them all pretty
  58. much about the same.  I really like vi for editing text.  The orthogonal
  59. instruction set/object set provides a surprising amount of power, and
  60. I find that its behavior generally fits the Unix idiom quite well.
  61.  
  62. As for intuitiveness, vi's modal nature does make a lot of sense to
  63. those of us who grew up with line editors.  Each to her own, eh?
  64. It does what I want it to do, and quickly.
  65.  
  66. -------
  67.  
  68. I like vi because it is fast. You can instantly teleport to any
  69. portion of your screen. You don't need a mouse, reach up for arrow
  70. or page up and down keys, or bother with function keys.
  71.   This is simpily not possible with the Ctrl-Alt-Shift-whatever
  72. combinations. You must use a two mode editor to move that quickly
  73. to anywhere on your screen. I so much prefer this speed that I
  74. often write text in vi, then inport it into word perfect for graphics
  75. and laser printing.
  76.  
  77. -------
  78.  
  79. I like vi because:
  80. a) it's the faster editor I've ever used for processing text;
  81. b) it rewards study;
  82. c) it's powerful.
  83.  
  84. The fact that so many people whine about it is just icing on the cake.  ;-)
  85.  
  86. Oh yeah, and I love seeing stuff like
  87. :wq
  88. ZZ
  89. :
  90.  
  91. every so often.
  92.  
  93. -------
  94.  
  95. as someone mentioned above, its not perfect but its reliable, and the
  96. quirks are consistent (well almost). I think the phrase that stuck
  97. with me most re: this was posted last year some time. It was
  98. "Vi is like a Ferrari, when you're learning its a bitch to drive,
  99. but once you've learnt its POWERFUL and FAST".
  100.  
  101. -------
  102.  
  103. >I like vi because it is fast. You can instantly teleport to any
  104. >portion of your screen. You don't need a mouse, reach up for arrow
  105. >or page up and down keys, or bother with function keys.
  106. >  This is simpily not possible with the Ctrl-Alt-Shift-whatever
  107. >combinations. You must use a two mode editor to move that quickly
  108. >to anywhere on your screen. I so much prefer this speed that I
  109. >often write text in vi, then inport it into word perfect for graphics
  110. >and laser printing.
  111.  
  112. I totally agree with this.  Every time I have to use some
  113. ``user-friendly'' WYSIWYG word processor... I start cursing the
  114. number of keystrokes to do anything.  I can use vi without taking
  115. my fingers off the home keys (except of course to reach up to
  116. Alaska to hit the ESC key on the 101 key ``enhanced'' keyboards :-)
  117.  
  118. I think the other features I like best are:
  119.     1.  The % key to jump to the matching ()[]...  I use this
  120.         all the time in C programs, shell scripts, etc to find
  121.         the other end of a block.
  122.     2.  The > < operators to indend blocks of text.  Used
  123.         extensively with % above to properly indent things in C
  124.         Programs.  (I've often wondered if the ugly style of most
  125.         of the gnu C code isn't directly related to the EMACS
  126.         idiosyncracies).
  127.  
  128.  
  129. -------
  130.  
  131. One starts to suspect that vi is a religion, not an editor!
  132.  
  133. -------
  134.  
  135. Main reason: I am a touch typist, and yet most other editors insisted on
  136. sending my fingers flying far from the keyboard's home row, or at least on
  137. sticking some pinky to control/alt/meta sort of keys; with vi's interface,
  138. at least on a keyboard with a reasonably placed ESC key (like my beloved
  139. HP2393A's "46021A" kb, currently under attack on comp.sys.hp...), my fingers
  140. are saving kilometers of wasted movement per day; I type and edit more
  141. productively, and my hands get less tired.  The "price" to be paid for that
  142. is obviously the much-hated modefulness of vi, since it's the only approach
  143. to have unadorned homerow keys act BOTH as inserting-keys sometimes, and as
  144. command-keys at other times; it's a price I'm VERY glad to pay.
  145.  
  146. Vi's *extremely* regular verb-object "syntax" (if I know how to *move* to
  147. some place, I also know how to *delete* to it, how to *yank* to it, how
  148. to *change* to it, etc etc) is a secondary but meaningful source of love.
  149. Indeed, the WORST vi commands, for me, are those which do NOT follow the
  150. syntax, such as the infamous ~ for case-switching, which I CAN'T follow with
  151. movement-commands such as ']' to case-switch-to-end-of-line, etc.
  152.  
  153. A third nice point of vi, for me, is NOT using funny/fancy keys - I can't
  154. stay glued all day to my HP2393A terminal, I have to use PC-like keyboards,
  155. Sun ones, sundry IBM ones, even (shudder!) DEC's (alleged) keyboards.  The
  156. normal printing keys, and Ctrl and Esc (well, Ctrl-[ on DEC...) can be
  157. found easily on most any of them; on editors based on F-keys, either on
  158. PC's or IBM 3270-like terminals, I remember MUCHO pain when I had to
  159. switch often between keyboards with PF-keys on TOP, on LEFT (in 2 columns),
  160. on RIGHT (in 3 columns), and so on and on...
  161.  
  162. Vi's marginally less useful in implementations where I can't filter blocks
  163. of text through external programs (MSDOS, VAX/VMS), but not enough to make
  164. me go back to other editors; so, the external-program feechur I can't count
  165. as a crucial one in my vi-love...
  166.  
  167. What I do NOT like: not enough visual feedback (on most vi I can "set
  168. showmode", but NOT on all - and the words describing mode being shown are
  169. often VERY badly chosen ['OPEN MODE', say some System/V's, rather than
  170. 'INPUT MODE', when you go 'o' or 'O'... BUT ex's open-mode is a TOTALLY
  171. different thing$$$], and also they are often mistakenly scrolled onto the
  172. screen [you need a Ctrl-L to repaint]), e.g. a visual mark-highlight block
  173. for subsequent operation as a sometimes-useful alternative to normal
  174. verb-object syntax; even more, not a real, useful programming language for
  175. editor macros (a la Rexx-cum-Xedit, etc).  I guess I could go with emacs
  176. and vip and hack around a bit and make things better, and maybe I shall
  177. when RAM costs are down another order of magnitude and CPU power is up
  178. by as much again... for now, I make do.
  179.  
  180. -------
  181.  
  182. Those of us who use vi exclusively for years probably don't notice 
  183. hitting i and esc, because it has become intuitive.
  184.  
  185. -------
  186.  
  187. Your hands don't have to leave the keyboard to find the F...ing mouse or the 
  188. arrows.
  189.  
  190. -------
  191.  
  192. >One starts to suspect that vi is a religion, not an editor!
  193.  
  194. You're not too wrong there, Mike.  The choice of editors seems to draw
  195. more heat compared to our elections.  :-)
  196.  
  197. -------
  198.  
  199. Another favorite is to change all input up to a particular letter (such
  200. as a comma or a full-stop):
  201.  
  202. cf[LETTER]my input[ESC]
  203.  
  204. -------
  205.  
  206. The only word processors I don't like are the WYSIWYG ones - they chew
  207. up too much CPU time, memory, and disk space.  Like the Macintosh, they
  208. hide too much detail from me and I feel frustrated when I can't see
  209. what is ACTUALLY happening to my document.  Being a programmer, I
  210. prefer text processing languages instead.  In addition since I know the
  211. syntax of the language, I can add output (such as graphs and bitmaps)
  212. from my programs to my document without hassles.
  213.  
  214. -------
  215.  
  216. long, long ago, in a galaxy far, far away, i used to hate vi; then one
  217. day i decided, why not try it?  i mean, all those millions of vi users
  218. just couldn't be _that_ wrong about an editor, could they?  after all, i
  219. had some _very_ bright friends who insisted vi was the greatest (along
  220. with some other very bright ones who insisted emacs was divinely
  221. inspired :-).  i gave it my best shot, & after a somewhat steep learning
  222. curve (along with much glancing at a vi cheat sheet), i found that vi is
  223. _fast_ for my fingers.  what i mean is, i can do _my_ kind of text
  224. editing, i.e., programming, more rapidly using vi than using any other
  225. editor, including the one i learned on, wordstar, or others i've
  226. learned, such as emacs or edt.  i also want to point out that i'd been
  227. an emacs & wordstar fan until i learned vi.
  228.  
  229. perhaps the real reason for all this difference of opinion :-) lies in
  230. the fact that i'm a touch typist; i prefer for my fingers to hang out
  231. around the "home row" of a keyboard.  i've even been known to type
  232. ctrl-[ just so i didn't have to roam too far in search of ESC :-).  i
  233. think this also explains my order of editor preference: vi, emacs/ws,
  234. edt.  in other words, as you move further away from vi, your fingers
  235. move further away from touch-typist-optimized movements.  edt is the
  236. last straw: a keypad editor.  i used to make _dozens_ of mistakes in
  237. edt because i had to keep moving my fingers off the home row, then back
  238. again.  i would inevitably miss the home row sometimes & being a touch
  239. typist, just start typing garbage.  think about the contortions your
  240. fingers go through to type even some of the fundamental movements in
  241. emacs.  now think about those same movements in vi.  i think you can
  242. see why i prefer vi.
  243.  
  244. -------
  245.  
  246. I would like to say that Peter da Silva has said most of what I would
  247. have said. I'm currently typing this at 2400 baud and editting is
  248. NOT a chore. Not too long ago, I used 1200 baud.
  249. Some additions of my own are:
  250. 1)  Access to the ex command set. I used ed for a while years back and
  251.     still find it quicker to use them.
  252. 2)  % to flip between matching braces is a godsend for lisp programming.
  253.     It's pretty good for C, too.
  254. 3)  Marks, m[a-z]. > and < for indenting.
  255.     These speed editting up considerably.
  256. 4)  :s ex substitution. This a MUST. I prefer it to sed since it's
  257.     interactive and undo'able.
  258. And the final capper.
  259. 5)  :map and :map$ macros. This are so short and simple to use that I
  260.     can use them anytime I think I should without going through help
  261.     manuals or man pages. I regularly do maps like
  262.     :map z ^4f(ldt)lDj  to munge text lines. If I'm doing it a lot, 
  263.     I can always map
  264.     :map Z zzzzzzzzzzzzzz
  265.     without blinking. I haven't re-read the docs on macros in well over
  266.     a year and I started vi less than 2 yrs ago.
  267.     So how are macros done in emacs?
  268.  
  269. -------
  270.  
  271. Another great feature is the ability to execute the content of a named buffer
  272. as EX commands.
  273.  
  274. How do vi haters learn vi quickly?  Buy/borrw/beg this book:
  275.  
  276.     "The Ultimate Guide to the VI and EX Text Editors"
  277.     by the Hewlett-Packard Co.
  278.     Benjamin/Cummings Publishing Co.
  279.     copywrite 1990
  280.  
  281. This is a great tutorial and reference (I have no affliation with HP).
  282.  
  283. -------
  284.  
  285. > [...] vi is unuseable to anyone who has used a
  286. > more intuitive screen editor, and I wish old-time unix types would stop
  287. > pushing it on the rest of us.
  288. > mt
  289.  
  290. Actually, I don't think anyone is actually "pushing" 'vi' on anyone, or 
  291. at least not the way I'd picture a "pusher" ... "Psst, hey kid!  C'mere!
  292. Yeah, you, the one with the pocket-protector!  Wanna try a new, far-out 
  293. experience?"  Opens his coat revealing reels of mag-tape.  "Ye-e-e-eah, 
  294. we call it, 'vi'!"
  295.  
  296. This gets back to one of 'vi's pluses.  It's there.  Pure and simple.
  297. Nobody's pushing it.  Nobody's charging you an arm and a leg for it.  No
  298. massive billboards all over the landscape.  It's just there.  If you
  299. have Unix, and you know 'vi', you can get started right away, because 
  300. you _know_it's_there._  It's _always_ there.
  301.  
  302. Other editors are rarely there.  If you like Microsoft Word, you're 
  303. going to find yourself working at a company that owns WordPerfect.  If 
  304. you love the heck out some public domain editor, you'll find yourself
  305. with an Administrator who hasn't the time to hunt it down, or doesn't
  306. have the resources to install it for you.
  307.  
  308. But if it's Unix, or any of the popular clones, and even most of the
  309. unpopular clones, 'vi' is there.
  310.  
  311. Once you know it, it's second nature.  Even if you prefer other editors,
  312. and for some applications I do, you can still fall back on 'vi'.
  313.  
  314. Old reliable.  'vi' doesn't mind if you use other editors or word
  315. processors.  It doesn't get jealous.  It'll still be there, waiting with
  316. open arms, when you need to do ":%s/^/> /" to quote an article, or some
  317. other esoteric application that's difficult or impossible in the typical
  318. WYSIWYG editor.
  319.  
  320. Then, for those who don't like 'vi', and there's plenty of reason not
  321. to, there are lots of expensive and free alternatives.  They just aren't
  322. there, that's all.  You have expend effort to acquire them.  You have to 
  323. justify the time and expense.  You have to fill out the paperwork.  You 
  324. have to get management permission.
  325.  
  326. You need do none of that for 'vi', because it's already there.
  327.  
  328. In conclusion, I guess that all I have to say to the 'vi' haters on 
  329. the net is ... who needs ya?  You want something else, it's out there.  
  330. You may feel it's worth the effort to get a "better editor," and that's 
  331. fine.  Buy it.  Use it.  And don't complain.
  332.  
  333. But remember.  When you get that great job with more money and a
  334. promotion, but you have to move to another state or another company ...
  335. 'vi' will be there.
  336.  
  337. -------
  338.  
  339.     It is a big setback of vi that it does not have an on-line help system (by
  340.     function) and an informative but brief 'learn-by-example' on-line manual.
  341.     (The explaination of advanced commands in the man-page hardly makes sense
  342.     unless you already know what they are.)
  343.  
  344. I *LOVE* vi, but I hated it bitterly when I had to learn it after
  345. getting so used to Xedit. Vi would be much more appealing to beginners
  346. if it had an on-line help -- those who started to learn vi normally do
  347. not even know how to use man pages. And it took LONG before I became an
  348. efficient VI user (you got to start to know m'`, fFtT, ^]0, LMH, ]]/[[, %, G,
  349. and markers before you would love it.) -- I did not have a GOOD SIMPLE vi
  350. reference!!!
  351.  
  352. -------
  353.  
  354. Wonder why I love vi? Some of my favorite are:
  355.  
  356.     within-finger-reach and short commands to move, seach, modify -- enabling
  357.     me to type fast (I am a self-taught touchy typiest).
  358.     the great invention of integrating the edit commands and movement commands
  359.     '.', u, p, y, g, v, ^D with input mode, o, O, >>, <<
  360.     tags, marks, buffers, abbrivation, macros
  361.     integration with unix through filter (":$ ...."), plus some knowlege of
  362.     AWK (an half-day investment) -- However, I couldn't understand
  363.     or get any clue of the filter's usefulness from the on-line manul.
  364.  
  365. -------
  366.  
  367. It is especially great for those who edit programs most of the time: it has 
  368. a tag system and an excellent set of cursor movement and/or positioning
  369. commands, and they are just under your finger tips -- this may not be fully
  370. appreciated by text-editing people.
  371.  
  372. I was once tempted to learn emacs because vi does not offer window or 
  373. text-formating fuction. And I became quite proficeint with Emacs. But I
  374. cannot stand its key-strok-inefficiency (both in the numbers and 
  375. easy-to-reachness) even with basic cursor-movement commands. Many of Emacs
  376. facilities are great but not frequently needed. They can mostly be compensated
  377. by vi's shell filter, which is a little clumsy but it's a lot of trouble to
  378. remember or find their Emacs conterparts through on-line help anyways.)
  379.  
  380. I would be totally satisfied if VI has windows and simple text-formatting
  381. facility like paragraph-formatting.
  382.  
  383. ely ACugugu, I uERar cbr
  384. hiACug