Vi IMproved -- Vim
Learning to crawl
Books describing editors generally fall into two categories. The first category of books will describe a particular function (like moving through a file) with all the known ways for performing that function, ad nauseum. The second category distills the myriad of ways to perform that function into a handful of the most common or most useful ways. Vi IMproved -- Vim combines both methods with good results.
The first section of the book is entitled Basic Editing; this section introduces the reader to starting and using Vim effectively without getting too bogged down in the gory details of Vim's vi heritage. In the chapter on moving around, the author begins with two methods of movement. In the details portion, the author has the reader performing more complex movements. This is a good approach, much like learning how to walk before learning how to hop, skip, jump, and dance through your document. Unfortunately this approach makes using this book as a reference very difficult. I would read sections that I wanted to use later, only to realize I couldn't find the section again. Vi IMproved -- Vim more than makes up for this shortcoming with a generous appendix detailing the Normal Mode, Command Mode, and Visual Mode commands along with a well-designed quick-reference section.
Made to Order
One of the strengths of Vim over other vi clones is Vim's ability to be used as a regular GUI application, and not just as an xterm-enhanced application.
Vi -- IMproved Vim shows not only how to use the GUI, but also how to customize the GUI to fit the reader's preferences. A good portion of this book deals with customizing Vim to suit the reader's style through the various parameters, menus, and GUI elements. Users who like their editors as stock as possible will find themselves skipping a lot of pages in this book. However even they will be tempted to try out some of the neat functions that pop up as they flip through the pages. The author conveys a sense of exploration, inviting users to experiment and try out new things with Vim.
Errata
Unfortunately, with vi and its clones, a single letter can mean the difference between moving through the document and deleting half of it by accident. Vi IMproved -- Vim is plagued with typos and errors, making this a difficult book for newbies to get into without having the errata sheet from http://vim.sf.net handy. It's understandable why a book like this would have some errors, especially with vi and Vim's terse keyboard commands.
Conclusion
Users of Vim will no doubt be thrilled with Vi IMproved -- Vim. Having a reference outside of the help menus in the program is a godsend for any user of Vim. Unfortunately the errors in this book mar what could have been the definitive book for Vim users, but for those who are starting out with Vim, or who would like to know more about Vim, this book is the perfect starting point and reference. The book covers the 5.x series of editors, but that shouldn't be a problem for most people looking to get started with the 6.x series.
If you're using Vim, you need Vi IMproved -- Vim.
You can purchase Vi IMproved from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Vi RoxoR
"Boy! I wish there was some sort of book for vim." Maybe that's just me... I don't generally read manuals even when given the choice. More fun to make discoveries as I go.
Next: ls for dummies
[mandatory troll about how EMACS 0wnz Vi/Vim here] :)
--pi
Finally!
Something that I can use that's better than ed!!
(sorry, it was that or some emacs crack)
Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
Vi Improved
As opposed to those people who are too dumb to use proper grammar.
emacs vs. vi pun?
Oh.. why bother, the weight of all that fighting is keeping me down.
s/to/too/
09F911029D74E35BD84156C5635688C0
Jesus loves you, I think you suck
apparently it's for people that don't know english....
Download VIM from here.
This space for rent
One reason migh be because vi is available on almost every Unix system.
One just cannot administer a Unix without at least grokking vi...
It's hard to take seriously a text editor named after a sink cleaning product.
Vim
-----
I'll just do my part for the emacs team and state that:
You get spoiled by it's features.
I use Vim on my Debian box at home, but I am stuck with standard vi on the Solaris boxes at work.
I really miss some of its features when I'm "stuck" with "vanilla" vi.
I'm afraid if I get this book I'll miss it even more.
Heffel
Expert Java EE Consulting
"Enron Biotech has discovered a gene which may explain the sharply divided preference in the hacker community between Vi and Emacs," said George Stefanscamoulus . "this may help us to utimately produce the perfect hacker". "Only we still haven't figured out which program is really the best. More R&D is needed."
[mandatory flaming response about how Vi/Vim 0wnz EMACS here] :)
--pi
A book written to guide the newbie through a prickley (powerful!!) editor and it's chock full of errors?? The whole point of purchasing on of these is to provide a leg up the learning curve.
Sorry, no sale.
(The authour probably uses emacs, or worse, Word.)
"Remember, any tool can be the right tool." -- Red Green
see subject...
I thought that was called Emacs.
TASTES GREAT! (emacs users)
LESS FILLING! (vi users)
The errata sheet can actually be found here. The link in the story was only Vim's home page.
Rich
What does it provide that the Vim HOWTO doesn't? This strikes me as useful as a 'Developers Guide to ctags'.
~~ What's stopping you?
Although I am a die-hard emacs freek, on occasion I use one of those spiffy one-handed chording "keyboards", and I must say, vi *rocks* in that case.
Okay, that's all. Get back to your cubicles and your Nerf(tm) Mortar Launchers.
... ora's "learning the vi editor"? it has almost 40 pages on vim, and is (as usual with ora) a very good book.
Mods, please check the link before
moderating to 5 Informative.
Expert Java EE Consulting
Good help files for a unix app? Yeah right, that'll be the day.
But after having had to use vi so often, it's sorta stuck on me, and I've never had a want to use anything else.
Trolls lurk everywhere. Mod them down.
do we really need brief book reviews that give a 7.5 out of a 10? really, what is the point of the dot-5? what about this book kept it from being a pure 8? it was certainly better than a pure 7, though!
Listen most programmers I know use emacs and love it. They love the features and they are use to the interface. fine.
_ _
Yet, I am a sysadmin at heart and when it comes to editing things on the fly. vi is everywhere. It does not matter what way-old silly box sitting in the corner that I find vi is there. Sometimes I get stuck on windows box for a second and find myself hitting the ESC key. HA!
I do not why things have to always have to be so heated. If you know and like emacs use it otherwise set EDITOR=vi and be done with it.
People use different tools for different tasks sometimes because one is better than the other. Sometimes it is a just a matter of personal choice. Why this is so hard to understand is beyond me.
_______________________________________________
ACK
Perhaps they're just bitter that they haven't been near female genitals and therefore will moderate any post mentioning females down.
Vi(m) is for people are to dumb to use Emacs.
Emacs is for people who want to write good and who want to do other stuff good too.
Once more unto the breach, dear friends, once more, Or close the wall up with our American dead!
I think most people will find all the VI they need to know on the Vi reference card at vh224401.truman.edu
The obvious answer to that R&D is to ask Gene Hackman which he prefers.
He'll probably blow us all away and say something completely out of line. Like, "pico".
-Riskable
"Those who choose proprietary software will pay for their decision!"
Vim is much better than that six editor.
:-)
his suggestion? mg - it's apparently "like emacs" except "without the bloat".
2 1337 4 u!
i can understand the funny mod. but the informative, et. al are a sad testament to our moderators.
-- john
Inability to use the preview button aside:
Most emacs users know how to use vi.
Few vi users know how to use emacs.
Form your own conclusions.
:wq
09F911029D74E35BD84156C5635688C0
Jesus loves you, I think you suck
and while you're at it:
M-x repl-str 'people are' 'people who are'
Liberal (adj.): Free from bigotry; open to progress; tolerant of others.
.. is a luck of a good man page on its commands .
Internal help is cumbersome and annoying for unexperienced users because it's not flat and navigation requires knowledge that you can get only after reading that help.
Block operations are too complicated and
word star's ctrl-k-b - ctrl-k-k are much superior.
I can't understand how in vi select some block of text and write it to some other file... (can someone reply me with explanations how to do it? )
If I need block operations I switch to joe editor...
One other annying thing: why when I press
in insert mode, cursor on screen goes back one character? Is it possible to tune vim to not do that?
But for all other stuff, semantical coloring and speed vim is great.
What got me suspicious was that the link was to gnu.org and I was pretty sure that VIM wasn't completely free... The 'emacs' at the end of the URL was a giveaway. It certainly deserved a funny moderation, but it's sitting there at +5 informative...
vim is for people who want to extend the editor in the language of their choice.
extensive use of emacs will damage your fingers. i heard a guy died once.
You know you're a real sysadmin when you can edit your /etc/fstab with ed in single user mode.
Lemme hear an "Amen!" from my brothers who have been there, done that.
09F911029D74E35BD84156C5635688C0
Jesus loves you, I think you suck
With vi in command mode almost all the keys around bound a screen movement, or editing command. I can jump around an entire file, search/replace and do any number of complex and repeditive editing operations without taking my hands off the keyboard. In many cases I dont even have to take my hands off the homerow.
Vi is a powerful, small (memory), and fast editor thats available on every unix system I have ever seen.
The End.
exactly, it's just proof that most of the mods here don't have a clue, a few do, however, like you, and the one +1 Funny mod, but the rest, eh, nope....
yeah the gnu.org link set me off too. the sad thing is how easy it is to confirm. it's not like an obscure reference with a link provided. it's really pathetic in a way.
-- john
I prefer nVi to anything else, because size do matter. Oh, and the license is nice, unlike EMACS and Vim.
even more so thast nobody realized it.
... ;)
Once you posted the spoiler, the mods are going trigger-happy with that comment
nt
All thezz *nix stuff sucks
can be found here
Logic is not Divine.
El riesgo vive siempre!
Most emacs users know how to use vi
:wq, then yes, most emacs-ers can cope with vi, and by the same argument, most vi-users can cope with C-x C-c and the cursor keys and therefore `know how to use emacs'. And in each case, the user will be more familiar with the functions of their preferred editor.
Few vi users know how to use emacs.
On what evidence are you basing that ridiculous assertion? If you count `know how to use vi' as being familiar with i,ESC and
Stupid, why not use standard regex instead as you do in vi, clearly an design flaw in Emacs. :1,$ s/people are/people who are/g
Doesn't that mean that vi is really 'vile'. Yeah, an old one, but I couldna resist :-)
This is an excellent piece of work. It has all of the commands and tells you which ones are vim extensions. The postscript version can be printed in book format, add 2 staples and your set.
+3 offtopic, at the time of this writing... I think that's the highest "bad" mod I've seen so far.
Whoever stated that signature sizes should be limited to one hundred and twenty characters can just go ahead and kiss my
Unfortunatley, according to the linked website, the book only covers up to version 5.7. That means you miss out on some useful features like code folding, some screen splitting, etc.
--You will rephrase your request for me to go to hell. Goto statements are not acceptable programming constructs
Errata
page 1 For ``True is one of the most important utilities in the entire Unix toolset'', read ``True is one of the least important utilities in the entire Unix toolset''.
I had a clue, and moderated it up to be subversive.
This is the worst book. I was a VIM newbie coming from Windowz land and the book did more to hurt me than help. It is very poorly written and has so many errors that you can't trust it. Even if the errors were fixed in a second version it'd still suck. The organization of the book is just afwul, I'd hate to see code the author generates if this spagattii is what he writes. Ick. Save your cash. Look at the customer reviews at Amazon.Com, there are quite a few "excellent" reviews, but more telling are the rare awful reviews:
... perhaps I can get a refund? Any other suggestions?
.* unless you anticipate that there would be more than one comma on a line, in which case, any command would fail. :substitute command. Take a breath Mr. Oualline, and teach the basics first.
:-) BIG raspberries to New Riders for letting this slip through without proper editing. And thanks to Bram, who put up an unofficial list of errata at www.vim.org.
*____ Disorgainzed, Haphazard explanations -- refund time, April 8, 2002
Reviewer: Cameron from Washinton, DC
This book is poorly structured, for example, as a newbie I tried to figure out how I could insert a file into my current buffer... simple operation, yet with this book it took me 20 minutes before I literally stumbled accross the appropriate place in the book. This book is not organized well and it hurts. Further, the author doesn't explain VI concepts well at all. The reference part is just as dis-oraganized as the rest... just try to find what you are looking for. What made me write this review is that I just wasted another 10 minutes looking for how I can have two buffers open (but not two windows) Anyway, I've given up on this book
*____ Too confusing and too many errors, May 19, 2001
Reviewer: James Snyder from Mt. Holly, NJ United States
So far I have only read up to page 118. The large number of errors I have found so far is mind-numbing. I pity the poor beginner who has to plow through these mistakes in order to try to understand the vim program. For those who already have a copy, I ask you to compare figures 2.4 and 2.5 and tell me what is the difference between the two sets of arrows. Look at figure 2.13 and find the two outright errors, the inconsistency, and the point that might be confusing to a beginner. Read the section entitled 'How to Change Last, First to First, Last' on pages 103 and 104 and find the following:
1. The \(, \), \1, and \2 used here will not be introduced until page 213.
2. The regular expression in figure 9.2 is labeled a 'command', while the command itself is found nowhere.
3. The dollar sign in the regular expression is redundant.
4. The [^,]* could be replaced with the simpler
5. The space after the comma in the names file is not properly accounted for.
6. Who changes last, first to first, last anyway? It should be changed to first last, with no comma.
This nonsense appears just after the author has introduced the
These are not isolated problems, the whole book is like this.
My opinion is that:
1. Mr. Oualline has too much experience with vim to remember the needs of a beginner.
2. The artist who created the figures seems to have no experience with vim whatever.
3. The review process at New Riders is too careless.
***__ Does anyone actually read the books they review???, July 23, 2001
Reviewer: David F DelGreco (see more about me) from Fremont, CA USA
I decided to learn Vim because I work on WinNT/2K, Linux, and Macintosh boxes. Using a single editor makes it easier to work on mulitple platforms.
My review of this book is mixed. First, it's the only book on Vim and it contains a lot of information, so that's a plus. Also, it shed a lot of light on using the editor that, frankly, the help files did not (you can look up *ANYTHING* via ":help ", but the documentation is not very accessible to the new user). However, the typos, errors, bad grammar, and personal idiosyncracies of Mr. Oualline just have to be seen to be believed.
You can figure out most of the errors easily enough. For example, there's a reference to the non-BUI version of Vim (I think he meant GUI)and for some reason, in the word "filename", when used as an example (e.g., "type 'vim filename'"), the "fi" is sans-serif while the rest of the example text is in bold Courier. There are, however, numerous places where the diagrams don't match the example being discussed in the text or are just plain wrong. Some of these left me wondering if I had missed something, but trying out a command in Vim quickly showed the diagram was wrong. My favorite goof is where '#' (the command to search backwards for the word under the cursor) is shown in numerous places in Appendix C (pp. 445, 449, and elsewhere) as a British money sign (e.g., "/count/ L"), where L is the pound sign. Get it? Pound sign? Obviously the person who did the Appendices and Index (and copy-editing???) was not Mr. Oualline.
With regard to the content, I found that Mr. Oualline is very idiosyncratic. Vim is VERY flexible, using ancient Vi ways of doing things, as well as more modern ways that are easier to use. Take yanking (copying) a block of text to a register (like the clipboard). *Mouse way*: select lines, press y. *Visual way*: move cursor to top of lines to be selected, press V, select lines, press y. *Vi-ish way*: go to top of lines to be selected, press "ma" to drop a mark labeled "a", go to bottom of lines, type y'a (yank from current position to mark "a").
If you consider these different styles (mouse, visual, or Vi-ish) to approaching the same general problem, Mr. Oualline always goes with the Vi-ish style, to the point of also showing you in many cases how to precede the command with a line range instead of using marks. Where Ctrl-Wn (open a new window) will do, we get Ctrl-W Ctrl-N (equivalent). Where Ctrl-W moves down one window, we get Ctrl-W Ctrl-J (the arrows aren't mentioned). My guess is that this is not how the majority of new users will use Vim (though it might be handy if you find yourself using Vi or Vim via telnet).
A real barrier to learning the editor is the immense number of variations for accomplishing a given task. Multiple keystrokes to accomplish the same thing, as well as different approaches. What would be great for Vim is an attempt to break down tasks into functional groupings (movement, formatting, programmer stuff, managing buffers/windows) and choose a style (probably visual mode, which is almost interchangeable with mouseing) so you can say "here's a good way to get started." The many variations can be left as an excercise for power users. They are available in the online help, anyway.
All in all, I learned a lot about Vim from this book. But if I hadn't been determined to do so, I would have given up. If you want to learn Vim and the online docs aren't doing it for you, buy this book. You've been warned, so just chuckle when you come across errors and general weirdness. Kudos to Mr. Oualline for writing a book, but don't give up your day job.
:help comment
I started using VIM on Linux years ago and now I can't live without it. I had to install GVim for KDE , Gvim for Windows, Vim on SCO, Vim on Solaris, Vim for DOS, any station I use must have a copy or else I start typing VIM keystrokes in the middle of my documents. Heck, I'll be in Open Office and I'll type [ESC]y2l (yank 2 lines) or [ESC]w (next word) in the middle of a sentence before I remember I'm not in Vim.
"As flies to the wanton boys are we to the gods; they kill us for sport." - William Shakespeare, King Lear
I am a programmer who used this book to learn vim.
Before, I had been an (x)emacs user for several years, but I can edit far faster with vim. Not sure why the reviewer feels there were many typos in the book--I didn't notice them at all.
Every now and then, I pull down the book, open up to a random page, and learn whatever command is there. It's been a great strategy so far.
For those on a budget (or cheap) New Riders has released the book here
UNIX/Linux Consulting
Runs everywhere with plenty of add-ons. Plus one that emulates VI.
jedit.org
Emacs is for people who want to write good and who want to do other stuff good too.
And do grammar good?
Everyone knows this; nobody cares: good is an adjective (which describes a noun, e.g. "good grammar"), not an adverb (which describes a verb). So it should be "write well" and "do other stuff well". Same story applies to bad (adjective) and poorly (adverb).
Please be kind moderators! The fact that I got into a vi/emacs holy war about which I don't really care should be sufficient reprimand for the off-topic post. (It's also flamebait since somebody will find some subtle spelling or grammatical error here...).
In the voice of Neil from The Young Ones:
"Ohhhh, I get it. Alan's called Vim and you're Mum's dead."
"oohhh... I didn't know Schopenhauer was a philosopher!"
Yes, absolutly. Vim is obviously so easy to use compared to Emacs, that anyone can use it.
Which is sort of the point.
I had a +4 troll at one point. :) It had been at +5 funny. A Neal Stephenson joke. Some mod did not get the ref and thought it was a troll.
Cypherpunks: Civil Liberty Through Complex Mathematics. Those who live by the sword die by the arrow.
Comment removed based on user account deletion
At work, having to deal with code without a decent editing environment (like SQLServer stored procedures editing) I missed vi but solved the problem with a free tool: winvi.
http://www.winvi.de
It's understandable why a book like this would have some errors, especially with vi and Vim's terse keyboard commands.
Was it written in Vim or something?
Try FTE.
Expandable like emacs.
Small and fast like vi.
Simple Dos-edit-like interface with shift select and alt menus.
-=-=-=-
-=-=-=-
Oh, and here's another advocacy gem from Usenet:
-=-=-=-
Since I'm still fighting to get my lines long enough to satisfy the lameness filter, I might as well throw in another this old joke while I'm at it.
(Attribution at the bottom of the post)
/bin/ed -rwxr-xr-t 4 root 1310720 Jan 1 1970 /usr/ucb/vi -rwxr-xr-x 1 root 5.89824e37 Oct 22 1990 /usr/bin/emacs
When I log into my Xenix system with my 110 baud teletype, both vi *and* Emacs are just too damn slow. They print useless messages like, 'C-h for help' and '"foo" File is read only'. So I use the editor that doesn't waste my VALUABLE time.
Ed, man! !man ed
ED(1) UNIX Programmer's Manual ED(1)
NAME ed - text editor
SYNOPSIS ed [ - ] [ -x ] [ name ] DESCRIPTION Ed is the standard text editor. -----
Computer Scientists love ed, not just because it comes first alphabetically, but because it's the standard. Everyone else loves ed because it's ED!
"Ed is the standard text editor."
And ed doesn't waste space on my Timex Sinclair. Just look:
-rwxr-xr-x 1 root 24 Oct 29 1929
Of course, on the system *I* administrate, vi is symlinked to ed. Emacs has been replaced by a shell script which 1) Generates a syslog message at level LOG_EMERG; 2) reduces the user's disk quota by 100K; and 3) RUNS ED!!!!!!
"Ed is the standard text editor."
Let's look at a typical novice's session with the mighty ed:
golem> ed
? help ? ? ? quit ? exit ? bye ? hello? ? eat flaming death ? ^C ? ^C ? ^D ?
--- Note the consistent user interface and error reportage. Ed is generous enough to flag errors, yet prudent enough not to overwhelm the novice with verbosity.
"Ed is the standard text editor."
Ed, the greatest WYGIWYG editor of all.
ED IS THE TRUE PATH TO NIRVANA! ED HAS BEEN THE CHOICE OF EDUCATED AND IGNORANT ALIKE FOR CENTURIES! ED WILL NOT CORRUPT YOUR PRECIOUS BODILY FLUIDS!! ED IS THE STANDARD TEXT EDITOR! ED MAKES THE SUN SHINE AND THE BIRDS SING AND THE GRASS GREEN!!
When I use an editor, I don't want eight extra KILOBYTES of worthless help screens and cursor positioning code! I just want an EDitor!! Not a "viitor". Not a "emacsitor". Those aren't even WORDS!!!! ED! ED! ED IS THE STANDARD!!!
TEXT EDITOR.
When IBM, in its ever-present omnipotence, needed to base their "edlin" on a UNIX standard, did they mimic vi? No. Emacs? Surely you jest. They chose the most karmic editor of all. The standard.
Ed is for those who can *remember* what they are working on. If you are an idiot, you should use Emacs. If you are an Emacs, you should not be vi. If you use ED, you are on THE PATH TO REDEMPTION. THE SO-CALLED "VISUAL" EDITORS HAVE BEEN PLACED HERE BY ED TO TEMPT THE FAITHLESS. DO NOT GIVE IN!!! THE MIGHTY ED HAS SPOKEN!!!
--
From: patl@athena.mit.edu (Patrick J. LoPresti)
Message-ID:
Sender: news@athena.mit.edu (News system)
Subject: The True Path (long)
Date: 11 Jul 91 03:17:31 GMT
Newsgroups: alt.religion.emacs,alt.slack
Organization: Massachusetts Institute of Technology
Lines: 95
Tales from behind the Lagom Curtain
Well moderated! this is the mother of all flamebaits.
Be wary of any facts that confirm your opinion.
I don't use VIM, just because nvi does exactly what I need it to do and I'm not a programmer. But, you can also do :g/people are/s//people who are/ :) I learned that fromthe Vi pocket refrence from O'reiley which I look at when I get stuck or forget something.
No, dog is God spelled backwards with the all characters lowercased.
God was here first.
quote
Most emacs users know how to use vi.
Few vi users know how to use emacs.
Form your own conclusions.
endquote
Vi must be easier to use. Or more available. Or simply worth the effort of learning.
Would that be a hacker who uses Viper?
It was a Zoolander reference. It was meant to be wrong.
What about the great Slashdot troll post investigation?
Vi users are wonderful and smell good.
I've had a +5 flamebait. It happens when you have a +5 post, someone down-moderates it, and then posts in the thread -- the score moderation is undone, but the label (flamebait) remains.
Man, it must be so cool bing a SuperFan.
where are they? where can i get a chord?
Emacs is improved beyond vi.
Although the Apple Store still wants too much money for one.
If I'd had modpoints it would have gone Insightful - subversive / idiotic moderation rules.
...anyone who has so much time on their hands to read a book about a text editor needs to get out more or needs more work to do. I learnt about 10 commands in vi 10 years ago and thats all I've ever needed. I have better things to do than learn how to copy a block into a different file in vim etc because I can do that using X windows cut & paste. Hey , maybe you can write a database in some built in scripting language , who the fuck cares? And apart from some 13 year old geek sitting in his bedroom on a saturday night cos he's got no mates who the hell would bother to try?? Just my 2ps worth
Moderation Totals: Offtopic=2, Insightful=1, Funny=1, Overrated=1, Total=5.
Funny thing is, it was up to +4 at one point before it got modded into oblivion. Oh, well, time to post some pointless MS bashing to get back up to max karma...;)
There are only two kinds of people who don't like 'vi':
1) Those who can't type
2) Those who don't understand 'vi'
Yes, Emacs has a programming language that theoretically gives you some advantages, but you can't beat the power of 'vi' for being able to do complex edits extremely quickly (without having to write a program).
Sometimes it's best to just let stupid people be stupid.
Well, there are enough little changes between 5 and 6 that doing anything beyond "looking to get started" is a pain. Why write a review of a book that's been out for some time now, and is due for an updated edition?
Java is the blue pill
Choose the red pill
Maybe "Informative" was a poke at humor?
Of all the things geeks fight about, it's always the text editor that draws the most blood. For an outsider it must sound rather petty. ;)
I've found vim to have extensive documentation, though sometimes, just finding the right information is incredibly difficult to do. (I just end up grep -r ing the documentation dirs)
If you're starting out, a cheaper hard copy alternative just to get you started (since one of the major roadblocks is the initial learning curve) is the vi quick reference from O'Reilly. Nice too that it points out vanilla commands vs implementation specific ones. Information is nicely arranged too. I think I've even seen printable posters with beautifully arranged command maps.
Myself, I only use the basic commands anyways, I don't need the full set of features. I work on so many systems that customization is not an option. And sometimes, all these extra options just get in the way. Magic indents are interesting, ability to execute perl is interesting, but I don't really need them, infact I find them annoying. (I end up undoing the formating that vim magically formats for me) For my personnal system, I usually end up remove all the xyzzy and stick with the basics.
This book looks like a good step forward (at least I can search a pdf in one shot!) but it starts out telling me lots I already know how to do because it's just vi, not the improved part. Where's the single doc "here's what we improved"?
7 November 2006: The day Americans realized corruption and incompetence weren't addressing 11 September 2001
While emacs makes a nice development environment, I think it really sucks as an editore nch-8
/me dives for his nomex suit
I just can't get the hang of escape-control-shift-middle-drag-rightwink-buttcl
I hate vi (too weird) and emacs (weird, and bloated). Well, I should say I made a run at emacs once but never bought into the lifestyle so it was just too much overhead for simple edits.
I've instead been a longtime fan of joe. Simple, lightweight and powerful enough for more complicated jobs. AND it's user friendly.
If you like VIM, think about making a donation to ICCF to help kids in Uganda.
More info in VIM (:help uganda) or at http://www.vim.org/iccf (not http://www.iccf.org).
From www.gnu.org...a take on "addicted to love" by
Robert Palmer.
--------------------
As you sing this, it may help the effect to imagine a dozen women, all of
whom resemble Bill Joy, dressed in black and dancing sinuously.
Addicted To vi
(with apologies to Robert Palmer)
You press the keys with no effect,
Your mode is not correct.
The screen blurs, your fingers shake;
You forgot to press escape.
Can't insert, can't delete,
Cursor keys won't repeat.
You try to quit, but can't leave,
An extra "bang" is all you need.
You think it's neat to type an "a" or an "i"--
Oh yeah?
You won't look at emacs, no you'd just rather die
You know you're gonna have to face it;
You're addicted to vi!
You edit files one at a time;
That doesn't seem too out of line?
You don't think of keys to bind--
A meta key would blow your mind.
H, J, K, L? You're not annoyed?
Expressions must be a Joy!
Just press "f", or is it "t"?
Maybe "n", or just "g"?
Oh--You think it's neat to type an "a" or an "i"--
Oh yeah?
You won't look at emacs, no you'd just rather die
You know you're gonna have to face it;
You're addicted to vi!
Might as well face it,
You're addicted to vi!
You press the keys without effect,
Your life is now a wreck.
What a waste! Such a shame!
And all you have is vi to blame.
Oh--You think it's neat to type an "a" or an "i"--
Oh yeah?
You won't look at emacs, no you'd just rather die
You know you're gonna have to face it;
You're addicted to vi!
Might as well face it,
You're addicted to vi!
Copyright 1989, by Chuck Musciano. All Rights Reserved
Emacs really stands for "Esc-Meta-Alt-Ctrl-Shift", you know.
How do I know this? Well, I use a vi clone on Windows, and if you get the wrong window in focus and start doing "vi stuff", you are in for a world of pain.
Clearly, Windows is broken, if it has all those millions of lines of code and it can't even support one little application!
Now if they would only release a book on how to use Gir...
"I love you, piggy!"
Any Text Editor That Needs A Book is hopelessly broken. The editor that comes with MSVC is usable without a book. What can VI/VIM do that it can't? More importantly, what can a wide variety of alternatives do that VI/VIM can't? If you are nostalgic for the "good old days" when the ability to edit interactively was considered a great leap forward, then by all means use something like VI. As for me, whenever I have to deal with a *NIX box one of my first questions is "is there another editor on this box?". You may see the obtuseness of VI as part of the initiation; I see it as damage and route around it. Improving VI? That's like improving the buggy whip.
For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
Notepad is the way to go, baby!
Thomas Galvin
On slashdot, you haven't done anything until you've gotten at least one +5, Troll.
...is that it has the worst index of any book I've bought in recent years. With this index, quickly searching for information is almost impossible unless you're searching for info that's fairly obvious to any vi user. Because of this, the book is probably a decent tutorial but it sucks as a reference.
Much better references can be found in the ViM help documents. In fact, the documentation is better from the included help IMHO; the problem is navigating the help files is about as intuitive as using info (which I think is about the least intuitive document navigation system ever produced).
I have learned a lot about ViM from browsing the book, though, so I can't totally trash the book. I just think there's lots of room for improvement.
EMACS 0WNZ VI (Score:1, Flamebait)
by The Pi-Guy (wiseguy586@@@yahoo...com)
NO, VI 0WNZ EMACS (Score:1, Funny)
by The Pi-Guy (wiseguy586@@@yahoo...com)
Only on slashdot ...
To really improve vi you have to remove everything that makes vi vi, especially that dreaded and obsolete command/editing mode switching. Thus you could call emacs an improved vi as well.
Vim also can embed a Python interpreter (and perl too.. but... ). I have spent a little time setting up Vim to be the centerpiece of a Python IDE. If anyone is interested in my stuff send me an email. Perhaps we can exploit the built-in Python even further to make it even better. Who knows... perhaps a Python-zippy for Vim is just around the corner...
--
The early bird catches the worm. The worm that sleeps late lives to see another day.
you only need vimtutorual and :q! and :wq and know that esc can get you into command mode and i will insert text.
simple..
keanmarine.com
How do I mark a section of text (say lines 20->25) and then automatically indent them 5 tab spaces (or maybe take a tab space out of the beginning)?
Bryan
The first time I heard that, I was with the (then) current maintainer for GNU Emacs. Who muttered "But it's only six". . .
Geez. Fifteen years and we still haven't taken over the world.
Take advantage of the shift width operator
Set the shift width to some arbitrary size, but usually it helps to set it to the same size as your tab stop.
Move to the line at the beginning of the block you wish to indent. "20G"
Tell you want to shift the next five lines "5>>", where >> tells vi to indent by a shift width and tells vi to remove a shift width
Repeat as many times as necessary "...."
Indent specified lines (if you want real tabs set shiftwidth & expandtabs appropriately)
Remove one level of indentation
Another attempt with hopefully correct formatting
:20,25>>>>>
:20,25<
You may be looking for :20,25>>>>> . Or if you don't know the exact line numbers, move to the last line, mark it 'a' with ma, move to the first line, and then :.,'a>>>>> . This will move the lines over by five times the "shiftwidth". (How many columns this is and whether you get tabs or spaces depends upon, among other things, the shiftwidth, tabsize, expandtabs and smarttabs settings.)
Esli epei etot cumprenan, shris soa Sfaha.
Sorry folks, but at the speed that kdevelop and anjuta are going I would say that this holly war is probably going to an unexpected end... :-)
Thank god!
I found this VI tutorial particularly easy to follow.
"Oppression and harassment is a small price to pay to live in the land of the free." -- Montgomery Burns.
This is supposed to be hard?
Heck, I used to program using ed. You get real good at doing things like:
-17,.p
to see the current page.
Guess I'm a Unix "old-timer", though I'm not sure I like the designation. The first Unix I worked on didn't come with vi. When Berkeley 2.9 (for PDPs) came along a year later and had vi, it was great -- as long as there were only one or two people on the system. Any more than that and it got really slow...
And I've got a friend who *refused* to learn vi. Said he was as quick with ed as others were with vi. He was probably right, but the guys at Bell Labs held him down and forced him to learn vi eventually.
Sean.
Off the top of my head (this should approximately work) mark the selection with V, then do :perldo s/^/\t\t\t\t\t/
Ok, you guys posted three different ways to do a string replace in vi...each some cryptic variation on the standard regexp. Thanks for reminding me why I like emacs! :p
Liberal (adj.): Free from bigotry; open to progress; tolerant of others.
Well, I'm CERTAINLY glad to hear that!!!
:-)
So when, exactly, is kdevelop going to appear in base installs of Solaris, AIX, HP-UX, FreeBSD, IRIX, and so on?
And how are we going to magically back-implement them to all of the older platforms that are already installed?
Oh, not to mention make them available for a minimally-running system, being accessed from a remote VT-102?
Oh, silly me--kdevelop and anjuta are IDEs! vi(m) is a text editor, last time I checked. As a text editor, it's still got some life in it.
Emacs, as an editor or an IDE, also isn't quite dead yet. However, it's dying--I don't expect it to hang on for much more than 15 more years.
"People who do stupid things with hazardous materials often die." -- Jim Davidson on alt.folklore.urban
They also do different things, you know.
Vi is evil and cannot be redeemed. Vim is just Satan wearing a brand new hat.
All right-thinking people agree: Emacs is the One True Editor.
Vi Vi Baby...
Ok, rant time. I'm big Vim fan. Every computer I own or use (well, every working computer) has it installed. The only editor that approaches EMACS's feature set, and nowhere near the great bloatware's klunkiness or unpredictability. But.
I'm rather disappointed that EMACS and Vi (and its clones, of which Vim is the best and mostly widely used) remain the most widely used text editors. Now each has strengths and weaknesses relative to the other, and it's no use rehashing those wars here. What's important is that both these editors are designed around constraints that are about 20 years out of date. Most especially, they were designed to be used by a text-mode terminal (very fancy ones, in the case of EMACS, very limited ones in the case of vi) over a relatively slow connection.
I won't comment on EMACS, since I lack the obsessiveness to be a serious user. But on vi, the big design decision was to build in a lot of modes to get around the limitations of the terminal. This allowed a lot of commands without function keys or complicated keystrokes. It also allowed the user to enter blocks of text without realtime update -- an essential feature on a 300 baud connection!
But, in a GUI environment, modes are a Bad Thing. Yeah yeah, some of you like being able to do complicated edits without moving your hands off the keyboard to grab the mouse. But most people have an easier time if they don't have to keep a state map current in their head.
Now Vim has impressive GUI support (platform-independent GUI support, which is the main reason I use it), but it still has all the modes of vi, plus 3 or 4 of its own. And its macro language is a kludgy extension of the simple-minded command language Bill Joy invented for the original ex/vi editor, itself a minor extension of the ed command language.
Various projects have tried to do all this over using modern design principles, but the EMACS and Vi user communities are just too entrenched. If I were a better programmer, I'd try it myself, maybe using the vim engine as a basis. But probably I'd be the only user!
The parent post was the single most intelligent post on this thread.
take lines 20-25 and indent 5 tabs:
20G5>>....
take lines 20-25 and remove one tab:
20G5
hope that's what you were looking for
A buddhist walks up to a hot dog stand and says ``Make me one with everything.''
One trick: some Motif programs (notably Netscape) have bad palette manners and grab a lot of colors they don't even need. I would always have at least one copy of gvim running so it always had the palette colors it needed.
D'oh. That second one should have been
20G5<<
A buddhist walks up to a hot dog stand and says ``Make me one with everything.''
amen, brother, ed is a godsend.
...and this lie crawls out of its mouth: 'I, the state, am the people.'
I bought a 40 gig HD for $79 last week.
I am a VI guy. I have been working with it (vim and elvis nowadays) for more than 10 years and never complained one bit. People here at work usually get really impressed with thing I can do with it. :-) :-)
BUT... today I have made an "apt-get install anjunta" and got really impressed. Take a look...
And, please, don't get me wrong: I was half joking in my last post...
...the editor with "a little less conversation..."
Easy: I can't run the MSVC editor from an SSH session.
The thing is, for the MSVC editor, all the commands are "hidden" in menus you reach with the mouse, and the keyboard shortcuts associated with them. vi just has different shortcuts.
If you don't like vi, just use a different editor. Just use what you like best, like all of us do. I don't like vi, I use joe, jed, pico or emacs. Do I complain that vi sucks? No, because it doesn't. It just doesn't fit the way I do editing.
One shall speak only if what one has to say is more beautiful than silence
Heh. Well I'm a sysadmin and maintenance analyst, which means I get called in to work on an unknown system which is braindamaged. Since they're usually big servers, they almost never have framebuffers, meaning I'm usually stuck with a terminal session, or in a surprising number of cases, a real, honest, hardwired VT-102. (rarely a VT-52, sometimes a VT-420)
:-), and is all I need (I'm not a developer), I can't be bothered with a proper IDE.
vi is always there, and always works. Since it is massively useful, consistent across the Unix universe (more or less
"People who do stupid things with hazardous materials often die." -- Jim Davidson on alt.folklore.urban
Dogs were around long before mythology
Yeah, I figured...I was j/k. I have nothing but respect for you vi guys, really. Whenever I use it, it makes me want to hurl heavy objects at my computer, but I've seen what it can do in the hands of One Who Knows.
Liberal (adj.): Free from bigotry; open to progress; tolerant of others.
There are subtle differences in buggy whips, so it's good to have a book that helps you make the transition from one whip to the next.
Of course its a bad book, have you read any of the authors books?
Practical C++ Programming Is one of the worst O'Reilly and Associates has ever published. Here's part of a review from Amazon.com:
Then there's the company: New Riders
Java 2 Certification Training Guide by Jamie Jaworski. Use this book and you're guarenteed to fail the test.
As for me I've been bitten once by the author, and I don't give second chances, there are plenty of good books out there, so I really don't need him. I use gvim nearly every day, and I have Learning the vi Editor, by Linda Lamb (5th Edition), in case I forget something. For the rest I have vim.org
As for me, I don't need another doorstop.
If someone is passing you on the right, you are an asshole for driving in the wrong lane.
One thing that annoys me to no end is when I install the latest version and by default some new silly screwball "IMprovement" is activated.
Like the time line numbers (:set nu) have lines under them. You have to turn that off with (hi LineNr term=bold).
In the latest release (from RH actually) they put visual line breaks (not real newlines) in lines that are longer than the terminal is wide so that it doesn't print text in the left margin. Supposed to look nice I guess. Not only is that just a silly worthless feature but now if I select a line in X with the mouse and paste it somewhere I get stairstepping text.
I think their stuggling for new ideas. I wish they would clean up that morass and make a nice X widget instead.
cat >
^d
not for the weak of heart!
Those who can, do. Those who can't, simulate.
What kind of text editor requires 96egabytes of disk space? (no shitting!)
A wise man once said, "Emacs is a nice operating system, but I prefer Linux." Truer words have never been spoken.
To exit, you have to press three different keys! In vi, you only have to press...er...er...three!
EMACS SUX0R5!!!!11!!
This book was well-researched and very well written. The layout and explication are first-rate. Subjects are easy to find and it's chock full of well-explained tips and tricks. I highly recommend it as one of the best technical books on my bookshelf.
If you pick up a copy, even if you're an experienced vi user, you'll find that you start thumbing through it on a regular basis even when you're not looking for something specific. If you're a vim user, you will be in heaven. And perhaps the best testament, whenever I bring it into work, it doesn't take long to disappear from my desk.
I use both emacs and vi on a regular basis depending on what and where I'm working and am very fascile on both. I switched from being a part-time vi user to a most-of-the-time vim user after reading this book.
Trust me. If you want either a vi or a vim book, you won't go wrong with this one.
-- My choice of computing platform is a symbol of my individuality and belief in personal freedom.
This Vim Slashdot topic is extremely timely for me.
/usr/share/vim/vimrc and /usr/share/vim/filetype.vim because they had precendence over your home directory directives. Now that's stupid!
It took over an hour today for me to discover how to disable fucking autoindent on Mandrake.
Setting "noai, nosi, nocindent" in my ~/.vimrc was not good enough - I had to erase
While you're at it on Mandrake you can disable the God-awful tty colors for ls by adding this to your ~/.bashrc: `unalias ls'
If you cant wield vi then you suck. And if you want more features than vi then you suck and you should go to emacs. If you want colors then you really suck. Real men and women just use vi.
Windows gvim has also gotten quite good.
Man. All you guys are smoking crack. It's quite obvious that notepad is the best simple text editor. Who the fuck wants all this other bullshit? Vi is fucking impossible to use and Emacs...what the fuck??
I have my .vimrc set with tabstop=4 and shiftwidth=4 and that's what I use most of the time (for writting code). But when I write emails and plain text files, I want the standard 8-character tabs instead. Is there a way to setup a macro for this or something? Right now I just type "set tabstop=8" all the time, but I'm sure there's probably a way to automate this...
Along the same lines, is there a way to automatically get rid of autoindent (which I use for coding, but isn't terribly useful otherwise)?
LS - LiSt
MV - MoVe
CP - CoPy
LN - LiNk
See a pattern?
Those who sacrifice security to condemn liberty deserve to repeat history or something. - Benjamin Santayana
nothing more to say...
I have both books, but did not convert to VIM for all my editing until after getting the VIM book. The Oreilly vi book is OK, but it wastes chapters worth of space by devoting attention to vi clones that very few people use.
I hate to bust your bubble but regexp is quite standard for any text search. If you ever leave emacs and do some real work with perl or bash scripting with awk and sed, then regexp knowledge is quite usefull. I consider it a standard actually and it shows me how standards compliant gvim is.
http://saveie6.com/
I use Vim to edit content from a MySQL
t xt
:Edit page_name edits a
:Save re-saves it.
database with the help of a vim script I've posted here:
http://www.phototour.minneapolis.mn.us/pages.vim.
webpage stored in a database table, and
www.cgstock.com
No worries, my bubble was already busted. If you notice, I refer to regexp as "standard" in my post. Thanks for the condescension though! :)
Liberal (adj.): Free from bigotry; open to progress; tolerant of others.
I thought it stood for "Eighty megs and constantly swapping".
http://saveie6.com/
As a 37 yr old, I still find myself doing 'copy con ...' for batch files under Windoze - I know what I want to type, and I'm quite capable of typing it....
Similarly under *nix - gimme vi - it's quick, simple, and so long as you know what you want to say, it's good enough.
For programming use an IDE, for quick hacks use a text / hex editor.
KISS - the mantra of the lazy.
oh brave new world, that has such people in it!
They lied.
You're very weird.
Read more of this story at Slashdot.Read more of this story at Slashdot.Read more of this story at Slashdot.
$25.00 plus shipping (coverprice is $49.99)
http://www.addall.com/
remember to copy & paste the
ISBN 0735710015
There is a windoze vi - I used it for a while while I was converting (dumbing down?) to Windoze from HPUX a long while back, since it was easier than trying to point the damned mouse at the right bit of screen.
The trick is - unplug the goddamn mouse. You the have to alt-tab twixt windows to change focus, and you aren't likely to hit alt-tab in a vi session.
Trouble is - it doesn't work on laptops with built-in pads and shit - you still get the problem.
LOL, ROFLMAO etc... edlin still works in Windoze....
oh brave new world, that has such people in it!
It looks a lot smaller that the vi reference I used to carry about 12 years back - looks like this minaturisation shit is working...
oh brave new world, that has such people in it!
Yes, I know, and that's the explanation I've seen for the names many times. However, I swear I heard mention that there was more to ls than the rest of them... that it was actually the authors initials. It must have been 5 or 6 years ago that I heard this and haven't seen any mention of it since.
I was starting to doubt that I had heard it at all when I saw the parent post saying the same thing. It's too big of a coincidence to just write off. Somebody else must have heard the same thing I did.
If anyone can corroborate that there is more to the naming of ls than simply LiSt, please let me know!
Thanks
load "linux",8,1
hope you get modded up - arrogant bloody sysadmins need putting down.
I like sendmail, cause it sends mail. I don't give a fuck about how it handles regexes - if I want to proces regexes, I use sed.
If I want to edit a text file (or a source file where I know all the classes and methods), I'll use vi. If not, I'll use an IDE for the purpose.
EMACS can go hang (unless I'm using Scheme, in which case it is the IDE).
oh brave new world, that has such people in it!
Are you running gvim? I know some versions of RedHat have a problem where /usr/share/vim/gvimrc is a symlink to /usr/share/vim/vimrc. This causes anything in /usr/share/vim/vimrc to override your .vimrc if you're running gvim, because gvim runs: /usr/share/vim/vimrc /usr/share/vim/gvimrc
~/.vimrc
~/.gvimrc
(in that order) Perhaps Mandrake has the same packaging problem.
Well I can say for sure that ln was writtend by a guy called Larry Niven
It surprises me how many times ppl go off on net searches to find out something when the documentation was right on there hard disk
Analytic & algebraic topology of locally Euclidean meterization of infinitely differentiable Riemmanian manifold
Yikes, that is pretty bad. I use debian mostly (in about a week, I will be 100% debian at work and home). The vim packager for debian (Wichert Akkerman I believe) does a great job. Most of the stuff is turned off by default - I've been turning on the features as I expore the depths of vim.
The fluff I do like on is cindent, showcmd, showmatch, autowrite and incsearch. However, I'm glad these are not on by default in debian and they can be easily turned on via ~/.vimrc
Check this comic strip.
This the only thing I still cannot find in Emacs. But I'll keep trying, it must be mentioned somewhere in *info* ...
Less is more !
... at least (and mostly at most) one time: write after the system installation is completed to edit Makefile or some just in order to comile Emacs or Xemacs. Right after that - Emacs (or Xemacs) forever.
Less is more !
That was a key phrase. Most of programmers (open-source ones) love Emacs. Most of admins love Vi. The reason? Different tasks, a different style of thinking, sometimes even a different education.
Less is more !
/functionName - jumps me to the function
shift-v - enter "visual" mode
select to opening brace
press % - finds the matching closing brace for the function
press d - deletes the function
Russian Russian Russian RussianDollSig DollSig DollSig DollSig
But have you never worked in a situation where you were one of several other junior sysadmins and not everyone else was as careful as yourself? Training people to use vipw and vigr is very useful in certain situations.
Also I don't really get your CVS vs RCS style locking point. Care to expand?
ITS was built not in Lisp but assembly. That's why ITS isn't available on current hardware. Ref. Steven Levy's _Hackers_. It is, however, true that versions of emacs were the standard editors on many different Lisp based systems.