Slashdot Mirror


Hacking VIM

Craig Maloney writes "Throughout the years, there have been many clones and re-implementations of the venerable vi editor. One variant of vi that emerged and stayed with us is VIM. Since its introduction, VIM has proven itself a worthy successor to the traditional vi editor. VIM has rightfully taken the place of standard vi implementations as the spiritual successor to vi, completely replacing the vi editor on many, if not all of the current Linux distributions. Many improvements have been made to VIM such as tabs, spell checking, folding, and many, many more. However many of these new enhancements may still remain hidden to anyone who isn't keeping up on the cutting edge of VIM development. Hacking VIM is a good resource for becoming more familiar with the new features of VIM and how to make them work best for you." Read below for the rest of Craig's review. Hacking VIM author Kim Schultz pages 210 publisher Packt Publishing rating 7/10 reviewer Craig Maloney ISBN 978-1-847190-93-2 summary A good way to wring more productivity out of an already excellent editor Hacking VIM is a short book, weighing in at a scant 210 pages. The book contains six chapters, and two appendices. The first chapter covers the history of VIM, and the lineage of vi clones that preceded it. Chapter 2 covers personalizing VIM. This chapter covers how to really take VIM and customize it for your own needs, from changing the fonts and colors for GVIM to personalizing the status bar, and using tabs. Chapter 3 deals with navigating better in VIM, whether it's in a singular file, or a group of files (which is especially important for several programming environments). Chapter 4 discusses the many productivity enhancements of VIM, such as templates, auto-completion, code folding, sessions, and the built in diff mode. Advanced formatting is covered in chapter 5, which has a few interesting tips on making code look better. Rounding out the book (and weighing in as the largest chapter of the book) is scripting VIM. VIM has excellent scripting capabilities, and this chapter covers them in great detail, from finding scripts to writing your own. Lastly, the Appendix covers some of the neat scripts available for VIM, such as a minesweeper game, and the obligatory Towers of Hanoi puzzle and mail client (because no software is considered done until it reads mail and news. :) )

Hacking VIM prefaces each tip with which version of VIM will work with each function. There were only a few instances where I noticed that a particular function was mis-marked as requiring a later version of VIM that actually worked with earlier versions. The book also contains good images which help demonstrate some of the more visual components of VIM, like tabs, folding, and the spell checker.

It is full of useful tips for getting the most out of VIM. The book is aimed at those who have already gained some familiarity with the VIM editor, and is by no means a tutorial for the novice user. There is clearly a bias in this book to the intermediate and advanced VIM users. Unfortunately, this is at odds with the first chapter, which starts with a history of the VIM editor. This wastes some of the space of the book, and would have been best used with more unique and different tips. Also, having some experience with VIM, I found certain tips weren't worth the trouble, and others quite confusing. The section on signs was a bit confusing, and I'm still unclear on why they're worth the trouble. There were several instances where I wondered what the productive benefit of a tip would be. On the other hand, I did find several tips invaluable. It's easy to overlook new functions in the CHANGELOGs, so I missed that newer versions of VIM had integrated spell-checking. Overall, Hacking VIM had enough good tips in it that I hadn't discovered on my own to make it worth the read.

Like most editors, VIM can induce editor fiddling sessions that result in little work being done, and Hacking VIM contains lots of fodder to make even the most ardent tweaker happy. Unless you carefully follow the mailing lists for VIM, and try every new feature as it is released, you might miss some really helpful productivity enhancers. My only wish for this book would be more focus on really productive tips, and less history about the other versions of vi that didn't survive. The book may have lots of "of course" items for the truly seasoned VIM user, but for those of us who don't keep up-to-date with the latest features, it is an excellent way to get more familiar with some of the truly great features that have been introduced in later VIM versions.

You can purchase Hacking VIM from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

308 comments

  1. Kprinter? by Anonymous Coward · · Score: 0

    Good -- I'll take my chance to ask a question about which I've found virtually no information (and what I did find wasn't helpful): How to use kprinter to print from vim/cream/variants? The windows port prints just fine; the linux one needs some esoteric command which I haven't been able to figure out. Does anyone know about this?

    1. Re:Kprinter? by Cyrano+de+Maniac · · Score: 1

      :1,$ !lpr

      --
      Cyrano de Maniac
    2. Re:Kprinter? by Anonymous Coward · · Score: 0

      :1,$ !lpr Yeah, really it has a very intuitive interface!

      emacs rulez!!!!11!
    3. Re:Kprinter? by Misch · · Score: 1

      :hardcopy

      I think that's the command you're looking for?

      --

      --You will rephrase your request for me to go to hell. Goto statements are not acceptable programming constructs
  2. Re:Vim is painful. by Anonymous Coward · · Score: 0

    What is this emacs thing you speak of ?

  3. Dired mode? by Anonymous Coward · · Score: 0

    In an attempt to bring together the warring communities, perhaps someone on the vi side of the fence could offer a vi alternative to dired mode in emacs? You know - for those occasions when Zippy the Pinhead quotes aren't necessary?

    1. Re:Dired mode? by ByOhTek · · Score: 1

      dired? What is that?

      --
      Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
    2. Re:Dired mode? by merreborn · · Score: 1

      http://www.gnu.org/software/emacs/manual/html_node/emacs/Dired.html#Dired

      Apparently it's pronounced "Dur Ehd", not "Dire'd". Seems like a pretty poor choice of name to me...

    3. Re:Dired mode? by ByOhTek · · Score: 1

      OK, that's what I thought. I'm now just trying to find out what that has to do with Zippy.

      *remembers the bored times why he pitted zippy the pinhead against the psychoanalyzer for all kinds of sick fun*

      --
      Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
    4. Re:Dired mode? by calebt3 · · Score: 1

      Some might argue that Vi is the text editor of Satan:
      VI VI VI

      Disclaimer: I am still too pathetic to use a cli text editor.

    5. Re:Dired mode? by xouumalperxe · · Score: 1

      All jokes aside, both Emacs and Vim are available with fully (dis)functional graphic interfaces. I barely ever use vim proper, but rather some form or another of gvim (nowadays, mostly the windows or the OSX ports).

    6. Re:Dired mode? by eggled · · Score: 1

      vim . will give you a directory listing, you can nav around in using vi commands :)

    7. Re:Dired mode? by PastaLover · · Score: 1

      :edit .

  4. vimdiff by loudmax · · Score: 5, Interesting

    A few months ago I heard someone raving about the usefulness vimdiff at a Perl user group meeting. I looked into it, and it's become one of my favorite tools. In addition to the regular syntax highlighting, it highlights differences in two texts and by default folds areas that are identical. It's fantastic for programmers and also for sysadmins like me who want to compare different versions of configuration files.

    I use vim every day, but I know I'm only scratching the surface of it's capabilities. There are probably a lot of others on Slashdot who use vim all the time and would stand to gain from understanding more of what it can do. I'll definitely give this book a look.

    --
    KTHXBYE
    1. Re:vimdiff by Anonymous Coward · · Score: 0, Offtopic

      A few months ago I heard someone raving about the usefulness vimdiff at a Perl user group meeting. I looked into it, and it's become one of my favorite tools. In addition to the regular syntax highlighting, it highlights differences in two texts and by default folds areas that are identical. It's fantastic for programmers and also for sysadmins like me who want to compare different versions of configuration files.

      The mere fact you're impressed by a simple code diff tool explains best why when someone shouts "vim is the best editor in the world!", the rest of us, who use more decent tools, can just snicker.

    2. Re:vimdiff by ggvaidya · · Score: 1

      Agreed. One thing I love about Vim is all the Unixy tools or functionality you get built-in: grep, diff, tail, and others. I didn't have to download Cygwin/MingW for ages because I could always jump into Vim to get atleast these two tasks done. (Yeah, I know about GnuWin32, but I didn't back then, and hate using CMD.EXE anyway; and Vim's sometimes convoluted interface to them is relatively easy to look up and work with, not to say anything of the pretty colours).

      Thank you, Mr. Moolenaar and others!

    3. Re:vimdiff by Anonymous Coward · · Score: 0

      I would mod you "best post evar" if I remembered my login and if I had any mod points and if it really made a difference

      vimdiff rocks beyond granite.

    4. Re:vimdiff by ajs · · Score: 1

      A few months ago I heard someone raving about the usefulness vimdiff at a Perl user group meeting. I looked into it, and it's become one of my favorite tools. In addition to the regular syntax highlighting, it highlights differences in two texts and by default folds areas that are identical. It's fantastic for programmers and also for sysadmins like me who want to compare different versions of configuration files. Vim is, in many ways, a worthy "quick and dirty emacs." Of course, all of these things have existed in emacs for decades, but there are times that you don't want to write lisp to get the job done, and the terse, Unix-derived syntax of vim is a comfort.

      I still use both vim and emacs, though more and more of my work lends itself to vim these days. If you're still thinking that the difference between vim and emacs is intuitively obvious try this:

      gvim /etc/passwd
      :vsplit /etc/group
      :split /etc/services
      :set incsearch
      /adm<return>
      Yeah, so there it is... everything that a casual user has come to think of as "emacsisms". There are defining differences between the two (in terms of the self-documentation of emacs or the language pluggability of vim), but not the ones that most people think of.

    5. Re:vimdiff by ScytheBlade1 · · Score: 4, Insightful

      I was simply going to mod you offtopic (two points left) - but instead I decided to reply. Mostly because I'm curious.

      Your comment is the typical argument: "emacs is better."

      However, you do not go into why it's better. You don't even mention a slight reason as to why it's better. You state that "the rest of us" "use more decent tools" and "snicker [at those who don't]."

      Would you mind qualifying your statements?
      1) What is a "more decent tool"?
      2) Why is this other tool better to use?
      3) Who is "the rest of us"?
      4) Why make this statement with nothing to back it up? If your statement is 100% qualified and "correct" - why not just give a few reasons as to why?

      I really want to know why your "more decent tools" are so plainly superior that you don't even bother to qualify your statements as to why.

    6. Re:vimdiff by jmorris42 · · Score: 4, Informative

      > the rest of us, who use more decent tools, can just snicker.

      I take it you are a code monkey developing mainstream apps, most of the more evolved ones are emacs folks. But admins and embedded folks are often working in diverse environments, many of which don't have emacs but any *NIX type environment will have vi. Busybox implements a vi clone. I seriously doubt you will find emacs on very many routers, access points, settop boxes, cell phones, etc.

      Since I use so many different machines it just makes sense to default to vi/vim and stick to assuming only the default behaviour. Emacs only makes sense if you mostly use a single home directory where you can have emacs customized.

      --
      Democrat delenda est
    7. Re:vimdiff by mOdQuArK! · · Score: 2, Funny

      *wark* *wark* *wark*

      Attempt at starting religious emacs vs vi. flame war has been detected!

      All civilians evacuate to the safety zones!

      Repeat,
      All civilians evacuate to the safety zones!

    8. Re:vimdiff by ion.simon.c · · Score: 1

      Aye, Vimdiff is good.
      There's a win32 diff tool called WinMerge (http://winmerge.org/) that seems to give the same diffing results as Vim, and can be used on entire directories. Quite handy when you have tons of files to sift through.

    9. Re:vimdiff by bckrispi · · Score: 0

      Let me put this silly little slapfight to end once and for all..

      They Both SUCK!!

      --
      Xenon, where's my money? -Borno
    10. Re:vimdiff by ScytheBlade1 · · Score: 2, Interesting

      Actually I was being 100% honest in my question(s). My extent of emacs usage is at my school during the "Intro to UNIX" class - which I completed in four hours (the entire class).

      Four hours of emacs is just enough to hate it, and not nearly enough to understand it.

      Again, honest questions.

    11. Re:vimdiff by ConceptJunkie · · Score: 1

      Edlin rules. Edlin FTW. Edlin all the way.

      --
      You are in a maze of twisty little passages, all alike.
    12. Re:vimdiff by sqldr · · Score: 1

      1) What is a "more decent tool"?

      I must confess, as someone proficient in both vi and emacs (I prefer emacs, but it's not always installed), when left to my devices, I've gone the way of the IDE. I'm using kdevelop for my coding now.

      Just for little things like pressing shift-F9 to compile my code, show the errors in a box below, allow me to jump to an error with a single keypress, or if it compiled, run the thing, with barely any input from me. Ok, you can script emacs to do that stuff, but why do I have to bother? Why can't it just *do* this basic task which I've come to expect from an IDE since my Amiga days?

      kdevelop isn't brilliant - it's buggy as hell, and don't get me started on its code formatting tools, but it provides me with 8 or 9 basic features I would consider fundamental to working on a large programming project. vi and emacs are just text editors.

      --
      I wrote my first program at the age of six, and I still can't work out how this website works.
    13. Re:vimdiff by PeterBrett · · Score: 1

      Just for little things like pressing shift-F9 to compile my code, show the errors in a box below, allow me to jump to an error with a single keypress, or if it compiled, run the thing, with barely any input from me. Ok, you can script emacs to do that stuff, but why do I have to bother? Why can't it just *do* this basic task which I've come to expect from an IDE since my Amiga days?

      kdevelop isn't brilliant - it's buggy as hell, and don't get me started on its code formatting tools, but it provides me with 8 or 9 basic features I would consider fundamental to working on a large programming project. vi and emacs are just text editors.

      Actually, the latest version of Emacs has "compilation mode" available by default -- no scripting required. You click Tools->Compile, and the make output appears with nice clickable links for any errors that might occur. You can have multiple compilation buffers for compiling different parts of a large project where compiling it all would take too long.

      Even better than that is the new grep function. Similarly, it provides clickable links which take you exactly to the file & line which matched. One of the nice things about Emacs is that rather than insisting you do it the Emacs way, it just presents a nice interface to the command-line tools you'd otherwise be using. KDevelop, on the other hand, seems to demand that you set things up in the way that it expects (or it did last time I attempted to use it).

      Not to mention the fact that Emacs isn't buggy as hell and has excellent code formatting tools. What other 'basic features' are you missing?

    14. Re:vimdiff by Anonymous Coward · · Score: 0
    15. Re:vimdiff by Dan+Ost · · Score: 1

      Dude, just type ":make [target]" in vim and it will perform the compilation and place you at any line that causes a compilation error.

      Isn't that exactly what you just said you wanted?

      --

      *sigh* back to work...
    16. Re:vimdiff by Just+Some+Guy · · Score: 1

      Emacs only makes sense if you mostly use a single home directory where you can have emacs customized.

      Don't forget about Tramp. If you can reach a machine by pretty much any means, then Emacs can edit files on it.

      --
      Dewey, what part of this looks like authorities should be involved?
    17. Re:vimdiff by Anonymous Coward · · Score: 0

      that's why you keep a copy of emacs and your settings on a thumb drive around your neck. you never know when you'll need it.

  5. All of this talk of scripting vi made me think by jandrese · · Score: 5, Funny

    vim is clearly the emacs of vi clones.

    --

    I read the internet for the articles.
    1. Re:All of this talk of scripting vi made me think by Anonymous Coward · · Score: 0

      How can you compare an editor to an operating system?

    2. Re:All of this talk of scripting vi made me think by Citizen+of+Earth · · Score: 4, Funny

      vim is clearly the emacs of vi clones.

      You referenced emacs in a vi thread. I invoke Goodwin's Law!

    3. Re:All of this talk of scripting vi made me think by fm6 · · Score: 1

      Untrue, fortunately. The big difference between vim and EMACS is that EMACS is built with scripts, whereas vim is a vi clone with scripting kludged in. That's both good and bad. The bad part is that vim's scripting language is very clumsy, not just in relation to the fancy functional LISP engine EMACS uses, but in relation to most scripting languages. The good part is that you can be a casual vim user without mastering its scripting language or worrying that some obscure script feature or bug will manifest itself and bite you on the ass.

    4. Re:All of this talk of scripting vi made me think by RegularFry · · Score: 4, Funny

      I don't want to be a spelling Nazi, but that should be Godwin...

      --
      Reality is the ultimate Rorschach.
    5. Re:All of this talk of scripting vi made me think by jnadke · · Score: 1

      I don't want to be a spelling Nazi, but that should be Godwin...

      Godwin would be proud...

    6. Re:All of this talk of scripting vi made me think by macshit · · Score: 1

      vim is clearly the emacs of vi clones.

      Certainly in some aspects.

      A while ago I did a bunch of timings of the startup time of Emacs and vim in various contexts (tty, X, with init file, without etc), and to my surprise, vim was usually slower to startup than Emacs... If you had a huge emacs init-file (not so uncommon given Emacs' users love of customization), Emacs became slower, but still the difference was pretty minor in most cases. Of course on modern systems, both essentially start instantaneously.

      I found this interesting given the significant influence startup time has historically had on usage -- e.g. Emacs users usually start one instance of Emacs and use it all day, whereas vi users have historically started the editor for each file they edit (startup time isn't the only reason for these differences of course, but it's one).

      --
      We live, as we dream -- alone....
  6. vim syntaxt is quite arcane by pongo000 · · Score: 3, Insightful

    I was actually thinkink about this the other day: As a long-time vim user (have you donated yet?), the one beef I've always had about customizing vim is the rather arcane and inaccessible syntax style that's used throughout vim. This coming from a long-time perl hacker might come across as somewhat disingenuous, but it's the truth: I love to hack with vim, but hate to hack on it!

    I plan on checking this out only to see if there is some light shed on the secrets behind writing a vim plugin.

    1. Re:vim syntaxt is quite arcane by icepick72 · · Score: 1
      (have you donated yet?)


      You first!

    2. Re:vim syntaxt is quite arcane by krmt · · Score: 1

      You can script vim with several languages, including perl, python, and ruby. Not many scripts are written using them, but they are available provided that your vim build does enable those options.

      --

      "I may not have morals, but I have standards."

    3. Re:vim syntaxt is quite arcane by pongo000 · · Score: 1

      Already done! Your turn...

    4. Re:vim syntaxt is quite arcane by pongo000 · · Score: 1

      I know you can compile perl support into vim, but I've never come across a vim plugin written in anything other than vimscript...have any links to a good resource on this?

    5. Re:vim syntaxt is quite arcane by Anonymous Coward · · Score: 0

      I think Python is a good choice: http://www.vim.org/htmldoc/if_pyth.html

      This is an example of a plugin written in Python(mostly, the beginning is vimscript, but all the heavy lifting is Python): http://www.vim.org/scripts/script.php?script_id=1542

  7. VI SUCKS! by Seumas · · Score: 5, Funny

    Real men use emacs, bitches!

    Okay, not really -- but I thought someone should get that out of the way so we can move on.

    Besides, most people who say Vi or Emacs are the best secretly use nano/ae/pico when nobody is looking and we all know you do, too.

    1. Re:VI SUCKS! by Seumas · · Score: 1

      Whoever marked this flamebait obviously didn't read beyond the first line.

    2. Re:VI SUCKS! by Anonymous Coward · · Score: 0

      What's wrong with Nano? Sniff... well my Windows friends still think I'm l33t.

    3. Re:VI SUCKS! by General+Lee's+Peking · · Score: 1

      You would have to be assuming we were talking about vi vs. emacs. Maybe the real issue should be vim vs. vi. I prefer vi.

    4. Re:VI SUCKS! by ei4anb · · Score: 1

      no, real men wear lumberjack shirts and use Teco http://en.wikipedia.org/wiki/Text_Editor_and_Corrector and in their spare time use it to code an operating system disguised as an editor.

    5. Re:VI SUCKS! by rk · · Score: 2, Funny

      The most terrifying part of that page was the brainfuck interpreter implemented in TECO. *shudder* Someday when the stars are right, Cthulhu dreaming in R'yleh will run that program and unmake the world.

    6. Re:VI SUCKS! by meuhlavache · · Score: 1

      Damn! Use the prehistorical EE (http://www.ucl.ac.uk/is/unix/ee.htm) with full ASCII support and let you write pretty good "README" and let yu use BACKSPACE!

    7. Re:VI SUCKS! by Provocateur · · Score: 1

      ...and we carry it around on a USB stick.

      It's a guilty pleasure, like the Point Break DVD tucked away behind the ST:TNG collection. Buddy, you can take it out: there won't be a girlfriend to show it to anytime soon.

      --
      WARNING: Smartphones have side effects--most of them undocumented.
    8. Re:VI SUCKS! by ultramkancool · · Score: 0

      yes, that's it slashdot crowd, I don't like to admit it, but, I usually use GNU nano for most of my text editing needs.

    9. Re:VI SUCKS! by thogard · · Score: 1

      I've been on the vi side of this war for decades. The only legit advantage the emacs has over vi involves cats walking on keyboards.

    10. Re:VI SUCKS! by Anonymous Coward · · Score: 0

      Nonesense! ed is the 'real' editor!!!!

  8. Re:Vim is painful. by Anonymous Coward · · Score: 2, Funny

    What is this emacs thing you speak of ? Apparently it is "vile".

  9. A very powerfull tool of the past almost forgotten by deweycheetham · · Score: 3, Informative

    Most don't take the time to read the documentation http://www.eandem.co.uk/mrw/vim/usr_doc/index.html . One of the great thing about VI(M) is the ability to execute this in Batch Mode (i.e. Ex ). For that matter in these days of Microsoft Glory and GUI's that don't work so well, its nice to know that GNU Tools http://gnuwin32.sourceforge.net/ are around for all those pesky OS's that fall short of Batch Processing abilities of any sort to speak of. VI(M) also operates in this area quite well.

    Nice to know it's not forgotten.

  10. Re:Vim is painful. by Yold · · Score: 3, Insightful

    I think emacs and vi are both painful at first, if you are used to a fully graphical IDE. I tried desperately to get comfortable w/ emacs, to no avail. For the hell of it, I tried out vim, and the flexibility of keyboard commands has really helped w/ my sore wrists.

    I've been using vi extensively for more than 3 months, and I am still a newbie. It seems like the kind of editor you literally have to use for years to become competent with, but if you learn the basics its pretty intuitive for editing.

  11. As a linux neophyte... by Spy+der+Mann · · Score: 2, Interesting

    I use nano. It's enough for my basic needs, and doesn't depend on cryptic key sequences :)

    1. Re:As a linux neophyte... by Anonymous Coward · · Score: 0




      I agree 100% :wq

    2. Re:As a linux neophyte... by css-hack · · Score: 2, Informative

      When I first started using *nix, I used nano too. It's got simple key combinations to do simple actions. I used it for years.

      I didn't start to use Vim until I started work at a software shop where the lead developers used it almost exclusively. I couldn't figure out why... but then they showed me how to customize parts of it. To add syntax highlighting and tabs, and to record macros (for doing the same operation on a bunch of different chunks of text). You can even enable mouse support when working in an XTERM (forget this GVIM thing).

      It was a steep learning curve that I probably wouldn't have endured if I hadn't been coding, but now I can edit any text more efficiently in vim than in any CLI or GUI program out there.

    3. Re:As a linux neophyte... by Entropius · · Score: 1

      I use kwrite. It drives my advisor, who uses vi and grew up on punch cards, batty ... but when you can use it (i.e. not over ssh) it's great and simple.

    4. Re:As a linux neophyte... by theskipper · · Score: 1

      Just curious, how long did it take you to become proficient with vim? To the point where you felt totally comfortable using it instead of nano, etc.?

    5. Re:As a linux neophyte... by Mantaar · · Score: 1

      Excuse me, but how does Nano not depend on cryptic key sequences? ^O for 'write out'? Oh, I see. What's that? ^X for leaving the thing? ... and I still didn't quite figure out how to mark and cut&paste stuff.

      Yeah, I know, that's probably just me being lazy as it's sure to be rather easy, but with vi it was a simple matter of typing vimtutor and following the instructions. Once you're through it, you'll know everything most people find so hard to understand about vim. And it only takes about half an hour or so.

      --
      I'm an infovore...
    6. Re:As a linux neophyte... by Hatta · · Score: 2, Informative

      That's what 'ssh -X' is for.

      --
      Give me Classic Slashdot or give me death!
    7. Re:As a linux neophyte... by Hatta · · Score: 3, Insightful

      Well there's a difference between being hard to understand and being hard to remember. VIM and nano are both easy to understand. VIM is just hard to remember. Nano gets a pass because it's got a crib right on the screen. Of course you can only fit so much on a screen, so there's only so much you can do with nano. Which approach is friendlier than the other is up to the user to decide. Personally I'll take the more powerful editor and just print out my own crib sheet.

      --
      Give me Classic Slashdot or give me death!
    8. Re:As a linux neophyte... by xaxa · · Score: 2, Funny

      M-x w3-fetch http://books.slashdot.org/
      C-s agree 100% (search for the comment I want to reply to)
      Enter (on the Reply to This link)

      C-c C-c to edit the multiline edit box

      That almost wasn't complicated enough. This post brought to you by Emacs!

      (Ok, the captcha was harder -- I had to download the MP3!)

    9. Re:As a linux neophyte... by Anonymous Coward · · Score: 0

      So where's your "Hacking Nano" review?

    10. Re:As a linux neophyte... by Entropius · · Score: 1

      Thanks, I'll try that.

    11. Re:As a linux neophyte... by Just+Some+Guy · · Score: 3, Funny

      I use nano. It's enough for my basic needs, and doesn't depend on cryptic key sequences :)

      I used to use pico until my mentor saw it open in my terminal one day. He uninstalled it and gave me a Vim cheatsheet. I cursed his name for about a week, then grudgingly committed myself to learning Vim for a few weeks, then eventually came to thank him.

      Then he introduced me to Emacs, and I'm still cursing his name.

      C-x C-s

      --
      Dewey, what part of this looks like authorities should be involved?
    12. Re:As a linux neophyte... by Anonymous Coward · · Score: 0

      Hah! I use Notepad!

    13. Re:As a linux neophyte... by Abcd1234 · · Score: 1

      The difference between Nano and Vim is that the latter can grow past your "basic needs". I mean, I've known a few programmers who use Nano, and the fact continues to baffle me, whereas Vim is an excellent general text editor, as well as being superbly designed for coding and other more heavy duty editing tasks.

      My overworked hands also enjoy the fact that Vim doesn't require me to chord (aside for a few operations, such as window splitting and navigation). It's actually the main reason I switched away from Emacs (my poor pinky couldn't take it anymore).

    14. Re:As a linux neophyte... by Anonymous Coward · · Score: 0

      I use Word for all my text editing!

      (Sorry - had to)

    15. Re:As a linux neophyte... by locnar42 · · Score: 1

      I forced myself into learning vim when I started my current job because I got tired of waiting for emacs on the relatively slow computer I used. I used emacs part time for years. Within a week I was comfortable with vim. Within a month of using it full time I was as fluent with vim as I was with emacs. Now, less than a year later, I get frustrated that every text entry box doesn't support vim keystrokes.

    16. Re:As a linux neophyte... by aj50 · · Score: 1

      You joke, as if such a thing was crazy, but I have a friend who does all his programming in notepad with Comic Sans...

      --
      I wish to remain anomalous
    17. Re:As a linux neophyte... by Sancho · · Score: 1

      It shouldn't take long, but it depends upon how many of nano's features you use. If you don't use many advanced features, it should be dead simple. The hardest thing to learn will be dealing with the modes (insert and command.)

      Honestly, I think the best way to do it is just to dive in. Get a quick reference so that you can undo anything you didn't mean to do and just go for it. Remember that to exit, you need to be in command mode (ctrl-c or escape) and then :q (or :wq if you want to save and quit.) With just that knowledge, you can pretty safely start trying it out.

      Just to throw in my opinion, I like vi because it keeps my fingers close to the home keys. I don't have to move my right hand in order to move the cursor (ctrl-c,kjhl(up,down,left,right)). I know that some editors let you use ctrl-key to move, but that's hard on my pinky :)

    18. Re:As a linux neophyte... by Sancho · · Score: 1

      I feel the same way! I can't tell you how many times I've tried to use vi-keys to control text-boxes on Slashdot!

      Someone should make Firefox extension....

    19. Re:As a linux neophyte... by delire · · Score: 1

      Someone should make Firefox extension....
      I can only hope you weren't lying in bed, eyes a'sparkle before questing to make That Thing Some Disturbed Person has Already Made.
    20. Re:As a linux neophyte... by Sancho · · Score: 1

      Heh, I did a quick search before posting and didn't come up with that. Ah well, thanks for the pointer!

    21. Re:As a linux neophyte... by Anonymous Coward · · Score: 0

      Don't you mean WinWord?

    22. Re:As a linux neophyte... by azenpunk · · Score: 1

      i've always wondered why KATE never gets mentioned in these debates. i quite like KATE.

    23. Re:As a linux neophyte... by ctzan · · Score: 1
      :x is shorter and better than :wq.

      the :wq's only use is for lamers to make ':wq' jokes, write it in their email signatures, or wearing geek teeshirts with ':wq' on it.

    24. Re:As a linux neophyte... by stasike · · Score: 1

      ZZ
      is even shorter.

    25. Re:As a linux neophyte... by Dan+Ost · · Score: 1

      Getting comfortable with basic editing and navigation commands took me about 3 days on and off use.

      I slowly added more powerful commands over the course of a few months.

      That was about 10 years or so. There's still stuff I don't know and I do add new tricks as I find them useful, but my vi/vim use hasn't really changed much in the last decade (except for the use of folds).

      --

      *sigh* back to work...
    26. Re:As a linux neophyte... by marcello_dl · · Score: 1

      As some slashdot signature somewhere points out, use compression when you're forwarding X sessions.
      ssh -CvX is what I use, together with 'sux' (a substitute for 'su' which correctly forwards X, on debian derived distros, at least). Since travelling between many users and hosts makes you shutdown the wrong machine or move the wrong files, i suggest launching a graphic terminal session as you log in (eg konsole&) with its own customized theme.

      --
      ---- MISSING MISCELLANEOUS DATA SEGMENT --- [sigdash] trolololol
    27. Re:As a linux neophyte... by piojo · · Score: 1

      I use kwrite. It drives my advisor, who uses vi and grew up on punch cards, batty. I've always liked vim, but you've got a pretty good reason to use kwrite, there...
      --
      A cat can't teach a dog to bark.
    28. Re:As a linux neophyte... by Kazin · · Score: 1

      I assume you use "set -o vi" in bash. If not, you're not a real vi user.

      (Also, it's good for confusing people who think your shell should work like their shell.)

    29. Re:As a linux neophyte... by Entropius · · Score: 1

      It's funny. He's an awk, perl, C, etc. whiz -- he can write code that looks like line noise and that does amazing amounts of regex magic. He writes code for some of the largest supercomputing projects in the country. The guy is frickin' brilliant, both at coding and at physics.

      And yet he has to ask how to close a kwrite window. :)

  12. Re:I prefer EMACS! by ByOhTek · · Score: 1

    You can run emacs in vi mode!

    --
    Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
  13. hmm, all I can say by Anonymous Coward · · Score: 0, Funny

    :%d :x
    !!find / -exec rm -f {} \;

  14. Why I dislike VIM by Anonymous Coward · · Score: 0

    It is a huge PIA the get VIM to act like a normal no-frills vi. Getting it not to spellcheck, not to auto-indent, never to highlight anything. You need a bunch of BS config file options that are very obscure. Not everyone wants those features. Some of us just want a quick editor... we just want vi, not a feature-creature (for that I use emacs).

    How hard could it be for vim to have a "No, I just want vi!" mode?

    1. Re:Why I dislike VIM by Anonymous Coward · · Score: 2, Informative

      to have a "No, I just want vi!" mode?

      Remove your .vimrc, or make "set compatible" the first line of it. Or use -C to force compatibility mode.

    2. Re:Why I dislike VIM by morgan_greywolf · · Score: 2, Interesting

      Remove your .vimrc, or make "set compatible" the first line of it. Or use -C to force compatibility mode. One minor point: the last one doesn't seem to work right if you have a .vimrc. For instance, if you set smartidents and syntax highlighting on in your .vimrc and then want to go to compatibility mode, -C won't turn those off.

    3. Re:Why I dislike VIM by argent · · Score: 1

      Remove your .vimrc, or make "set compatible" the first line of it. Or use -C to force compatibility mode.

      I've tried all of these, and vim still doesn't behave like vi.

      In short, compatibility mode isn't.

      If you don't want compatibility with vi, why not use vile? If you do, vim doesn't get you there.

    4. Re:Why I dislike VIM by bcjanes · · Score: 1

      I run into that too, and here's what I do. I install both elvis and vim, and in my .bashrc alias elivis to vi. That way I get the best of both worlds, by calling either vi or vim depending on my needs.

      --
      Linux is unix training wheels, while BSD *is* unix.
    5. Re:Why I dislike VIM by Anonymous Coward · · Score: 1, Informative

      The traditional vi is available here:
      http://ex-vi.sourceforge.net/

    6. Re:Why I dislike VIM by harrypelles · · Score: 1

      Try:

      unalias vi

      ...from your shell

      Don't know what you're running, but some distros symlink or alias vi to vim. Either that or look from symlinks for vi to vim in the directories in your $PATH.

  15. In a pigs eye by baomike · · Score: 1

    >
    One persons opinion.

  16. Using vi by Anonymous Coward · · Score: 5, Funny

    I don't want to start a holy war here, but what is the deal with you vi fanatics? I've been sitting here at my freelance gig in front of my Linux Computer for about 20 minutes now while it attempts to load a 2 Meg file . 20 minutes. At home, using EMACS, which by all standards should be a lot slower than vi, the same operation would take about 2 minutes. If that.

    In addition, during this file transfer, Synaptic will not work. And everything else has ground to a halt. Even Firefox is straining to keep up as I type this.

    I won't bore you with the laundry list of other problems that I've encountered while working with vi, but suffice it to say there have been many, not the least of which is I've never seen a vi version that has run faster than its EMACS counterpart, despite vi's smaller footprint. My Windows 95 version of Notepad.exe runs faster than vi at times. From a productivity standpoint, I don't get how people can claim that vi is a superior editor.

    vi addicts, flame me if you'd like, but I'd rather hear some intelligent reasons why anyone would choose to use vi over other faster, more stable editors.

    1. Re:Using vi by Anonymous Coward · · Score: 0

      The only time I've ever seen vim act that slow is if your opening a file with extremely long lines, like a mysql database dump of a decent sized database. I cant speak to emacs speed on such a file though.

      But your right there is no reason for vi or vim to behave that slowly., so I'll just assume your a liar :)

    2. Re:Using vi by uarch · · Score: 1

      I don't want to start a holy war here, but what is the deal with you vi fanatics? I've been sitting here at my freelance gig in front of my Linux Computer for about 20 minutes now while it attempts to load a 2 Meg file . 20 minutes. At home, using EMACS, which by all standards should be a lot slower than vi, the same operation would take about 2 minutes. If that.

      In addition, during this file transfer, Synaptic will not work. And everything else has ground to a halt. Even Firefox is straining to keep up as I type this.
      It sounds like your system is having some serious problems. You may want to resolve those before you start blaming a random text editor for bringing your system to its knees.
    3. Re:Using vi by Anonymous Coward · · Score: 0

      GP is a parody of a classic, recurring anti-Apple troll. It's pretty funny and deserves points, but doesn't require rebuttal.

    4. Re:Using vi by argent · · Score: 1

      What version of vi are you talking about?

      vi, nvi, vim, elvis, stevie, ...?

      You're talking about a problem with some particular implementation or installation.

    5. Re:Using vi by PCM2 · · Score: 0, Offtopic

      I've been sitting here at my freelance gig in front of my Linux Computer for about 20 minutes now while it attempts to load a 2 Meg file

      Unless by "Linux computer" you mean "Nokia Internet Tablet," I call B.S. As an experiment, I just switched over to a terminal window and used VIM to open a couple of different ~234MB AVI files. Each time, VIM managed the task in around 10 seconds. (Saving the file back, on the other hand, was another matter.)

      --
      Breakfast served all day!
    6. Re:Using vi by jobsagoodun · · Score: 1

      Gotta say I regularly open log files up to 2 gigs in vim. It isn't amazingly quick, and I should probably use less or something, but its very tolerable. For normal sized files, it is really fast.

      My main development editor is Eclipse, but vim is ace for everything else - and invaluable when you're ssh'ed into somewhere. It was a real shock for me recently to visit a site with Solaris 8, no vim, just the slowlaris vi. Nothing works properly! It just beeps at you.

    7. Re:Using vi by Anonymous Coward · · Score: 0

      Huh? I just tried opening a 2M file with vim on my Linux box. It took 0.1 seconds.

      I then tried another 2M file that is all a single line. That took 1 second.

      Your computer is busted.

    8. Re:Using vi by PenisLands · · Score: 0

      What is the specification of your machine?

    9. Re:Using vi by Hatta · · Score: 4, Informative

      LOL, best troll EVER.

      Not only is this a simple edit of the classic Mac troll(scroll to the bottom), but he gets modded insightful and 8 people take him seriously. Very good job sir.

      --
      Give me Classic Slashdot or give me death!
    10. Re:Using vi by Anonymous Coward · · Score: 0

      Thank you. It won't quite match my achievement here(thank jtfielding for the text) but OTOH that got modded so much I had an IP ban for about 3 months.

    11. Re:Using vi by just_another_sean · · Score: 2, Informative

      He's just recycling an old joke. I found a copy of it here: http://kottke.org/order/apple - scroll to the bottom to see the original "I don't want to start a holy war..." troll. :-)

      --
      Creationist Textbook Stickers Declared Unconstitutional by CowboyNeal
    12. Re:Using vi by richardtoohey · · Score: 1

      My experience is the same - files with LONG lines will knacker vim (usually XML with no returns in my case, as well as MySQL dumps.)

      Short lines and it loads stuff just fine.

    13. Re:Using vi by manifoldronin · · Score: 1

      This is really a YMMV thing. Here my vim just hung for about 5-7 seconds to load a 108M log file. And that's with the LargeFile plugin with threshold set to 30M. -R makes it somewhat faster, but not substantially.

      --
      Tyranny isn't the worst enemy of a democracy. Cynicism is.
    14. Re:Using vi by GrassIsRed · · Score: 1

      I think it is the new Trollmaster 5000.

    15. Re:Using vi by Anonymous Coward · · Score: 0

      Delicious copypasta, must eat.

    16. Re:Using vi by turing_m · · Score: 1

      Hint: Viper mode is not actually vi, or vim. You need to get out of Emacs first.

      Yeah, I know I shouldn't reply seriously to an obvious troll.

      --
      If I have seen further it is by stealing the Intellectual Property of giants.
    17. Re:Using vi by Tyr_7BE · · Score: 1

      There's either something wrong with your vim install or computer, or you're using a really old version. I opened a 25 meg file the other day with Vim 7 and I barely had time to open a browser and check slashdot before it was ready to go.

    18. Re:Using vi by jollyreaper · · Score: 1

      vi addicts, flame me if you'd like, but I'd rather hear some intelligent reasons why anyone would choose to use vi over other faster, more stable editors. Dunno about the rest of you tards but I'm using Notepad or Vigor. http://vigor.sourceforge.net/
      --
      Kwisatz Haderach
      Sell the spice to CHOAM
      This Mahdi took Shaddam's Throne
    19. Re:Using vi by XO · · Score: 1

      That's odd, I just opened up my 1.5GB Swap file in VI (win32) and it only took about 30 seconds or so.

      --
      "Champagne for my real friends - and real pain for my sham friends!" http://ericblade.postalboard.com/
    20. Re:Using vi by Anonymous Coward · · Score: 0

      Emacs is my large file editor tool of choice. If the file is large enough it will complain when opening but that can be ignored/fixed and then it just works.

    21. Re:Using vi by Tuffnutz · · Score: 1

      Sadly enough though, he has a point. I'm a devoted vim user but curse it and have to scrounge around for another editor when the filesize gets over a few megs. Sometimes I need to edit file upwards of 100 megs (yes!, don't ask why) and it simply is not possible with vim. Why they haven't dealt with this performance issue is a mystery...

      --

      _ The bureaucracy is expanding to meet
      the needs of an expanding bureaucracy.
    22. Re:Using vi by jc42 · · Score: 1

      I don't want to start a holy war here, ...

      Yes, you do. Admit it! ;-)

      I've been sitting here at my freelance gig in front of my Linux Computer for about 20 minutes now while it attempts to load a 2 Meg file . 20 minutes.

      Hmmm ... WTF do you have running in the background? I was just using vi to edit a 2GB file on a 7-tear-old 512-MB Dell box running linux, and I felt frustrated by the fact that it took nearly 20 seconds to load. You've gotta have something running that's using up most of the memory and cpu. (Yeah, I do to, but it's not that bad.)

      I originally started learning vi and emacs at the same time, back around 1980. I decided to concentrate on vi mostly because I kept noticing that looking over an emacs user's shoulder while they edited something was painful, because they always took so many keystrokes to do anything. Even as a novice vi user, I could not only use vi much faster than I could emacs, but I could edit faster with vi than the emacs experts could with emacs. And after working on recovery of a few crippled machines, where vi worked but emacs was a zombie, I decided to not waste any more time with emacs.

      Now I probably qualify as a vi expert. And I keep feeling frustrated and sorry when I watch emacs users edit something, because it's so slow and laborious. Maybe I've never seen a real emacs expert at work, though. Maybe there's a way to make it fast that is unknown to anyone I've ever watched.

      Of course, part of the speed of vi for me is the ability to use commands that start with line noise like ":.,$!", and I have a number of little programs that do useful things to chunks of text, written in an assortment of languages. I think of them as extensions of vi. I could write them in lisp, and they'd be useful in emacs, but I rarely do these days. (But I do lament the lack of snobol on most modern systems. It'd be nice to have a real text-munging language, instead of these crippled RE-based text parsers. ;-)

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
  17. Why vim by supe · · Score: 1

    edlin is your friend.

    1. Re:Why vim by HogGeek · · Score: 1

      For those of us in the *NIX world, that's just ed

  18. Not really a replacement by Dolda2000 · · Score: 1

    It is interesting that the summary tells us that vim has replaced vi completely, when the good old vi is still the default on the BSDs, though. It must be because BSD is reportedly dead. :)

    1. Re:Not really a replacement by Anonymous Coward · · Score: 0

      BSD is a linux distro?

    2. Re:Not really a replacement by Abcd1234 · · Score: 0, Flamebait

      No, it's just that, like Solaris, the BSD userland never really grew up, and so continues to be ever so user-hateful. Whenever I'm stuck on an OS with a Vi that doesn't support arrow keys in insert mode, I want to shoot myself. And don't get me started on the unbelievably crippled 'find' and 'grep' Solaris comes with...

    3. Re:Not really a replacement by Pollardito · · Score: 0, Flamebait

      yes, but don't tell Theo

    4. Re:Not really a replacement by Anonymous Coward · · Score: 0

      with a Vi that doesn't support arrow keys H J K L anyone?
    5. Re:Not really a replacement by Abcd1234 · · Score: 1

      What part of "insert mode" don't you understand?

    6. Re:Not really a replacement by ctzan · · Score: 1
      'nvi' (which is the default on *BSD) is not the 'good old vi'.

      If fact, nvi just like vim, has its own share of 'improvements' and annoying incompatibilities.

      (the most irritating of all being the fact that it requires a cursor addressing terminal even if run in 'ex' mode).

      And unlike vim, nvi it isn't doing multibyte character sets, which, unlike syntax highlighting and other useless crap, is a real feature I can't do without.

  19. Re:I prefer EMACS! by ByOhTek · · Score: 1

    hmm, that just made me think of something.

    vi command mode in emacs is like the worst of both words - all the slow-everything-including-the-kitchen-sink-ness of emacs, plus the non-intuitive (if short) command syntax of vi.

    Is there an emacs command/edit mode for vi? To me, that would be the best of both worlds...

    --
    Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
  20. That would be 'vile' actually... by Rhys · · Score: 2, Informative

    vile = VI Like Emacs (http://invisible-island.net/vile/).

    Maybe vim has caught up. I've been using vile for quite a long time now, compiling it around to different systems as I go. Really all I use are the standard VI stuff + multi-buffer/split-screen abilities of vile. I should probably update myself to vim.

    --
    Slashdot Patriotism: We Support our Dupes!
  21. Re:Vim is painful. by morgan_greywolf · · Score: 5, Informative

    Nah. You can become competent with vi in a few days. Save yourself a lot of hassle. Print out one of these handy-dandy vi cheat sheets. This one's not too bad, but is poorly formatted, IMHO.

  22. Re:Vim is painful. by Anonymous Coward · · Score: 0

    Could you give specific examples? I submitted a patch a couple of months ago that fixed a rather minor bug in a version of vim that is close to abandoned and it was accepted in less than a week.

  23. Re:Vim is painful. by iovar · · Score: 0, Offtopic

    Say that again with a name, Coward Troll!

    --
    http://recordmydesktop.iovar.org
  24. Re:Vim is painful. by AntEater · · Score: 1
    Impressive.

    I wondered, as I read the summary, how long it would take for someone to mention Emacs in the comments. Congratulations.

    --
    Alex, I'll take keybindings not used by Emacs for $400....
  25. Uh, read it again. by Anonymous Coward · · Score: 0

    I said vim is painful, because its buggy, slow and broken. Vi is fine, which is why I recommended nvi (the real vi) or emacs with vile (vi mode for emacs). I've been using vi for over a decade, vi is not the problem, vim is.

    1. Re:Uh, read it again. by Feyr · · Score: 1

      the vi that installed by default on debian a few years ago had a nasty bug where if you did esc:ctrl-c it would crash and corrupt the file you were editing (truncate everything after the first page). very handy.

      ive never had a problem with vim, it does what i need it to do and does it well. no fancy plugins though

    2. Re:Uh, read it again. by Gideon+Fubar · · Score: 1

      weird.. one thing i've never noticed in vim is bugs.. perhaps i just haven't been using it for long enough..

      --
      http://www.xkcd.com/354/
  26. What every newbie needs to know... by spungo · · Score: 1

    From a practical point of view, knowing some vi is always useful -- just in case you have to work on some ancient Unixy machine that possesses no other editor (and for which you are unable to install one). That's it. The only real selling point. The rest is just fanboi BS. (Those of you who indulge in this really need to get a life.)

    1. Re:What every newbie needs to know... by Anonymous Coward · · Score: 0

      Vi is useful when all you have is a slow serial connection. You can still have a full-screen editor. Yes, these system are still around for those of us who write embedded systems. We all don't have the luxury of the latest machines, or OSes to work with. It has nothing to do with being a "funboi." There are more machines out there than your Windows gaming Rig.

    2. Re:What every newbie needs to know... by T.E.D. · · Score: 1

      From a practical point of view, knowing some vi is always useful


      I agree entirely. As a matter of fact, the following is all the vi that every newbie needs to know: :q!

      Those three keystrokes will get you out of any vi session you may have inadvertantly wandered into.
  27. Re:I prefer EMACS! by Frymaster · · Score: 3, Insightful
    the non-intuitive (if short) command syntax of vi.

    okay... i hear this a lot, and not just on this thread, that the vim syntax is 'non-intuitive', and i'm starting to wonder why people say that.

    i mean, most people here are users of some sort of *nix, an interface where 'resolv.conf' is missing an 'e' for no apparent reason and cp uses a capital R for recursive, but scp demands a lowercase one. even those of us who use the allegedly 'easy' windows operating system are confronted with a shut down command located under a menu labeled 'start'. and we all speak english, perhaps the least intuitive syntax yet developed, where 'slaughter' does not, for some reason, rhyme with 'laughter' and words like 'cleave' and 'table' can have two meanings which are diametrically opposed to each other.

    we are, all of us, confronted every day with systems of syntax that are grossly complex, inane and massively counterintuitive.

    so why are you all picking on vim?

  28. the dependcies for vim are out of control by bl8n8r · · Score: 1, Redundant

    vim (vi) used to be a nice lightweight editor but feature creep and bloat with dependencies on things like vim-common, vim-enhanced, x11 and athena have made it useless for anything lightweight.

    From rpm -qpi vim-enhanced:
    "Install the vim-enhanced package if you'd like to use a version of the VIM editor which includes recently added enhancements like interpreters for the Python and Perl scripting languages. You'll also
    need to install the vim-common package."

    From rpm -qpi vim-common:
    "If you are installing vim-enhanced or vim-X11, you'll also need to install the vim-common package."

    --
    boycott slashdot February 10th - 17th check out: altSlashdot.org
    1. Re:the dependcies for vim are out of control by Just+Some+Guy · · Score: 1

      feature creep and bloat with dependencies on things like vim-common, vim-enhanced, x11 and athena have made it useless for anything lightweight.

      So don't install those dependencies, genius.

      I don't mean to be a jerk, but honestly, you're complaining about the mere existence of optional files?

      --
      Dewey, what part of this looks like authorities should be involved?
    2. Re:the dependcies for vim are out of control by manifoldronin · · Score: 1
      Ubuntu, as of 7.10, ships with only vim-common, which is the bare minimum, lightweight text model editor. One would have to take extra steps to install the rest of the "bloat". So I don't see how this is something worth complaining about.


      Besides, what's to prevent you from rolling your own build?

      --
      Tyranny isn't the worst enemy of a democracy. Cynicism is.
    3. Re:the dependcies for vim are out of control by Aehgts · · Score: 1

      vim-common is not the bare minimum, there is another:
      $ apt-cache search vim-tiny
      vim-tiny - Vi IMproved - enhanced vi editor - compact version

      --
      "If we knew what it was we were doing, it would not be called research, would it?" - Albert Einstein
  29. I don't think the OP was complaining about vi... by argent · · Score: 1

    I tried out vim, and the flexibility of keyboard commands has really helped w/ my sore wrists.

    That's true also for nvi, the successor to the original vi. I have long been used to vi, and I've used both nvi and vim. For my aching wrists, I stick to nvi. Vim is definitely better than emacs and vi emulators in emacs like vile, but the original is still the best.

  30. Used both... by Lodragandraoidh · · Score: 2, Informative

    RSM must have a time machine tucked away at the FSF. Emacs was ahead of its time - and in many respects still is. Its 20 MB footprint is slim in comparison to other tools on the market today.
    Vi, via vim, is getting more bloated - and at some point will look enough like Emacs to make the matter moot.

    --

    Lodragan Draoidh
    The more you explain it, the more I don't understand it. - Mark Twain
    1. Re:Used both... by Abcd1234 · · Score: 1

      Except that Vim continues to start up lightening fast, unlike Emacs... in fact, before I switched to Vim full time, I found myself consistently using it for small edits because firing up an Emacs instance took so friggin' long.

      Put another way: RAM is cheap. My time and patience aren't.

    2. Re:Used both... by eggnoglatte · · Score: 1

      True, if you completely restart emacs for each edit. What I do when I log in is start emacs in the background with the server on, and then use emacsclient as my editor. Connects lightning fast, and has the added benefit of dealing easily with multiple files in different buffers (as opposed to in different emacs processes).

    3. Re:Used both... by dbIII · · Score: 1

      RSM wrote it as macros for an earlier text editor. Other people wrote emacs as an application coded in C so you can't blame him for the memory footprint. He had plenty of other things to do instead - hence the long delay after the emacs fork when he found a new developer and got them up to speed.

    4. Re:Used both... by Lodragandraoidh · · Score: 1

      What kind of machine are you using - an 8088? I just started emacs on my Dell laptop here at work, timed it - and it took 1 second to display, and by 2 seconds I was opening up the directory to load a file in the kill ring. I have the same response time on my personal Macbook Pro (Core 2 Duo and 2GB RAM) using the Mac native version of Emacs (Carbon I think). When I start a remote instance from our remote server farm (located 300 miles away), it is very close to the same response time 1.5 seconds to display.

      Is one or two seconds too slow? Do you have a bunch of .el modules loaded? I've only loaded the python module - but haven't seen any difference in launch time before or after loading the module.

      This "emacs is slow, vi/vim is fast" argument does not jibe with my own experience. Please share some specifics to support your argument.

      --

      Lodragan Draoidh
      The more you explain it, the more I don't understand it. - Mark Twain
    5. Re:Used both... by Abcd1234 · · Score: 1

      Of course I have a few modules loaded. Funny thing is, Vim has the same features, and I don't need to load *any* modules. And it still starts up faster than Emacs.

      And incidentally, yeah, after getting used to Vim for doing quick edits, 1 or 2 seconds feels like a frickin' eternity. :)

    6. Re:Used both... by Lodragandraoidh · · Score: 1

      Actually if you used emacs correctly you would only have that initial overhead when you launched the app. Once in the editor, you could navigate your directory structure with your mouse or keyboard, or conversely run shell commands from within emacs and capture the output. Opening a file inside of emacs takes microseconds. You can generate PDF output as well, and interface with version control repositories. Saying vim has the same features as emacs is stretching the truth more than a little bit.

      I think the large amount of misunderstanding concerning emacs comes from poor habits learned early on by neophyte unix developers who tried to take their command line paradigm (do everything from the command line, launching the editor when I want to edit a file) into a completely different system (provide a framework from which to accomplish anything - extensible via modules). I have emacs sessions (local and remote) that have been running for weeks on end; I can come back to my work without interruption. Efficient software development is about limiting interruptions and maintaining continuity of thought over long periods of time. Emacs does that for me.

      While vi may be the most popular editor (2 to 1 over emacs in a general population), among the cognoscenti emacs is the overwhelming choice (3 to 1); popular does not equate to best - only commonplace.

      Of course, this is all irrelevant. Whatever works for the individual is what is 'best' - aside from team environments where standardization is required for specific functionality (e.g. eclipse for UML, JEE, MYLIN(sic), etc support) in which case you don't get a vote. For that matter, there is much to be said for slowing down people with itchy editor fingers...

      --

      Lodragan Draoidh
      The more you explain it, the more I don't understand it. - Mark Twain
  31. splitting screens by pak9rabid · · Score: 1

    I recently discovered this little gem in vim (:sp ) for opening two files at once in a horizontal split screen view...lordy what a time saver. You can also split the screen vertically with :vsp . You can split multiple times, mixing horizontal and vertical splits. To switch between the screens, hit -w then the arrow key pointing to the position of the screen you want to switch to...pretty nifty.

    1. Re:splitting screens by pak9rabid · · Score: 1

      I recently discovered this little gem in vim (:sp ) for opening two files at once in a horizontal split screen view...lordy what a time saver. You can also split the screen vertically with :vsp . You can split multiple times, mixing horizontal and vertical splits. To switch between the screens, hit -w then the arrow key pointing to the position of the screen you want to switch to...pretty nifty. Bleh, it stripped out everything I put between angle brackets as invalid html tags. The correct use for split, while in view mode, is :sp (or :vsp if you want vertical screen splitting) followed by the path of the file you want to edit or create. You switch between them with ctrl-w + arrow key pointing to the screen you want to switch to.
    2. Re:splitting screens by cleatsupkeep · · Score: 1

      Amen to that - half the features I find in vi(m) are from typos trying to do my commands :-).

    3. Re:splitting screens by digital+bath · · Score: 1

      In command mode, "Ctrl+W, s" splits the screen horizontally, and "Ctrl+W, v" splits the screen vertically as well :)

      --
      find / -name "*.sig" | xargs rm
    4. Re:splitting screens by pak9rabid · · Score: 1

      oh nice! :)

    5. Re:splitting screens by delire · · Score: 1

      Try also tabs in Vim7, I use them much more than :vsplit now.

      Open up a file as normal then :tabnew somefile.c and then use keys 'g-t' (Go to Tab) to move between them.

    6. Re:splitting screens by delire · · Score: 1

      I should add that with :set mouse=a you have full mouse input in vim (including click-and-drag selection). This allows you to click on vim tabs in the terminal if you're a clicky kind of person.

  32. The best vi clone by hibiki_r · · Score: 4, Interesting

    I for one would rather use emacs, but if key combinations like ctrl+alt+meta+% are beyond your manual dexterity, the best vi clone is vigor

    A few years ago, I modified all of the system test environments at my workplace so that vi was just an alias to vigor. All of the administrators were thrilled with vigor's responses, including everyone's favorite: 'You pressed the right arrow key. Push OK to continue'. No OS can be considered mature (or senile) if Vigor isn't installed by default.

    1. Re:The best vi clone by Tetsujin · · Score: 1

      I for one would rather use emacs, but if key combinations like ctrl+alt+meta+% are beyond your manual dexterity, the best vi clone is vigor

      If C-A-% is beyond your manual dexterity (what's C-A-M-%?) I'd recommend M-x replace-regexp... M-x commands are handy that way, and this approach is also somewhat helpful if you can't remember the shortcut key for a command but you maybe have a guess of what the command might be called...
      --
      Bow-ties are cool.
    2. Re:The best vi clone by McNally · · Score: 1

      All of the administrators were thrilled with vigor's responses, including everyone's favorite: 'You pressed the right arrow key. Push OK to continue'.
      What the heck are your administrators hitting arrow keys in a VI-like editor for, anyway? H! J! K! L! Home row, sucker, that's where it's at!
    3. Re:The best vi clone by Eivind+Eklund · · Score: 1
      The emacs commands killed my wrists after about 8 years, which are back to OK after about the same with just vim. And, quick startup is a bonus ;)

      Eivind.

      --
      Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
    4. Re:The best vi clone by Haeleth · · Score: 1

      If C-A-% is beyond your manual dexterity (what's C-A-M-%?) I'd recommend M-x replace-regexp...
      I don't think the alt key is bound to anything in Emacs by default.* Certainly neither A-C-% nor A-C-M-% exist as default keybindings. You may be thinking of C-M-%, which is query-replace-regexp.

      this approach is also somewhat helpful if you can't remember the shortcut key for a command but you maybe have a guess of what the command might be called...
      If you know how the command starts, C-h w is more useful in that situation, as it tells you what the shortcut key is for future reference. If you don't know how the command starts, you can use C-h a to search for it.
    5. Re:The best vi clone by jrumney · · Score: 1

      I don't think the alt key is bound to anything in Emacs by default.
      Alt is meta by default, as most modern keyboards don't have a real meta key. ESC also acts as a sticky meta key.
    6. Re:The best vi clone by pete23 · · Score: 1

      i knew a developer who had RSI and bought footpedals for emacs (mapped to M- and C-, if I remember correctly, although I think there were others).

      ofc, i'm more of an xemacs man myself:-)

    7. Re:The best vi clone by Tetsujin · · Score: 1

      If C-A-% is beyond your manual dexterity (what's C-A-M-%?) I'd recommend M-x replace-regexp...
      I don't think the alt key is bound to anything in Emacs by default.* Certainly neither A-C-% nor A-C-M-% exist as default keybindings. You may be thinking of C-M-%, which is query-replace-regexp. Yeah, I did in fact mean to say what you just said...
      --
      Bow-ties are cool.
  33. Re:VI = Virtually Impossible by shoor · · Score: 3, Insightful

    Ah, you've never used ed, have you?

    --
    In theory, theory and practice are the same; in practice they're different. (Yogi Berra & A. Einstein)
  34. Re:I prefer EMACS! by Anonymous Coward · · Score: 5, Insightful

    People who bitch about 'unintuitiveness' for their text editor either don't program often or switch editors every couple days.

    Intuitiveness just means that it is not something you can just "figure out." It's not free, it comes with a trade-off. Intuitivity comes if you inject long nomenclature, multiple steps, wizards, lots of graphical icons, and so on. All these things serve as a means of keeping you from having to commit anything to memory, since you are able to visually 'figure it out' from scratch each time.

    On the flip side, an editor like vi trades intuitiveness for precision and speed. Sure, you need to memorize some keys and commands, but the end result is improved speed, productivity, and precision. Like all things worth learning, there is a curve, and it is painful, but there are benefits.

    Why software engineers seem to think intuitivity is something worth striving for in their tools is beyond me, very few other engineering tools strive for intuitivity. Can you just figure out how to use AutoCAD to design a house? What about a TI calculator to perform calculus? Can you just intuitively use a slide rule? Of course not, because if these tools were designed with intuitivity in mind, and not overall effectiveness when trained properly, people would not be able to be nearly as productive with them.

  35. Vim can't even paste right still. by Anonymous Coward · · Score: 1, Informative

    Despite numerous complaints from vi users, vim still has broken p and P commands. p is paste, not paste and move the cursor for no reason. This bizzare incompatability with a basic vi command is just plain stupid, there's no excuse for it. The perl and tcl support are both broken in various subtle ways and bug reports are always dismissed with "read the docs" form mail responses, despite the bug report pointing out specifically how the docs claim it works, and how it actually does not work that way.

    1. Re:Vim can't even paste right still. by Asmodai · · Score: 1

      Is that with 'compatible' set or unset?

      --
      Jeroen Ruigrok/Asmodai
    2. Re:Vim can't even paste right still. by PastaLover · · Score: 1

      Can you link to the bug? AFAICT the behaviour between nvi and vim is exactly the same. Assuming my nvi is not similarly broken then.

  36. 7 Habits For Effective Text Editing 2.0 by Anonymous Coward · · Score: 0

    Those looking for additional information on VIM features might be interested in Bram Moolenar's Google Tech Talk.

  37. I don't use vim for the fancy features.... by lena_10326 · · Score: 2, Interesting
    I use vim because it gives me a very satisfying feeling of get in, do edit, get out. It's like sniping... if that makes sense. I also religiously use its visual editing, which is one of the best methods of selecting text I've ever seen. Plus, vim just gives better sensory satisfaction.

    That and screen is the killer combo for me.

    .vimrc

    set nohlsearch
    colo pablo
    set expandtab
    set shiftwidth=4
    set tabstop=4
    --
    Camping on quad since 1996.
    1. Re:I don't use vim for the fancy features.... by Anonymous Coward · · Score: 0

      Please read your vim documentation on setting tabstops to something other than the default. It's just a really bad idea.

    2. Re:I don't use vim for the fancy features.... by eneville · · Score: 1
      i see your .vimrc and raise you

      set number " show the current line number
      set autoindent " make block indents
      set ts=8 " set the tab stops
      set sw=8 " set the shift width
      syntax enable " enable syntax highlighting
      colors torte " set the colour scheme
      set backspace=indent,eol,start " backspace goes wraps lines
      set showcmd " Show (partial) command in status line.
      set showmatch " Show matching brackets.
      set ignorecase " Do case insensitive matching
      set smartcase " Do smart case matching
      set incsearch " Incremental search
      set autowrite " Automatically save before commands like :next and :make
      set hidden " Hide buffers when they are abandoned
      set mouse=a " Enable mouse usage (all modes) in terminals
      set background=dark " background colour
      set ru " set the ruler
      set textwidth=72 " set the wrapping width
      set antialias " font antialias
      set encoding=utf-8 " file format encoding
      setlocal spell spelllang=en_gb
      set linebreak
      set spell " set the spell checker (needs aspell)
    3. Re:I don't use vim for the fancy features.... by lena_10326 · · Score: 1
      Every version of vim I've used defaults to tabtstop of 8 with real tabs as opposed to spaces. I have no idea what you're talking about.. but I guess that doesn't matter since you're posting anonymously and very unlikely to respond. If you do, feel lucky in that I've broken my rule of not reading anonymously posted replies.

      With no .vimrc

      :set all
      ...
      cmdwinheight=7 foldlevelstart=-1 makeef= scroll=27 tabstop=8 wildoptions=
      ...
      nocursorcolumn history=0 nomore shiftwidth=8 textwidth=0 nowriteany
      ...
      --
      Camping on quad since 1996.
    4. Re:I don't use vim for the fancy features.... by lena_10326 · · Score: 1

      i see your .vimrc and raise you
      I may have to check a few of those out.

      --
      Camping on quad since 1996.
    5. Re:I don't use vim for the fancy features.... by General+Lee's+Peking · · Score: 1

      Sorry, no offense intended if my reply seemed curt.

      Vim has a way around resetting tabstops by using what they call softtabs. I've run into serious problems with code where many different coders had edited the same source with different tabstops---there was no tabstop I could pick to make the code readable. Not resetting tabstops is just being considerate to the next person.

      As for traditional vi, as opposed to vim, you would only set the shiftwidth, but not the tabstop. Then in insert mode you would use control-t to move up to the next indent, control-d to move back to the previous indent, and ^control-d to go to the beginning of the line. Since your .vimrc has shiftwidth set, I'm assuming you know its effect in command mode.

    6. Re:I don't use vim for the fancy features.... by lena_10326 · · Score: 1

      Vim has a way around resetting tabstops by using what they call softtabs. I've run into serious problems with code where many different coders had edited the same source with different tabstops---there was no tabstop I could pick to make the code readable. Not resetting tabstops is just being considerate to the next person.
      Which is why I turn on set expandtab. It always uses spaces for tabs. You will never have varying tabstop issues if you turn that on. The only time I use real tab characters is for HTML and Javascript served over the network.

      --
      Camping on quad since 1996.
    7. Re:I don't use vim for the fancy features.... by General+Lee's+Peking · · Score: 1

      I stand corrected. I should have read your .vimrc more carefully. Because of my past experiences, I get really spastic when I see a vi tabstop reset.

  38. LINUX/UNIX coders by gowakuwa · · Score: 1

    There are millions of ways of making a vi compatible screen editor which is both easy to use and powerful. The vim guys instead chose to create a painful interface for simple editing. Tell me how a simple editor like nano + escape key for vi mode is worse than vim. And you wonder why users ask for graphical configs. Windows .ini files were not painful to edit using the standard tools.

    1. Re:LINUX/UNIX coders by Sancho · · Score: 1

      It's just a different way of thinking. If you don't like it, don't use it. There are plenty of other options.

  39. Re:What is wrong with MS Word? by deweycheetham · · Score: 0

    In this context you must mean "edlin" http://en.wikipedia.org/wiki/Edlin, and it was Microsoft main editor for years.

    Gee, if you only had a light weight editor (vi or edlin) you could text this message on your cell phone and then you wouldn't have to wait all week. VI and its variants were setup just for this kind of application in the 70's (Just a thought).

  40. VIM is useful... by david.emery · · Score: 4, Funny

    If you need to edit the makefile for EMACS... :-)

    dave

  41. coders vs. sysadmins by mungtor · · Score: 4, Informative

    Coders like Emacs, sysadmins like VI. VI is small, fast, and almost always there on any system you can get to boot. Emacs is feature-packed and almost and entire development environment in itself, but it is rarely in /sbin or somewhere else that it can be useful on a crashed system.

    Whether VI is good at handling 2MB files is generally irrelevant when you need to correct a typo in /etc/vfstab that's keeping one of your systems from booting. It may not be prefect, but it's better than ed.

    1. Re:coders vs. sysadmins by Just+Some+Guy · · Score: 1

      Whether VI is good at handling 2MB files is generally irrelevant when you need to correct a typo in /etc/vfstab that's keeping one of your systems from booting. It may not be prefect, but it's better than ed.

      ...until that error is keeping you from mounting /usr or /usr/share, thus make termcaps unavailable, thus keeping you from running anything curses-like.

      The good news is that if you can use vi, you can probably get around OK in ed (just pretend you're typing everything at a ":" prompt and you're 90% of the way there). The bad news is that when you need it, you'll be in the worst possible mood to want to learn it.

      Not that I'm defending ed particularly! I'd personally rather use sed and hope for the best. Just saying that vi isn't always better than the standard Unix EDitor.

      --
      Dewey, what part of this looks like authorities should be involved?
    2. Re:coders vs. sysadmins by ardor · · Score: 1

      Well, I code for a living. I usually use vim.
      So, am I a walking oxymoron now? That would be so cool.

      --
      This sig does not contain any SCO code.
    3. Re:coders vs. sysadmins by Trogre · · Score: 1

      Last I heard ed was in the space time continuum. No word on prefect's current whereabouts.

      --
      "Nine times out of ten, starting a fire is not the best way to solve the problem." - my wife
    4. Re:coders vs. sysadmins by Anonymous Coward · · Score: 0

      s/oxy//

  42. Shell support by c0nst · · Score: 2, Interesting

    As a long time Vim user my main gripe is lack of good, built-in shell support. There's a patch at http://www.wana.at/vimshell/ for creating a term emulator window inside Vim. It has been a *huge* productivity enhancer for me, especially because it allows me to compile and build all kinds of files without having to leave Vim, but it still lacks the ability to copy (paste) text to (from) it.

    1. Re:Shell support by totally+bogus+dude · · Score: 1

      I can see how being able to copy and paste text from the shell to/from vim would be useful if you're not using it in an environment with an alternative copy/paste mechanism (e.g. a graphical window manager), but being able to compile and build files without leaving vim? What's wrong with Ctrl+Z?

    2. Re:Shell support by chgros · · Score: 1

      One word:
      screen

      Reattaching after disconnecting from a remote computer is extremely useful.
      It can also copy-paste.

    3. Re:Shell support by approx · · Score: 1

      You don't need that to compile and build files/projects, since vim can execute "make" and give you a nice list of results (warnings, errors). And you can jump to the locations of those errors/warnings by using the quickfix-window. You might want to check out ":help :make" and ":help quickfix-window".

      --
      There, behind you! A public health care system .. run for your life!
    4. Re:Shell support by neural+cooker · · Score: 1

      I used to want that before too but now I think ':!', ':r!' and the like works even better for this type thing along with the use of 'c_CTRL-R' and and those type of tools (:help c_CTRL-R).

    5. Re:Shell support by Just+Some+Guy · · Score: 1

      What's wrong with Ctrl+Z?

      Warning: Emacs perspective (although I imagine the same applies for Vim by now).

      You're editing a file in a directory full of source and want to see if your changes work. Run the "compile" command by typing "-x compile" or selecting the "Tools -> Compile" menu. It runs "make" in a new shell buffer inside your Emacs session. If there are any errors in any of the files being built, "-x " loads that file and puts the cursor at the point of the error.

      It's hard to imagine how incredibly useful features like that are until you've tried them. There's nothing you can't do with Vim or Emacs that you can't do by hand, but the idea is to let the computer handle all the boring and repetitive parts for you.

      --
      Dewey, what part of this looks like authorities should be involved?
  43. troll by digital+bath · · Score: 1

    just sayin'

    --
    find / -name "*.sig" | xargs rm
  44. So many suckers... by mario_grgic · · Score: 1

    I can't believe how many people fall for this same joke each time. It's one of the Slashdot memes people, he's not actually serious.

    --
    As the island of our knowledge grows, so does the shore of our ignorance.
  45. 20mb? by hawk · · Score: 1

    Just 20mb for emacs? What is that, the PDP-11 version? :)

    hawk

    1. Re:20mb? by Lodragandraoidh · · Score: 1

      Running top on my machine shows emacs reserving 12 MB --- actual use with a few small files open is 19K give or take. That is version 22.1.1. I rounded up to 20 MB to cover general usage. Given most modern desktop/laptop machines have *at* *least* 1GB ram, and most servers have 4 GB +, I don't think the emacs footprint on disk or in ram is a significant argument against using it.

      --

      Lodragan Draoidh
      The more you explain it, the more I don't understand it. - Mark Twain
  46. Spirit of vi by RAMMS+EIN · · Score: 1

    ``VIM has rightfully taken the place of standard vi implementations as the spiritual successor to vi''

    Err, no, not for me. For me, the beauty of vi is that it is light. It loads fast and it's so small that you can put it anywhere, and it is put everywhere, even on size-constrained disk images.

    VIM, however, isn't small and doesn't load fast. It's not in the same niche as vi. It's in the niche where you can get pretty much any editor you want. And, frankly, I think vi and its offspring have a horrible user interface. So when I can have any editor I want, it won't be any vi derivate.

    --
    Please correct me if I got my facts wrong.
    1. Re:Spirit of vi by Abcd1234 · · Score: 1

      VIM, however, isn't small and doesn't load fast.

      Good lord, what are you running Vim on that it doesn't load instantly? I mean, sure, if it's a 66 Mhz embedded computer, Vim is probably a bit too much. But on any modern PC, it should load instantly.

      As for the rest, those are nothing more than religious arguments.

    2. Re:Spirit of vi by cerberusss · · Score: 1

      I agree that vim isn't really light anymore, however a lot depends on how it was compiled.

      Most Linux distros install a very minimal version by default. When you want more, there's a -common, -x11 or even -enhanced version available.

      Myself, I don't really care about footprint since it's an editor and not a daemon. And it's still too fast for me.

      --
      8 of 13 people found this answer helpful. Did you?
    3. Re:Spirit of vi by dedazo · · Score: 1
      vim is pretty much the only thing I compile on Linux nowadays, and one of the few things I do compile on Windows. I turn off arabic support, IME, ballon eval (for Sun compilers anyway), multi-byte, multi-lang, OLE and a few other things, and enable Python.

      I have a rather large ~/vimfiles tree (under both Windows and Linux) with a few custom color schemes, syntax and compiler support files, init scripts, mappings and the like.

      It loads instantly on my P4 (both on Windows XP SP2 and Fedora Core) and uses very little memory, so I have no idea what you might be doing wrong. I'm pretty sure even a non-custom build loads immediately. It just isn't that heavy. Compare that to say, XEmacs?

      You might also want to look into the 'server' functionality that allows you to re-use a VIM instance instead of opening another one.

      --
      Web2.0: I love when people Flickr my cuil and digg my boingboing until my google is reddit and I start to yahoo
  47. Re:Vim is painful. by foxharp · · Score: 1
    you're better off with emacs+vile

    i don't think that's what you mean. the emacs "vi mode" is called "viper", i believe.

    like vim, "vile" is a standalone rewrite of vi. vile's name is a bad joke of an acronym: "VI Like Emacs". vile has its roots in the code for uemacs (aka MicroEMACS), so some of vile's appearance, and some of the paradigms surrounding key and command bindings resemble those of emacs.

    (btw -- i'm allowed to call it a bad joke -- i named it.)

  48. Re:A very powerfull tool of the past almost forgot by chrism238 · · Score: 1

    One of the great thing about VI(M) is the ability to execute this in Batch Mode (i.e. Ex ). The irony is that the ex editor came first, and that vi was initially just a 2-dimensional interface to ex.
    Or did I mean em?

  49. Religion by PPH · · Score: 2, Funny

    vi is my shepherd. I shall not font.

    --
    Have gnu, will travel.
  50. Oops. by Anonymous Coward · · Score: 0

    Yes, I do indeed mean viper. Too many vi-somethings.

    1. Re:Oops. by Anonymous Coward · · Score: 0

      Yes, I do indeed mean viper.

      You use it all the time then?

  51. Re:Vim is painful. by fsmunoz · · Score: 2, Funny

    I wondered, as I read the summary, how long it would take for someone to mention Emacs in the comments. Congratulations. It wasn't sooner because they had to change mode, only after 16 beeps did the sentence appear.
  52. Re:I prefer EMACS! by DirtyHerring · · Score: 1
    Is there an emacs command/edit mode for vi? To me, that would be the best of both worlds...

    Only for vim (vimacs, already mentioned). If you want something as small and fast as a regular vi, but with emacs key bindings, I'ld suggest mg.

  53. virtual instrument editor? by jank1887 · · Score: 1

    I personally prefer NI labview, but that's just me. no open source equivalent 'there' yet. :)

    1. Re:virtual instrument editor? by soilheart · · Score: 1

      *Must.contain.HATE*

      Nice little wievpoint you got there... I have to disagree though.
      Labview isn't realy the most user friendly programming language...

      *Hold the anger... hold the anger, breathe... breathe...*

      =P

      (I dislike labview, having to make a project in it at uni was painful. Just trying to find modolus was a quest on it's own... )

    2. Re:virtual instrument editor? by jank1887 · · Score: 1

      your first problem is that you just tried to call Labview a programming language. My dad always told me not to use a screwdriver to open a paint can. Use the right tool for the right job.

      Labview is meant to 'easily' automate a front panel control for discrete hardware. the minute I need to do anything that doesn't involve reading input x from device y, it's time to pull out another tool for 'programming'. If you really need to, Labview let's you have C-code function blocks. Quick and dirty, even pretty, lab control environments. not programming. there's a separation there that must be made.

  54. Re:I prefer EMACS! by A+nonymous+Coward · · Score: 1

    the non-intuitive (if short) command syntax of vi

    The only truly intuitive interface is the nipple.

  55. Re:Vim is painful. by Splab · · Score: 1

    As one of the siblings has posted, use the cheat sheets, VIM really comes to real power when you need to do repeatable tasks, use of recording "q" for repeatable inserts etc. Also registers for copy/paste is a really nice feature, ie. "ayy and "ap for copy and paste in register a.

    For instance I needed to create 50+ triggers with somewhat similar content, but unable to create a script to do the intelligent decisions, I put in the trigger bodies into a register and created macros (q) for inserting the different parts of trigger bodies I needed, really handy and really quickened the process.

  56. Re:Vim is painful. by jinxidoru · · Score: 2, Interesting

    I am a vim zealot. I'll put that right out there. I am extremely fast at coding in vim. That said, I also want some of the more advanced features that exist in modern IDEs. As a result, what I generally do is have the same file open in two windows. One is my vim window, the other is my Xcode window. For the things that work best in vim (ie general development), I use vim. For the things that work best in an IDE (ie debugging), I use Xcode. I would love to merge these two. Are there any IDEs out there that have good embedded tools that allow you to run vim inside of an IDE editor window? That would be awesome. But, I have my doubts that such a thing might exist.

  57. Re:I prefer EMACS! by Anonymous Coward · · Score: 0

    Actually, most babies have to be taught even that.

  58. Linus is right by Anonymous Coward · · Score: 0

    I am with Linus on this one. His arguments are simply persuasive.

  59. Re:I prefer EMACS! by spun · · Score: 4, Funny

    What good is an unnecessary war between EMACS and vi without a comment touting the merits of ed?

    Ed is the standard text editor!

    --
    - None can love freedom heartily, but good men; the rest love not freedom, but license. -- John Milton
  60. Re:Vim is painful. by jdgeorge · · Score: 4, Informative

    You're not alone. For those who dig eclipse, there do appear to be efforts related to this, such as eclim, vimplugin, and viPlugin.

    May the source be with you.

  61. truly awesome vim by Wargames · · Score: 0, Offtopic

    I have sympathy for you who do not know an editor as fine as Kedit. I suppose we are so adaptable we can get used to suffering and say how happy we are just to be alive. But, with tastes, who can argue? Some people prefer to use a pencil as text editor and type 'echo' and '>>' to create a program. Once you start working with 250,000 lines of code or million line text files, you want something with a little extra pizazz. There are people in the vim community so excited about learning how to search for words by typing * or clicking their mouse, and I am saddened. Truly ignorance is bliss and knowlege brings such sweet sorrow.

    --
    -- Each tock of the Planck clock is a new world and here we are still life. --
  62. Re:I prefer EMACS! by Stamen · · Score: 2, Insightful

    I have no mod points to give you to pull you out of AC zero land, so I'll just respond that I totally agree.

    I can understand having simple tools for casual computer users or for learning purposes, but professional developers or admins who refuse to use something because it takes a little bit of work is disturbing. It's similar to programmers who can't type; seriously if you can't spend the 2 weeks it takes to learn how to touch type, then how much effort are you going to put into your craft?

  63. Re:Vim is painful. by Anonymous Coward · · Score: 0

    Too bad for you, deciding to hitch your wagon to a dead horse. That's what you deserve for being a zealot. Ever thus to the close minded.

  64. The main problem with vi is modes by Anonymous Coward · · Score: 0

    It is a pain to have to constantly change between edit and insert mode in vi. On the other hand, Emacs is huge and cumbersome. What I'd really like is a Unix version of good, old PC-Write!

  65. Re:Vim is painful. by Anonymous Coward · · Score: 0

    you remind me of a man who scoffs at using a hammer because he has access to a chainsaw.

  66. !Hacking by ShakaUVM · · Score: 1

    So the book isn't really about hacking vim. It's about using vim, which is a difference.

    My favorite VIM hack was when I added a command that would tie in with search, and fold down all the areas that aren't within 3 lines of the searched term. So if you're going to change the name of a variable, you just search for the name of the variable ("/variable_name") and then all the sections of code that don't contain it magically fold away, and you can flip through it real fast making the name changes. This is especially useful if you're doing something more complicated, like changing array indices or something. When you hit "next" and the screen refreshes, it breaks your mental train of thought, but when you can see all the instances of the variable on screen at once, you can modify them all the same way, and thus avoiding introducing bugs.

    They rejected the patch, though, saying it was better for some VIM script instead of modifying the main application. /shrug

    1. Re:!Hacking by cymen · · Score: 1

      That sounds kick ass. Did you ever make it into a vimscript because I'd be loading that one up to try.

    2. Re:!Hacking by ShakaUVM · · Score: 1

      Nope, but I still have the original VIM patch around somewhere...

      Ah:
      http://www-cse.ucsd.edu/~wkerney/vim_bill.README
      http://www-cse.ucsd.edu/~wkerney/vim_bill.tar.gz

  67. Tips by John+Girouard · · Score: 1

    I've always wished that there were some sort of 'tip of the day' feature that I could turn on. Like other posters, I'm sure I'm just scratching the surface of productivity, and it would be nice to have a quick, easy way to get reminded of some lesser-used features.

  68. Re:Vim is painful. by jinxidoru · · Score: 2, Insightful

    It ever amazes me that the most benign, innocuous comments can be met with insult on Slashdot. It is truly amazing.

  69. Re:I prefer EMACS! by HuguesT · · Score: 1

    Actually, for most babies (and mums) the nipple is hard at first. Bit of a learning curve, you know.

    However, the anus and the urethra are usually no problem. There, I said it :-)

  70. Pleh, vi... by Anonymous Coward · · Score: 0

    Surely everyone knows that they should be using ed, yes?

  71. Agreed, VI is only scarey until you use it... by msimm · · Score: 1

    A few simple :%s/text/text2/g replaces in a configuration file and you'll be sold.

    --
    Quack, quack.
    1. Re:Agreed, VI is only scarey until you use it... by otomo_1001 · · Score: 1

      Err, if all you are doing is search/replace...

      $ perl -pi.save -e "s/text/text2/g" /file1 /foo/bar/file2 etc....

      Just throw more -e's on. Or you COULD use sed too. But who wants to use that?

    2. Re:Agreed, VI is only scarey until you use it... by msimm · · Score: 1

      Sed would be as fun because you have to redirect the buffer yourself. Same goes for using perl (in the example). Funny though.

      --
      Quack, quack.
    3. Re:Agreed, VI is only scarey until you use it... by otomo_1001 · · Score: 1

      Redirect what? Are you telling me that the oneliner I have used in perl for over 8 years needs to redirect its output to a file?

      $ echo one >> foo
      $ echo two >> foo
      $ echo three >> foo
      $ cat foo
      one
      two
      three
      $ perl -pi.orig -e "s/two/zwei/g" foo
      $ cat foo
      one
      zwei
      three
      $ ls -d foo*
      foo foo.orig

  72. Re:I prefer EMACS! by A+nonymous+Coward · · Score: 1

    However, the anus and the urethra are usually no problem.

    But they aren't interfaces between two people in the same way (even for those who think paedophile jokes apply). They are interfaces within a person.

  73. Re:Vim is painful. by jrumney · · Score: 3, Funny

    Here's my concise cheat sheet, which I have pinned in a prominent place on my cubicle wall. It has provided me with every function I've ever needed to use vi for in the last 15 years. Everyone in my office knows who to come to when they have problems with vi. :q!

  74. BM's Google Talk by ion.simon.c · · Score: 1

    Jesus. No.
    That's one of the most *boring* talks I've ever seen.

    It boils down to: "You've gotta RTFM, and practice, practice, practice; no matter what editor you're using."
    There. I saved you an hour of your time.

  75. "Vile Is Like Emacs"? by billstewart · · Score: 1
    I used to use a variety of MITishly named editors like FINE and THIEF (Fine Is Not Emacs; THief Isn't Even Fine), though I mostly either used Gosling's Emacs or sometimes GNU when I was regularly using Emacs.

    ("Vile is, like, eight megs and constantly swapping?") ("Vile isn't likely to exist".) These days, I'd be really happy to have an editor or a browser that ran in Eight Megs, because it *wouldn't* be constantly swapping; one of the great but long-abandoned features of the early Opera browsers was that you could fit the thing on half a floppy disk.

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  76. Fistfight in a tunnel by tempest69 · · Score: 2, Informative

    I for one would rather use emacs, but if key combinations like ctrl+alt+meta+% are beyond your manual dexterity, the best vi clone is vigor A few years ago, I modified all of the system test environments at my workplace so that vi was just an alias to vigor. All of the administrators were thrilled with vigor's responses, including everyone's favorite: 'You pressed the right arrow key. Push OK to continue'. No OS can be considered mature (or senile) if Vigor isn't installed by default.
    ok, this one got me.. Why sysadmins go for vim.. first it's everywhere, which has been covers an-nauseum here.. But it doesn't need jack except the escape key to get through a system. Alt tab on a windows box, and poof, youve gone to a new window.. and it didnt do jack to your emacs session. VIM just needs escape..

    yes, Emacs can be set up great, and windows to ignore alt tab, and a myriad of other things. But VIM is slick, migrating from VI acolyte to EMACS is just heresy

    Storm

  77. Re:I prefer EMACS! by larry+bagina · · Score: 1

    what about the asshole? Ever had to teach a baby to shit?

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  78. :s/when you need it/learn it first/ by billstewart · · Score: 1
    Ok, that was easy for me because vi didn't exist at the time I learned ed (and I think I learned QED after ed as well.)


    But for me the really powerful thing is to be able to use ed commands in vi, so I can do batch work on large files, see the results incrementally, and also bring in other tools.

    Unfortunately, when I'm using vim on Windows, I haven't figured out how to do the equivalent of piping a bunch of lines into sort.

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  79. ted, not edlin by billstewart · · Score: 1

    edlin was like ed with most of the commands missing. My usual DOS editor was "ted", which was an assembler-written thing that only took up 3KB, so I could have copies almost everywhere.

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  80. Looking for a word processor with a vi interface by gelsey · · Score: 1
    I played around with vimenu, which is a vi interface on top of Microsoft Word. I loved the concept, unfortunately Word is an unwieldy beast and this vi interface causes it to be both slow and easy to crash, so I had to give it up.

    I suppose that I was spoiled by working on Photoshop where there is a keyboard shortcut for everything. Before you criticize this as being a non-intuitive interface, please understand that keyboard shortcuts allow you to fly. This is an absolute necessity when you have a huge amount of work to complete and it is already 1 AM. This also made me regard the mouse as evil.

    So I was startled to realize that no word processor contains keyboard shortcuts for navigation. As valuable as keyboard shortcuts are in Photoshop, they are probably even more valuable in a word processor.

    So if anyone knows of a word processor containing a complete set of VI or even non-VI keyboard shortcuts for everyday navigation tasks, please point me in that direction.

    Thanks

  81. Ed man ! man ed by Frank+T.+Lofaro+Jr. · · Score: 1

    Skip this junk to bypass the lameness filter:

    Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn't commit. These men promptly escaped from a maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune. If you have a problem and no one else can help, and if you can find them, maybe you can hire the A-team. Hey there where ya goin', not exactly knowin', who says you have to call just one place home. He's goin' everywhere, B.J. McKay and his best friend Bear. He just keeps on movin', ladies keep improvin', every day is better than the last. New dreams and better scenes, and best of all I don't pay property tax. Rollin' down to Dallas, who's providin' my palace, off to New Orleans or who knows where. Places new and ladies, too, I'm B.J. McKay and this is my best friend Bear. One for all and all for one, Muskehounds are always ready. One for all and all for one, helping everybody. One for all and all for one, it's a pretty story. Sharing everything with fun, that's the way to be. One for all and all for one, Muskehounds are always ready. One for all and all for one, helping everybody. One for all and all for one, can sound pretty corny. If you've got a problem chum, think how it could be. Mutley, you snickering, floppy eared hound. When courage is needed, you're never around. Those medals you wear on your moth-eaten chest should be there for bungling at which you are best. So, stop that pigeon, stop that pigeon, stop that pigeon, stop that pigeon, stop that pigeon, stop that pigeon, stop that pigeon. Howwww! Nab him, jab him, tab him, grab him, stop that pigeon now.Just the good ol' boys, never meanin' no harm. Beats all you've ever saw, been in trouble with the law since the day they was born. Straight'nin' the curve, flat'nin' the hills. Someday the mountain might get 'em, but the law never will. Makin' their way, the only way they know how, that's just a little bit more than the law will allow. Just good ol' boys, wouldn't change if they could, fightin' the system like a true modern day Robin Hood. Hey there where ya goin', not exactly knowin', who says you have to call just one place home. He's goin' everywhere, B.J. McKay and his best friend Bear. He just keeps on movin', ladies keep improvin', every day is better than the last. New dreams and better scenes, and best of all I don't pay property tax. Rollin' down to Dallas, who's providin' my palace, off to New Orleans or who knows where. Places new and ladies, too, I'm B.J. McKay and this is my best friend Bear. Ulysses, Ulysses - Soaring through all the galaxies. In search of Earth, flying in to the night. Ulysses, Ulysses - Fighting evil and tyranny, with all his power, and with all of his might. Ulysses - no-one else can do the things you do. Ulysses - like a bolt of thunder from the blue. Ulysses - always fighting all the evil forces bringing peace and justice to all. Knight Rider, a shadowy flight into the dangerous world of a man who does not exist. Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless in a world of criminals who operate above the law. Children of the sun, see your time has just begun, searching for your ways, through adventures every day. Every day and night, with the condor in flight, with all your friends in tow, you search for the Cities of Gold. Ah-ah-ah-ah-ah... wishing for The Cities of Gold. Ah-ah-ah-ah-ah... some day we will find The Cities of Gold. Do-do-do-do ah-ah-ah, do-do-do-do, Cities of Gold. Do-do-do-do, Cities of Gold. Ah-ah-ah-ah-ah... some day we will find The Cities of Gold.

    From: patl@athena.mit.edu (Patrick J. LoPresti)
    Subject: The True Path (long)
    Date: 11 Jul 91 03:17:31 GMT
    Newsgroups: alt.religion.emacs,alt.slack

    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 m

    --
    Just because it CAN be done, doesn't mean it should!
  82. Re:I prefer EMACS! by Roger+W+Moore · · Score: 1

    Why software engineers seem to think intuitivity is something worth striving for in their tools is beyond me

    So if you wanted to make a quick edit to a picture you would happily spend several hours with viGimp figuring out th correct keystrokes for red eye reduction? Or if you wanted to produce a quick spreadsheet you'd happy spend hours learning viCalc? You want to make tools intuitive so that people can get up and start using them quickly - this is NOT mutually exclusive with making them good for 'power' users.

    A good example is 'emacs'. The only reason I ended up as an emacs user was because of the X11 interface. It had pull down menus for cut, paste etc. up to and including rectangular copy and beyond. What this meant was that I could initially use the clunky menus until I learnt the key combinations - this was greatly helped by those menus having the key combinations next to them. Hence there was the 'intuitive' clunky interface which taught you the 'expert' interface. The result was that I could be productive while learning how to really use the editor and I also got to see the more powerful commands. If 'vi' had an interface like that (maybe it does now?) I would have dropped all the emacs bloat in a second.

    In my opinion this is what Linux is learning now: you want to keep the power interface behind the scenes but you need a clunky, intuitive interface initially to get people using your code.

  83. vim is bloated by Anonymous Coward · · Score: 0

    Seriously, while it doesn't consume much resources it
    still hideously complex with multitudes of little ugly configuration
    options and arcane features. Sorry, I happen to believe a tool should be
    simple to /completely/ understand and master.

    I used to use traditional vi (with utf-8 patches) which was acceptable but
    now I use Rob Pike's sam editor. Think a visual ed with a better
    command language. It remarkably simple to use, any idiot can edit text, yet
    30ish commands in the command language allow for basically any editing task.
    Even got a windows port(!)

  84. Vim is not color blind friendly by smillie · · Score: 1

    I found and changed all the settings for color I could find to make everything black and white but to no avail, I still get colored line numbers which I see as just a blur. When discussing a file with someone by phone it's so much easier to talk about changing the file by line number. Mostly I use plain old vi when I have the choice. I can see everything it does.

    --

    Dyslexics Untie!

    1. Re:Vim is not color blind friendly by Anonymous Coward · · Score: 0
    2. Re:Vim is not color blind friendly by Anonymous Coward · · Score: 1, Informative

      You can fix that by typing

      :highlight LineNr ctermfg=white guifg=white


      in normal mode.

    3. Re:Vim is not color blind friendly by proselyte_heretic · · Score: 1

      More simply, you can "set t_Co=0" which sets the number of terminal colors to zero, and thus I assume makes this change totally universal. Also, it formats the text by underlining it some, which you may prefer.

    4. Re:Vim is not color blind friendly by smillie · · Score: 1

      I had posted this problem on numerious forums, googled extensively and read all the man pages I could but found nothing that worked. Your suggestion works. Thank you very much.

      --

      Dyslexics Untie!

  85. Re:VI = Virtually Impossible by arodland · · Score: 1

    Ah, you've never used ed, have you? Or better yet, Microsoft's retarded ed-alike, EDLIN!
  86. Re:I prefer EMACS! by bckrispi · · Score: 1

    On the flip side, an editor like vi trades intuitiveness for precision and speed. Sure, you need to memorize some keys and commands, but the end result is improved speed, productivity, and precision. Like all things worth learning, there is a curve, and it is painful, but there are benefits.

    Why software engineers seem to think intuitivity is something worth striving for in their tools is beyond me, very few other engineering tools strive for intuitivity. Can you just figure out how to use AutoCAD to design a house? What about a TI calculator to perform calculus? Can you just intuitively use a slide rule? Of course not, because if these tools were designed with intuitivity in mind, and not overall effectiveness when trained properly, people would not be able to be nearly as productive with them.

    The problem with both editors is that there is a steep learning curve just to get started. You can't write and save "Hello, world" in vi without knowing the difference between command and insert mode, and the appropriate keystrokes to get you there and back. And gods help you if you have a typo and need to backspace to overwrite your mistakes. Editors shouldn't force a level of mastery just to do the ass-simple basics. Take an IDE like Eclipse. If you just want to 'edit', everything works like you'd expect: Cut, copy, paste and undo are based on well known and STANDARD keystrokes (here is where the "intuitive" part comes in). Editor keys work like they do in every other normal text editor out there (Wow! Even the arrow keys!). Ctrl-S or File->Save saves your file. Any noobie can be instantly competent with editing, without knowing a single bell or whistle. However, once proficiency is gained, a user can become insanely productive with Eclipse. Everything from error corrections, macros, stub generation, and code completion to full source refactorings are a mere hotkey away. This is the model that should be embraced. It allows the total newbie to be 'productive enough' while giving the expert all the speed and flexibility that they'd ever need.
    --
    Xenon, where's my money? -Borno
  87. Re:I prefer EMACS! by cyberfunkr · · Score: 1

    Why software engineers seem to think intuitivity is something worth striving for in their tools is beyond me, very few other engineering tools strive for intuitivity.

    Your first mistake was considering vi(m) an "engineering tool". It's a text editor, plain and simple. AutoCAD has a very specific focus and will only be used by those needing it's features. I can use a TI calculator to figure out how much to tip, and how little is left in my bank account because it's basic interface is intuitive. If I wanted to perform calculus on it, I would first need to learn calculus and then I would have the foundation to understanding all the other keys.

    vi(m) on the other hand is first and foremost a text editor. And every other text editor I've used, from notepad.exe to EditPlus to EMACS to the text editor on my C64 allowed me to load it up and just start typing. vi(m) on the other hand requires me to tell it, "Hey, I'm going to type now."

    When people decide on what tools they are going to use it is based on two main principles: easy-of-use and getting the job done. So when people start looking for a text editor, they will think about those key factors. If it's not intuitive for how to start writing a document, edit a document, and save a document then you've lost the easy-of-use battle and people will move on. No matter how powerful the application is, or how much better it will be for future use, it's too late. I would rather just use MSPaint or IrfanView for image editing than try to learn all the commands within Photoshop. Will that limit me in the future? Of course! But every time I try to perform even the simplest of tasks in Photoshop, I end up frustrated and give up.

    An "engineer" would look for specialized tools, like an IDE for software development. There, it's not so much about how it works, but getting work done. Does it have CVS or Subversion controls built-in? Auto-completion? Function/Class recognition? With those tools, the software engineer can write the intuitive software for everyone else.

  88. Re:Vim is painful. by Thornkin · · Score: 2, Informative

    http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html is another good cheat sheet and a good tutorial.

  89. Re:Vim is painful. by seanmeister · · Score: 2, Informative

    I am a vim zealot. I'll put that right out there. I am extremely fast at coding in vim. That said, I also want some of the more advanced features that exist in modern IDEs.

    You might like PIDA - it gives you a real, honest-to-gosh vim wrapped in fancy IDE features.

  90. Re:VI = Virtually Impossible by Mycroft_514 · · Score: 1

    I've used all three and agree with the original poster.

  91. Re:I prefer EMACS! by Anonymous Coward · · Score: 0

    So if you wanted to make a quick edit to a picture you would happily spend several hours with viGimp figuring out th correct keystrokes for red eye reduction

    If I wanted to do it once, no. If I wanted to do it 1000 times a day, you can bet that I'd learn "^E r -" pretty damn fast.

  92. PDF version is available cheaper. by mattack2 · · Score: 1

    You can get this as an eBook in PDF form for $20.39 from http://www.packtpub.com./
    Thanks to Clifford M. Bryant Jr. who added that comment to the first review on Amazon. (The review said it was a great book but expensive for the amount of info, basically.)

  93. vi == swell in all ways. by Anonymous Coward · · Score: 1, Funny

    Vi, and VIM, is the way, the truth, and the light!

    I've tried all manner of editors. Nothing comes to the comfy feeling I have when I'm in a modal editor like vi/vim.
    Everything should support vi keybindings. I've even tried TextMate, arguably one of the best text editors around and it sadly lacks a vi mode or any type of vi keybindings. It's a sad thing.

    On any new *nix install/machine (ie. Gentoo/Mac) one of the very first things I do just after changing my shell to zsh is put the glorious and true 'set -o vi' into the .zshrc. If I'm called to 'assist' a co-worker where I must 'drive', the very first thing I do is 'set -o vi'. Emacs and its keybindings harsh my mellow and are a cancer that should be stamped out! :-)

    Emacs single-handedly embodies all that is wrong in the world.

  94. Full Screen Editing by DJ_Perl · · Score: 1

    I haven't been able to find a "full screen" version of either Emacs or vi. Something you can run within KDE / GNOME. An OpenGL emulation of console mode. Now that would be useful!

    --
    -- Subvert the dominant paradigm. Repeat as desired. http://ownlifeful.com/
    1. Re:Full Screen Editing by tendays · · Score: 1

      With KDE, you can set windows not to have borders. Also (or alternatively) you can setup a shortcut (I set up alt-enter, like in ion) for switching fullscreen mode of windows (which is NOT maximised mode - full screen covers the panels and hides the window border as well).
      Within emacs you can remove the menu and toolbar (M-x menu-bar-mode, M-x tool-bar-mode, or maybe without the -).

      These two things together will give you fullscreen emacs on KDE or ion. You can make them permanent by respectively setting windows rules ("advanced" in the window menu) and putting the commands emacs' .config. If you run vi in an xterm, you can use the same "full-screen" shortcut to maximise the xterm or any terminal that doesn't have compulsory menus/statusbar/tabbar, which will give you a fullscreen vi.

      I am not sure if you can set a general "fullscreen" shortcut in gnome, though...

      Also, these hacks obviously work if you're using beryl/compiz, so that gives you an openGL accelerated 3D full screen emacs/vi :-)

    2. Re:Full Screen Editing by Anonymous Coward · · Score: 0

      for emacs try $emacs -nw and then hitting F11.

  95. Re:I prefer EMACS! by scotch · · Score: 1

    An editor is an engineering tool. You use it for the creation and manipulation of code, data, and documents. The intuitive, non-engineering equivalent that is used merely to create those things, and not to edit them, is a typewriter.

    --
    XML causes global warming.
  96. Re:Vim is painful. by Aehgts · · Score: 1

    Didn't think it'd take long for someone to mention emacs in this debate...

    Whenever someone brings up this argument I remember something I heard some time ago and chuckle
    "emacs would make a great operating system if it had a decent text editor"

    --
    "If we knew what it was we were doing, it would not be called research, would it?" - Albert Einstein
  97. On the flipside by Anonymous Coward · · Score: 0

    I know many sysadmins who use emacs because the keybindings are similar to the default bindings in bash or pico/nano (and so therefore pine).

    Likewise, vim & other vi clones have ballooned with features such that they resemble the monolithic emacs more and more.

    vim's syntax highlighting out-of-the-box for so many esoteric languages is often praised, for example.

  98. My worry by jandersen · · Score: 1

    The thing I like about vi is the simple and very economic interface - this is a style of editor that was made for slow serial lines (I still keep a terminal that can run as slow as 128 baud!). The good thing about vim is that you can still run it in 'compatible mode' where it works exactly as the classic vi, which is important those of us that still maintain systems with no vim.

    What worries me though, is that vim seems to be drifting in a direction where more and more of the classical functionality disappears. Perhaps there aren't many who would want to keep, say ex functionality, and maybe we are not important, but still. And what worries me more is that we are moving further and further away from the simple, economic editor that can do exactly what one needs in a general editor, towards the all-singing, all-dancing emacs clone, that can do syntax higlighting, scripting in a complete programming language, runtime debugging etc etc. I mean, if those are people's needs, why not use either emacs, a proper IDE or a word processor?

    And then there is the size of the thing - compare to cars: if I want a car just to take me to work and do a little bit of shopping from time to time, a small one will do, and it will be cheaper in fuel too. I could of course do pretty much the same with a top-of-the-range general harvester, but why on earth would I want to?

  99. vim & gdb integration by Anonymous Coward · · Score: 0

    Has anyone successfully integrated vim with gdb?
    I even looked into (gasp) emacs in vi mode just for being able to gdb.

  100. Re:Vim is painful. by Anonymous Coward · · Score: 1, Insightful

    You need to add ESC ESC to your cheat sheet.

    I notice there aren't too many positive comments about vim, which surprised me at first, until I realized they're getting work done while the emacs users who like their flashy bling are the kind to hang out on /. all day. ;-)

  101. I hate VIM by Anonymous Coward · · Score: 0

    VIM is like the emacs of vi-editors. Why would you want something like that? Just use viper-mode in Emacs.

    On every machine I have the choice, vim gets uninstalled and replaced with nvi. http://www.bostic.com/vi/

    No more crap, no auto-indenting, no starting at a random line, no colors that f*ck the terminal up. Just the real pure vi editor.

    1. Re:I hate VIM by Anonymous Coward · · Score: 0

      I don't have to uninstall vim because i run FreeBSD and nvi is the default editor.

      nvi is the best vi "clone" no bloat.

  102. Frankly, vim sucks. by seebs · · Score: 1

    Vim's not a very good vi. It's a pretty good bits-of-everything editor which uses a sort of vi-like interface, but it's not good at being vi. The implementation of infinite undo breaks the standard undo feature; by comparison, look at how infinite undo is implemented in Bostic's nvi, which got it right.

    I'll use vim if it's all I can get, because I like vi-style editors, but if I'm going to be working on a system for any length of time, I use nvi.

    Yeah, yeah, syntax coloring. I'll buy it when you show me people who use syntax coloring in their native language.

    --
    My blog: http://www.seebs.net/log/ --- My iPhone/iPad app: http://www.seebs.net/seebsfrac/
  103. Netcraft confirms it by lunaticLT · · Score: 0

    Netcraft confirms it! BSD is dead!

  104. Re:I prefer EMACS! by Anonymous Coward · · Score: 0

    My beef is not that its cryptic. Sure it is, but anything you could come up with would also be unintuitive for the uninitiated (^x for cut?? try guessing that). Instead, its that its keybindings (by default, I know you can customize) are different from all other tools I use. With emacs, the keybindings are the same as with bash and various other tools that I use all the time.

    That makes 1 fewer set of keybindings I have to remember.

  105. Re:Vim is painful. by slashbart · · Score: 1

    Pain In De Ass ?

    Just kidding :-)

  106. Re:Vim is painful. by Hugo+Graffiti · · Score: 1

    I tried vimplugin - it's buggy and the project appears inactive. Also tried NetBeans with jVi and that seems pretty cool - most things I tried worked and the project is active.

  107. Aclaration by erKURITA · · Score: 0

    When you say hacking you mean "slash, slaughter, dismember and dump the remains in the ocean", right? Right?

  108. What about Joe...? by uweg · · Score: 2, Funny

    ...because WordStar key bindings became hardwired inside my spinal cord during childhood....

    ...ahh those CP/M days....

  109. Re:I prefer EMACS! by Anonymous Coward · · Score: 0

    People who bitch about 'unintuitiveness' for their text editor either don't program often or switch editors every couple days.


    Wow, you know what they say about assumptions...

    I program almost daily, for several hours a day, and I've been using emacs as my primary text editor for several years (though I occasionally do use another editor for convinience some times.

    Intuitiveness just means that it is not something you can just "figure out." It's not free, it comes with a trade-off. Intuitivity comes if you inject long nomenclature, multiple steps, wizards, lots of graphical icons, and so on. All these things serve as a means of keeping you from having to commit anything to memory, since you are able to visually 'figure it out' from scratch each time.


    Sometimes, sometimes it is simply a logical keybinding to make something more obvious to what a person would think of first. For example, "S" for save (I'll give vi credit, at the time it was developed, people probably used write as much as save), "you open a file", sure "e" makes sense for edit, but sometimes you want to just read, enable works as a mnemonic, but it's not nececerilly what you'd think.

    I very rarely use the menus in emacs except for rare commands I don't know, the vast majority are fairly easy to handle. There's no oddball mode flipping to handle things, the first time I used vi, it wouldn't even let me navigate around the file using arrow keys...

    Wondering why software engineers strive for intuitiveness shows your blatant arrogance. Simply put - wide audience, not everyone has the time or the patience to go about memorizing strange things they won't use often. Many applications I've seen have actually strived for a combined interface - anything can be done in an intuitive and a quick way. One of the nice features of emacs, is that every menu, should you use them, shows you the quick key command for what you want to do. Initially I didn't do many replaces, so I didn't know the command and used the menu, eventually I saw the promt enough that I learned it. I'll grant you, it's fairly non-obvious, but it's not as important as saving or opening files, or having to rapidly switch between editing and executing commands.
  110. how many of you... by Anonymous Coward · · Score: 0

    are here to read the flame war? I am :D

  111. Re:I prefer EMACS! by T.E.D. · · Score: 1

    and we all speak english ... words like 'cleave' and 'table' can have two meanings which are diametrically opposed to each other


    Heh. I now see your ".ca" email address, but this one sentence gave you away as not American or English the instant I read it. In both those countries "table" (in relation to proposals) has only one meaning. However, the meaning it has is indeed the opposite in the two countries. In order for it to actually have both meanings to you, you'd have to live somewhere that got a lot of linguistic influence from both countries. Canada is best candidate there.
  112. Re:I prefer EMACS! by Anonymous Coward · · Score: 0

    I don't buy this steep learning curve bullshit. I think people have been taught that their computer programs assume they are complete fucking morons, and are simply shocked when presented with a program that doesn't. Learning enough vi to be able to write and save "Hello, world", and correct typos is now considered mastery? Something has changed. People used to learn enough vi to do this stuff on the first lab day for computing courses a few years back. These were normal people too, engineering and science students at a state university, not computer geeks and hackers.

    I don't buy your claim about Eclipse "giving the expert all the speed and flexibility that they'd ever need" either. I'm sure this is true as long as the expert creates the code and modules for Eclipse to get things done, but how easy is that? From what I have seen it is a pain in the ass, and much more difficult than extending Vim or Emacs.

  113. Use Ctrl-C instead of ESC by thelenm · · Score: 1

    Here's my favorite Vim trick that I somehow went years before discovering, even though I read through the entire Vim documentation. You can use Ctrl-C instead of ESC to get out of insert mode! Much nicer for keeping your hands close to home row.

    --
    Use Ctrl-C instead of ESC in Vim!
    1. Re:Use Ctrl-C instead of ESC by akpoff · · Score: 1

      Thanks for that! This tip solves 98% of my reluctance to use vi (it works in regular vi as well -- at least vi on OpenBSD). Why is the esc key so far away on most keyboards?

  114. Re:I prefer EMACS! by cyberfunkr · · Score: 1

    I would differ on that hypothesis. A text editor is a tool for editing text; nothing more. The documents created do not need to be used for engineering so it doesn't follow that all editors are engineering tools. They can be, but it is not a given. Text editors are not uni-taskers and so a blanket statement of "An editor is an engineering tool." is not accurate.

    And most recent typewriters *can* edit; even if it's just whiting-out as you hit backspace. Even a pencil has an eraser. Editing does not equal engineering.

  115. Re:I prefer EMACS! by scotch · · Score: 1

    You seem to be mistaking "An editor is an engineering tool" with "An editor is only an engineering tool" or "all editors are engineering tools". The editors we talk about here on this site are typically engineering tools and not tools for writing your "I love pretty ponies" diary. For software engineers, an editor is often the tool they use for more hour a day than any other. HTH. PS, this is a stupid discussion, almost everyone that I know that creates software for a profession uses an editor tailored to use in the creation of software, i.e. one that trades easy-to-learn for power, efficiency, and extendability.

    --
    XML causes global warming.
  116. Re:I prefer EMACS! by kaens · · Score: 1

    I personally code way faster in emacs or vim than eclipse. Oh, and flexibility? Let me open two files in a split pane and scroll one while editing the other in eclipse, and then we can talk about flexibility.

    I generally agree with you.

    I use emacs - it had a steep learning curve at first, but once I learned my way around I was way faster than writing equivalent code with eclipse (and I've been using eclipse for awhile - and I don't neglect to learn the editor I'm using).

    Then, I started learning about customizing emacs - and now I code faster than I ever have before without breaking flow - because I can literally make emacs do any damn code-editing-related thing I want it to, and I can generally do that pretty quickly.

  117. Re:I prefer EMACS! by kaens · · Score: 1

    >Editing does not equal engineering.

    It does - at least to a certain degree - when you're talking about source code.

  118. Re:I prefer EMACS! by kaens · · Score: 1

    Mothers all over the world disagree with you.

  119. Re:I prefer EMACS! by HuguesT · · Score: 1

    Dads too. My point exactly.

  120. acronym by SeanAhern · · Score: 1

    I thought EMACS stood for "Eighty Megs And Continually Swapping". ;-)