×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

A Visual Walkthrough of New Features in Vim 7.0

ScuttleMonkey posted more than 7 years ago | from the if-vi-is-wrong-i-don't-wanna-be-right dept.

406

An anonymous reader writes "Anybody who has used Linux or any other OS would be aware of the very powerful and feature rich text editor Vi. This interesting article takes a visual look at some of the new features in the latest version of Vim 7.0 — a Vi clone created by Bram Moolenaar. From the article: 'Just for once, I wouldn't mind siding with the beast if that is what it takes to use Vi. The modern avatar of Vi is Vim — the free editor created by Bram Moolenaar. Riding from strength to strength, this editor in its 7th version is a powerhouse as far as an editor is concerned. When ever I use Vim (or GVim for that matter), it gives me the impression of the Beauty and the Beast.'"

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered

406 comments

Its been decided. (-1, Flamebait)

Anonymous Coward | more than 7 years ago | (#16136399)

VIM sucks use EMACS!

Re:Its been decided. (5, Funny)

SumoRoti (1000740) | more than 7 years ago | (#16136440)

EMACS ? you mean Escape Meta Alt Control Shift ??

Woohoo: Eight Megabytes And Continuously Swapping (0, Funny)

Anonymous Coward | more than 7 years ago | (#16136481)


Hmmm, hang-on, that doesn't sound as bad-ass as it did in the nineties.

Re:Woohoo: Eight Megabytes And Continuously Swappi (-1, Troll)

Anonymous Coward | more than 7 years ago | (#16136561)

That fucking GTK-crap causes GVim to use much more than Emacs, which uses plain and light X.

Fucking stupid Gnome-monkeys should keep writing Windows-shareware instead of contaminating free software with their unusable, bloated bullshit.

Re:Its been decided. (5, Funny)

Anonymous Coward | more than 7 years ago | (#16136504)

EMACS ? you mean Escape Meta Alt Control Shift ??
Nope, as in Generally Not Used / Except by Middle Aged Computer Scientists.

Re:Its been decided. (3, Funny)

mjj12 (10449) | more than 7 years ago | (#16136595)

No, he means Eight Megabytes And Constantly Swapping.

(And I even remember the days when that was a lot).

editors are for wimps (4, Funny)

joss (1346) | more than 7 years ago | (#16136404)

Real men just input the entire program at the command line using cat>myprog.c
Of course, "real men" score higher on machismo than common sense.
C'mon.. there is nothing that really needs saying on this topic, let the flame
wars begin.

Re:editors are for wimps (4, Funny)

Anonymous Coward | more than 7 years ago | (#16136456)

>Real men just input the entire program at the command line using cat>myprog.c


Huh? Try directly typing into GCC next time, you know, like:

gcc -x c - && ./a.out
  #include <stdlib.h>
  #include <stdio.h>
 
  int main(void) {
      if(puts("H., w.!")==EOF || fflush(stdout)==EOF) {
          fputs("Failed writing to standard output!\n", stderr);
          return(EXIT_FAILURE);
          }
 
      return(EXIT_SUCCESS);
      }
  ^D

Re:editors are for wimps (1)

Monsieur_F (531564) | more than 7 years ago | (#16136590)

For even more fun I tried sending gcc output to stdout using "-o -" but it just created a file called -.
Anyhow I am not sure how to "execute" stdin...

In the great words of Wikipedia (0)

Anonymous Coward | more than 7 years ago | (#16136461)

Fork Off!!!!

Re:editors are for wimps (4, Interesting)

clickclickdrone (964164) | more than 7 years ago | (#16136604)

You may laugh, I knew someone that coded that way. They sat, thought, mapped it all out in their head then typed it all in top to bottom in one go. Worse still, it worked first time 99% of the time and I don't recall them ever producing a single bug. Git. This was Dbase III+ FWIW.

Re:editors are for wimps (1)

value_added (719364) | more than 7 years ago | (#16136664)

Real men just input the entire program at the command line using cat>myprog.c

The modern man, however, uses nc -l 1234 > myprog.c.

Re:editors are for wimps (5, Funny)

Armer Hund (184073) | more than 7 years ago | (#16136682)

Real men just input the entire program at the command line using cat>myprog.c
A real man writes directly to the disk with a magnetised paperclip.

VIm 7.0 has been shipping with Ubuntu for months (1)

diablo-d3 (175104) | more than 7 years ago | (#16136405)

Ubuntu started shipping Vim 7.0 way back in April or May. Even though I quit Ubuntu [adterrasperaspera.com] , I have to say Ubuntu managed to do something right for once.

No, it's *not* Moolenaar (-1, Troll)

larry bagina (561269) | more than 7 years ago | (#16136406)

it's Moelenaar. (Actually, it should be a umulated o, but slashdot won't let me type one in).

Re:No, it's *not* Moolenaar (1)

Wm_K (761378) | more than 7 years ago | (#16136419)

So he even manages to spell it wrong on his own webpage? And What is umulated? Do you mean umlauted? Which is something the Dutch hardly do. That's a German thing...

Re:No, it's *not* Moolenaar (5, Funny)

Hal_Porter (817932) | more than 7 years ago | (#16136478)

Umulated is when you emulate an umlaut on an pure ASCII system by replacing ü with ue. Or ö with oe.

#ifndef READER_IS_GERMAN

An example
E.g. Göring -> Goering, or Führer to Fuehrer.

#else

// can someone else think of some examples that don't make German's spit their coffee?

#endif

Re:No, it's *not* Moolenaar (0)

Anonymous Coward | more than 7 years ago | (#16136633)

"rueckgeld" means "change" (monetary).

Re:No, it's *not* Moolenaar (4, Informative)

Scarblac (122480) | more than 7 years ago | (#16136446)

No, it's Bram Moolenaar. He's Dutch, molenaar means miller, and moolenaar is an old spelling of that. Both Molenaar and Moolenaar are common names; Mölenaar is just wrong, Dutch doesn't use umlauts like that.

Re:No, it's *not* Moolenaar (1)

truedfx (802492) | more than 7 years ago | (#16136505)

Dutch uses umlauts like that. See for example "überhaupt", which while originally German can be found in Dutch dictionaries. And if you're referring to words such as "poëzie", that's a trema, not an umlaut.

Re:No, it's *not* Moolenaar (1)

Scarblac (122480) | more than 7 years ago | (#16136530)

Well yes, there are words that use umlauts, but they're imported words, and there are tremas which aren't actually umlauts, which is why I said they're not used "like that". We use a thing that looks like two dots on top of a letter, but they're not the same as umlauts.

Thanks for illustrating my point, not that this whole thread really needs all these posts. Sheesh :-)

Please help me with vim (1)

xtracto (837672) | more than 7 years ago | (#16136413)

So from the article it seems Vim 7 is very powerful. I have tried to use vi several times but I just cant get used to the keys. I even have right here a "Vi editor Cheat Sheet" printed in small text as a card to have handy at my computer side.

I know the best way to learn to use Vim is to use it every day. My main editing tasks everyday are Latex processing and Java development. Usually I use Kile and Eclipse to solve my problems. As you can see I something like an IDE wore (wow). But I really would like to learn Vi (please I am not trolling).

I remember I once read about a Latex pluing or environment for Vi, but I found it a bit difficult to use it. Maybe i am making the wrong approach or something.

On the other side, why is it that the cursor move keys are HJKL when the touchtyping home keys are JKL; that is something that has always give me problems, I would feel more confortable having the JKL; as cursor because thats the place where I have my fingers (I touch type pretty quickly, thats one of the reasons I like to learn Vim, because of the reduced keyboard usage).

BTW, if anyone needs these tips, use CTRL+[ for ESC and CTRL+M for new line, this will prevent you from moving your hands (if you touch type of course) to weird places where those keys are. Oh and CTRL+H is the same as backspace...

Re:Please help me with vim (1)

Gumph (706694) | more than 7 years ago | (#16136468)

On the other side, why is it that the cursor move keys are HJKL when the touchtyping home keys are JKL; that is something that has always give me problems,
The reason vi use the hjkl combo - is that it was first created on a terminal that did not have any cursor keys and these 4 keys were used instead to move around the screen.

Re:Please help me with vim (1)

TeknoHog (164938) | more than 7 years ago | (#16136496)

How about you read the question again. Why "HJKL" instead of the more natural (for touch typists) "JKL;"?

Re:Please help me with vim (4, Insightful)

Scarblac (122480) | more than 7 years ago | (#16136535)

Presumably hjkl are much more reliably next to each other than jkl;?

Re:Please help me with vim (2, Interesting)

nath_de (535933) | more than 7 years ago | (#16136591)

Presumably hjkl are much more reliably next to each other than jkl;?
Right, on a German keyboard it is jklö for example. To reach ; you have to use the shift key.

Re:Please help me with vim (1)

Ulfalizer (881975) | more than 7 years ago | (#16136589)

I for one am glad it's HJKL, as ; to the right of L is unique to english keyboard layouts, iirc. Then again, it's pretty easy to remap keys.

Ulf

Re:Please help me with vim (1)

spitzak (4019) | more than 7 years ago | (#16136550)

I heard the terminal had arrows printed on those keys, which is why they were chosen. It might also make sense to avoid using a punctuation mark (the semicolon) as one of the arrows.

Re:Please help me with vim (1)

arun_s (877518) | more than 7 years ago | (#16136483)

I learnt Vi when I had to telnet to a remote machine and no other decent tool was available. You're right, using it really is the best way to learn it. So maybe you could try reducing your dependency on IDEs.
Open a terminal and stick with it.
Symlink eclipse to vi.
If you still feel you're faster in Eclipse, you could always stick with it. I agree the HJKL keys could have been JKL; but since you're either in insert mode or escape mode at any one time, hopefully it shouldn't be too much of a bother.

Re:Please help me with vim (4, Insightful)

Lusa (153265) | more than 7 years ago | (#16136588)

So maybe you could try reducing your dependency on IDEs.
Open a terminal and stick with it.
Symlink eclipse to vi.


That is perhaps the worst bit of advise I have seen so far. If they have a job to do, then they should not switch away from what gets the job done quickest for them. A far better bit of advise is to use vi for when the IDE does not help. Such as quick edits, shell script editing or config file changing. That way they still can get their job done in a reasonable amount of time but still get to use vi on a regular basis.

Re:Please help me with vim (1)

arun_s (877518) | more than 7 years ago | (#16136618)

You're right, I wouldn't normally recommend anyone to do that. In this case he specifically asked for help in performing his IDE-related tasks (latex etc).
If he sticks to config file editing, he'll learn nothing new in vi except insert mode, make changes and :wq.
For the actual stuff that really makes Vim powerful, you need to focus it on your specific requirement.
Just my 0.02$.

Re:Please help me with vim (1)

cortana (588495) | more than 7 years ago | (#16136497)

Try running 'vimtutor'

Personally I took in more when I read read the reference manual [sourceforge.net] rather than the tutorial. http://vimdoc.sourceforge.net/ [sourceforge.net] has the manual in PDF form, as well as a Vim book, FAQ and other guides.

As for your cursor keys question, I guess it's due to tradition. You can use the 'map' command to change what the jkl and ; do.

Re:Please help me with vim (1)

thanners (1003750) | more than 7 years ago | (#16136569)

HJLK vs JKL;

Well, at first I thought this was a bit strange, too, but I've become reasonably comfortable with it now.

I find that more often than not, when I do need to move around in a file, more often than not I'm moving down, so having my index-finger poised over that key seems fairly sane. Probably next most common movement is up the text file again, so between my index and middle fingers, I've got the primary movements covered fairly easily. :P Further, I'm somewhat uncoordinated with the pinky-fingers on both hands, so it actually feels more convenient for me to reach across to H with my index finger to move left than if I had to use my pinky finger to hit semi-colon to move right.

Re:Please help me with vim (1)

glarbl_blarbl (810253) | more than 7 years ago | (#16136613)

Personally, I like to use the cursor keys... I don't have any terminals which don't have them, and the recent versions of vim recognize them just fine... Of course, I'm not a coder - so the quarter-second it takes to move my hand over doesn't actually add up to much. Also pgdn/pgup and home/end are very handy (pardon the pun).

Re:Please help me with vim (0)

Anonymous Coward | more than 7 years ago | (#16136639)

yopu are le stupax

Re:Please help me with vim (1)

eMbry00s (952989) | more than 7 years ago | (#16136677)

I like your bindings. Personally, I prefer:
:imap lkjh <esc>h
Otherwise, buying a laptop-size keyboard will make your dreams come true unless you use the numpad keys a lot. Makes Enter/CR/Newline and all other keys a lot easier to reach, but might make it a little harder to do CTRL-X combos.

Don't... (1)

MosesJones (55544) | more than 7 years ago | (#16136683)


I was asked this the other day. Use an IDE, it is easier than using vim, why cause yourself pain?

Learn vi if you want to do large scale file manipulation, searching etc. But really don't bother if all you want to do is Java and Latex.

Now if you used troff... then you should do it in vi, troff demands that you have nothing to help you and create completely incomprehensible documents to all concerned. Also if you are doing Unix admin then learn vi.

Vi and Emacs are superb, in the same way as the Mustang from bullet is superb, that doesn't meane everyone should use them.

nvi undo? (0)

Anonymous Coward | more than 7 years ago | (#16136417)

Does anyone know if this version allows you to configure it so that you can undo/redo like FreeBSD's vi (nvi)? With the previous versions, I've tried many times to no avail (including macro hacks).

Re:nvi undo? (1)

truedfx (802492) | more than 7 years ago | (#16136475)

If you mean what I think you mean, you can get that by setting u in your cpoptions setting.

Cream For VIM (1, Interesting)

Anonymous Coward | more than 7 years ago | (#16136418)

I recently tried Cream For VIM see - http://sourceforge.net/projects/cream [sourceforge.net]
It is an open source GPL best of add-on's released already built onto VIM. Makes VIM more CUA like, includes versions for MS Windows and many linuxes. I can recommend, and would like to hear others opinions

Emacs (5, Interesting)

arun_s (877518) | more than 7 years ago | (#16136436)

I used to use Vim extensively, but have now switched to Emacs for the sheer joy of learning something new and interesting. Not trying to flame here, but this is one of the strongest quotes I've read on Emacs (Stepehenson, of course):
I use emacs, which might be thought of as a thermonuclear word processor. It was created by Richard Stallman; enough said. It is written in Lisp, which is the only computer language that is beautiful. It is colossal, and yet it only edits straight ASCII text files, which is to say, no fonts, no boldface, no underlining. In other words, the engineer-hours that, in the case of Microsoft Word, were devoted to features like mail merge, and the ability to embed feature-length motion pictures in corporate memoranda, were, in the case of emacs, focused with maniacal intensity on the deceptively simple-seeming problem of editing text. If you are a professional writer--i.e., if someone else is getting paid to worry about how your words are formatted and printed--emacs outshines all other editing software in approximately the same way that the noonday sun does the stars. It is not just bigger and brighter; it simply makes everything else vanish.

But vim is pretty cool too (I have windows ports for both the editors so I can use both in office). Arguing over which is better is a waste of time IMO, both do their job fantastically well.

Re:Emacs (1)

bateleur (814657) | more than 7 years ago | (#16136488)

The issue which really puzzles me about vim and emacs is not people preferring one or the other it's experienced programmers who use neither. That's like trying to program without caffeine!

Re:Emacs (1)

Scarblac (122480) | more than 7 years ago | (#16136585)

I agree.

Although it looks like the IDEs are getting features that the great text editors won't get any time soon; I was particularly impressed when I saw the Java refactoring things in Eclipse. Just select a few lines with a loop or so, right-click 'Extract method', name it and the rest is automatic. Emacs and vi won't get that sort of language integration ever, I think.

But since that won't work well for more dynamic languages anyway, and the current job is Perl... yay for Emacs :-)

Re:Emacs (1)

bateleur (814657) | more than 7 years ago | (#16136609)

Emacs and vi won't get that sort of language integration ever, I think.

Can't speak for vim, but there is at least one Java refactoring tool [xref-tech.com] for emacs.

Not too surprising if you think about it. The whole point of emacs is that it's extensible. If there's something you want - write it!

Re:Emacs (3, Interesting)

cortana (588495) | more than 7 years ago | (#16136506)

On the other hand, arguing is fun and a good way to learn about the editor you don't use because you're not familiar with it. :)

Re:Emacs (1)

swordgeek (112599) | more than 7 years ago | (#16136580)

I did some coding work for a year. Forced myself to use emacs for all of it, and came to appreciate the power and customisability of it. However, most of that power is only evident if you're doing something like programming or maybe writing a book.

vi has always been a fairly lightweight editor. It functions on a minimal system, and is ubiquitous. Also, it's not written by RMS. These are all good features. :-)

Two editors have two different niches. As you say, they both do their respective jobs fantastically well.

vim and emacs are on the same level (-1)

Anonymous Coward | more than 7 years ago | (#16136437)

Vim seems to be as bloated as emacs, these days. A truckload of "features" that I'll never use.

I think I'll stick to nvi, thanks.

Bill Joy (5, Informative)

Brainix (748988) | more than 7 years ago | (#16136450)

For the younger ones in the audience, Vim is a superset of vi [wikipedia.org] , which was originally written by Bill Joy [wikipedia.org] .

Yes, the same Bill Joy who heavily contributed to BSD [wikipedia.org] , TCP/IP [wikipedia.org] , NFS [wikipedia.org] , and csh [wikipedia.org] .

Yet I still count vi as one of his top contributions. :-)

Re:Bill Joy (1)

Sqwubbsy (723014) | more than 7 years ago | (#16136466)

Yet I still count vi as one of his top contributions. :-)

I'm sure Bill is glad for your support.

Re:Bill Joy (3, Informative)

MickDownUnder (627418) | more than 7 years ago | (#16136536)

You might also have mentioned he's the same Bill Joy who was chief architect at Sun through it's hay days.

New features (4, Funny)

dp_wiz (954921) | more than 7 years ago | (#16136473)

How do i enable that clippy?

"later" command ... (5, Funny)

martinmarv (920771) | more than 7 years ago | (#16136476)

From the Article:
I realise that I have made a mistake. I can easily take the document to a point 10 minutes back by using the command :
:earlier 10m

Or for that matter, move to a point 5 seconds ahead by using the command:
:later 5s


... So I don't need to actually do the work any more? I can just start a new file "Project Plan", enter the command ":later 7200s" then print it out?

Re:"later" command ... (1)

hero_or_what (245446) | more than 7 years ago | (#16136519)

Caution - Offtopic.

Reminds me of the a Calvin & Hobbes [ucomics.com] classic where "6.30 Calvin" has to do his homework and "invents" (a.k.a turns the duplicator box topside up), and travels to the future to meet the "8.30 Calvin" and pick up his homework. However, both the Calvins find out that its too late and "8.30 Calvin" has to go to bed. So, they decide to go back to 7.30 and get "7.30 Calvin" to write the story.

The genius of Bill Waterson but not related to Bram in anyway.

Re:"later" command ... (2, Funny)

Anonymous Coward | more than 7 years ago | (#16136587)

Thats actually pretty cool. Funny thing happened though.

I cranked up my emacs to see if it had that-

M-x earlier 10y

And I got vi.

After searching the internet on how to do fucking anything in vi (I forgot the :) (thats not a smiley, its a colon), I did a :later 10y

And I'm back again. Whew. So yah, later works too.

Re:"later" command ... (2, Funny)

ajs318 (655362) | more than 7 years ago | (#16136640)

You've been down to the lower (higher?) levels on Nethack, haven't you?

When Pressed For Time... use VIM (5, Funny)

chub_mackerel (911522) | more than 7 years ago | (#16136480)

FTFA:

I can easily take the document to a point 10 minutes back by using the command :
:earlier 10m
Or for that matter, move to a point 5 seconds ahead by using the command:
:later 5s

AWESOME! Need to finish writing a paper? Normally take about 2 hours? Just type in

:later 2h

No muss, no fuss.

Old dog... (0)

Anonymous Coward | more than 7 years ago | (#16136498)

I use VIM every day and never use any of it's advanced features, I use the same basic VI features I learnt many years ago. Vim's syntax highlighting amd peren matching are cool, but these are on by default. The most advanced I get is trying to make tabs display and save as 2 spaces, why anybody using an 80x24 terminal wants 4 space indents is a total mystery to me. Then there's that recording (q) thing I slip into about 5-6 times a day, is this macro recording or something and can I disable it or remap the keys?

Default mode (0, Flamebait)

jez9999 (618189) | more than 7 years ago | (#16136503)

Does Vim still default to starting in command mode? I suppose it does. For me, this is the biggest damn problem with it. It's a text editor, it should start in insert mode like every other editor. Pressing some key to start typing is bloody annoying, then pressing Esc to insert commands is also annoying. Ctrl-sequences are much better, and the default insert mode means I can do simple text editing and slowly learn other commands of the editor. To be honest, I also find Vim's shortcuts extremely unintuative. Want to go to the end of the document? 99% of editors, Ctrl-end. Vim, G. Sorry, that's retarded. Maybe it's based in the days of legacy terminals that didn't have arrow keys or even control sequences, but we're not in those days anymore; it's the text editor equivalent of still using a green-on-black text-only monitor.

Re:Default mode (2, Informative)

loxosceles (580563) | more than 7 years ago | (#16136534)

You can add "startinsert" to your .vimrc

I find ctrl sequences to be a total pain. Most of the time, I want to use several commands in a row. Rather than hit ctrl+ each time, I only have to hit escape once (all sane vim users remap capslock to escape), then the commands, then i to start inserting text again.

I just deleted my .vimrc to make sure, and ctrl-end and ctrl-home work for me. Although G and gg tend to be faster, because home and end require significant hand repositioning.

Any other complaints?

Re:Default mode (3, Informative)

swordgeek (112599) | more than 7 years ago | (#16136567)

Sucks to be you.

I work on dozens of modern, high-end systems that don't have arrow keys. In fact, the only access to many of them is through an amber-on-black text-only monitor (hey, we've evolved from green on black! :-).

If you don't like vim, fine--there are those other 99% of editors that you can choose from. However, that's not a valid reason to change it from what it was designed for (or at least what vi was designed for) and in the process piss off the people who use it the way it is.

In short, don't try to change MY editor to suit YOUR desires. -g may be an unintuitive way to get to the end, but you can do it without having to move away from the home-row on the keyboard, it works on all terminals, and 1-g to get to the top of the file or 341-g to get to the line that some config file parser told you was the source of your error is a lot more consistent and efficient than having different keystrokes for each function, and having to scroll to a specific arbitrary line.

It's not a friendly editor. It's an efficient and universal editor.

Re:Default mode (1)

StonePiano (871363) | more than 7 years ago | (#16136584)

Does Vim still default to starting in command mode? I suppose it does. For me, this is the biggest damn problem with it. It's a text editor, it should start in insert mode like every other editor...

To be honest, I also find Vim's shortcuts extremely unintuative.


Ahh, it's so cute to hear such fussing.
vi is not intuitive at all. It is learned. But when you really think about it, isn't all intuition learned?

vi is unique, and therefore intuition learned in other environments is unlikely to help here. There are some notable exceptions to this, like regular expressions. If you've learned regexes elsewhere, that will help you in vi.

However, vi is not trying to be like other editors. It's successfully being many things, powerful, versitile, efficient, but it is not trying to follow the crowd.

99% of editors, Ctrl-end. Vim, G. Sorry, that's retarded.

No, that's learned.

Re:Default mode (2, Insightful)

Waffle Iron (339739) | more than 7 years ago | (#16136621)

Want to go to the end of the document? 99% of editors, Ctrl-end. Vim, G.

In vim, Ctl+End does go to the end of the document. All of the other arrow key motions work like you would expect as well.

Does Vim still default to starting in command mode?

It starts in command mode probably because you almost always need to move the cursor before you resume editing a file. Command mode gives you dozens of powerful commands to navigate to where you need to go in a couple of keystrokes instead of just banging on the arrow and Pgup/Pgdn keys like a monkey with RSI.

Re:Default mode (5, Informative)

TheBogBrushZone (975846) | more than 7 years ago | (#16136676)

Does Vim still default to starting in command mode? I suppose it does (...) It's a text editor, it should start in insert mode like every other editor.

It has something called 'Easy mode' for those who dislike the mode distinction or just want to use a dubmed-down editor interface. And why should starting in insert mode be the 'right' thing to do just because other editors do it? 99% of the time when I first open a text file I don't want to start inserting text. I want to navigate somewhere, usually by searching for a string or a line number.

Pressing some key to start typing is bloody annoying, then pressing Esc to insert commands is also annoying.

You seem to be very easily annoyed. Use vi or ViM for a while and the dual mode system becomes second nature and you miss it in other applications.

Ctrl-sequences are much better, and the default insert mode means I can do simple text editing and slowly learn other commands of the editor.

I don't see any major disadvantage here. You can do the same with ViM. All you need to start with are 'i', 'ESC' and 'ZZ'. The cursor keys and most of the navigation keys work in the same way as other editors until you learn to use the more advanced navigation available.

To be honest, I also find Vim's shortcuts extremely unintuative. Want to go to the end of the document? 99% of editors, Ctrl-end. Vim, G. Sorry, that's retarded.

Did you actually try doing that in ViM? CTRL-END works just the same as G. Has done for a long time. And why should using one arbitary key combination be more 'retarded' than another? CTRL-END could just as correctly be used to terminate the application or insert the letters 'E', 'N' and 'D'. You are entitled to your opinion but it's just arrogance to assume your interpretation is the only valid one.

Maybe it's based in the days of legacy terminals that didn't have arrow keys or even control sequences, but we're not in those days anymore; it's the text editor equivalent of still using a green-on-black text-only monitor.

It's called Vi iMproved. It takes the features that people found useful with vi (and its predecessors) with newer features added (not that the Control key you seem to have an obsession with is exactly a cutting-edge invention). Most developers I know, myself included, prefer ViM because it contains a wealth of practical features and a fast, efficient user interface for those with the patience to learn a little and get past the preoccupation with Microsoft-prescribed keyboard shortcuts.

Vim schwim - give me Notepad2 or give me death. (0)

melted (227442) | more than 7 years ago | (#16136509)

Is there at least one editor in Linux that closely mimicks the feature set (and hotkeys) of Notepad2 (http://www.flos-freeware.ch/notepad2.html), but in console mode? That's all I ever use on Windows these days. I know there's SciTe, but I want the same thing _in console_

Re:Vim schwim - give me Notepad2 or give me death. (1)

edxwelch (600979) | more than 7 years ago | (#16136558)

Does it mimic the non-recognition of Linux style linefeeds too? That would be very handy on a Linux box.

Prime Difference between Linux and Windows Users (4, Funny)

MickDownUnder (627418) | more than 7 years ago | (#16136510)

Windows Users DON'T get excited about text editors !

Re:Prime Difference between Linux and Windows User (1)

MickDownUnder (627418) | more than 7 years ago | (#16136517)

But I hear Vista has a new updated version of notepad..... woa... can't wait to get my hands on that baby !!

Re:Prime Difference between Linux and Windows User (4, Funny)

rucs_hack (784150) | more than 7 years ago | (#16136632)

'it looks like you're writing a c++ file!'

Noooooooooooooo......

Re:Prime Difference between Linux and Windows User (1)

tehshen (794722) | more than 7 years ago | (#16136661)

You say that, but one of the great features for some editor (I can't remember its name, it was for Windows though) was that when you began a file with
#include
It would automatically throw you into C syntax highlighting. Or
/usr/bin/perl
would chuck you into perl syntax highlighting mode. It was surprisingly helpful.

Re:Prime Difference between Linux and Windows User (1)

include($dysmas) (729935) | more than 7 years ago | (#16136544)

thats because windows users cant read. (joking)

Re:Prime Difference between Linux and Windows User (0)

Anonymous Coward | more than 7 years ago | (#16136548)

Actually windows users are far more advanced using things like ultraedit. Vi lol.

Re:Prime Difference between Linux and Windows User (0)

Anonymous Coward | more than 7 years ago | (#16136688)

Was that supposed to be a joke?

The screenshots page shows a GUI around xmllint...


xmllint --version
xmllint: using libxml version 20626
      compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debug


Nothing wrong with ultraedit using libxml2 and friends, it's more sensible than writing their own libs. The thing is, perhaps unix people can already do everything that Ultraedit makes availiable to Windows users from the command line? Just a thought.

Increasingly unfortunate name (4, Interesting)

swordgeek (112599) | more than 7 years ago | (#16136549)

While I have no doubt that vim is a powerful and useful editor, it's increasingly large laundry-list of features is dragging it increasingly farther away from both the functionality and the philosophy behind vi. Keep in mind that vi is a visual superset of ex. As such, it was designed as a visual text editor that works on any cursor-addressable terminal. All functions are accessible from the home-row of keys, with the exception of the esc key. Editing features use regular expressions. In short, it's the ideal editor for the touch-typing administrator who can count on it working under fairly rough circumstances.

As a sysadmin, I have to ask how features like pop-up spellcheck and "omini" completion will help me edit config files on a vt102 terminal, (OK, my hard terminal is actually a vt520). vim is basically becoming a graphically-dependent editor that happens to use a similar editing structure to vi. Yes, I know about vi compatability mode, but that just throws out most of the last 'n' years of development.

My point? Not that development should be stopped, or that these goll-durned newfangled features ain't right, but that I wish it wasn't always trumpeted as "vi--but better." Most of the 'better' part of is are things that point away from vi.

Re:Increasingly unfortunate name (1)

bobintetley (643462) | more than 7 years ago | (#16136671)

As a sysadmin, I have to ask how features like pop-up spellcheck and "omini" completion will help me edit config files on a vt102 terminal, (OK, my hard terminal is actually a vt520). vim is basically becoming a graphically-dependent editor that happens to use a similar editing structure to vi. Yes, I know about vi compatability mode, but that just throws out most of the last 'n' years of development.

Those features are aimed at people using vim as a programming editor (although I use it for emails via mutt as well along with just about everything). Also, the article showed gvim, rather than plain vim (which is entirely curses based with the exact same featureset).

It sounds to me like vim is overkill for what you're doing anyway (way too bloated and packed with unnecessary features for config file editing) - why not stick to a pure vi, like nvi [bostic.com] ?

My point? Not that development should be stopped, or that these goll-durned newfangled features ain't right, but that I wish it wasn't always trumpeted as "vi--but better." Most of the 'better' part of is are things that point away from vi.

From a my standpoint as a developer, it is vi -- but better. From a sysadmin standpoint, it's vi -- but more bloaty with useless stuff. I stick to nvi for servers since vim is just an unnecessary overhead. For day to day work though, I couldn't live without vim.

Better XML support? (1)

wfberg (24378) | more than 7 years ago | (#16136570)

One thing that could sell some of my co-workers on vim would be if it had better XML features. Nothing too fancy but at least prettyprinting and a wellformedness check. Add a few GUI things to make life easier for people using search+replace and it could well become the preferred editor (people are now making do with editpad, notepad2, xmlspy home edition, etc.)

Fancy stuff I would like; smartly(!) adding closing tags (i.e. only if needed to make the document wellformed, skip adding a closing tag if there's one allready there), checking against DTD/schema, font size zooming using ctrl+/- and ctrl+scrollmousebutton, and of course, using XPATHs instead of/alongside regular expressions for search and replace..

The XPATH search is why I keep hold of an old version of xmlspy professional that the company doesn't get new licenses for (suck it, new guy!).

Now, I'm sure much, if not all of this, can be added through plugins (anyone got a list? my current xml plugin doesn't do too well at adding closing tags only when needed, and doesn't pretty print) but for my coworkers it has to be an out-of-the-box setup.exe experience..

The earlier/later thing would be a boon to a journalist friend of mine - then again, proper autosave in microsoft word would be, too. (He has a knack for shutting down and answering 'yes' to any 'are you really sure you want to throw away a day's work?' dialogues..)

Re:Better XML support? (2, Interesting)

cortana (588495) | more than 7 years ago | (#16136594)

One thing that could sell some of my co-workers on vim would be if it had better XML features. Nothing too fancy but at least prettyprinting and a wellformedness check.

:%!xmllint --format
:%!xmlwf

Add a few GUI things to make life easier for people using search+replace and it could well become the preferred editor (people are now making do with editpad, notepad2, xmlspy home edition, etc.)

Point those people at gvim (or, if they don't want a modal editor, evim).

The rest of your suggestions are more advanced and I think they fall outside of the scope of a general text editor. I'd try Emacs; it has a lot of features for understanding the semantics of an edited document and can probably do all that you describe.

Re:Better XML support? (0)

Anonymous Coward | more than 7 years ago | (#16136650)

What vim needs is a module that automatically detects XML formatting. It would pop up a little animated mascot that says: It looks like you're trying to use XML to solve a problem. May I suggest you try a different approach?

Anybody who has used any OS? (1)

zaydana (729943) | more than 7 years ago | (#16136573)

Anybody who has used Linux or any other OS would be aware of the very powerful and feature rich text editor Vi

Sorry to be a smartass, but i'm pretty sure most windows users would not have the foggiest clue what the "powerful and feature rich text editor Vi" is :-) For all they care, somebody probably mispelled some useful word like "vice" or "vine". The only people that weren't included in the summary as being aware of Vi are people that havn't used computers, or people that have used a computer without using the OS.

/me goes off to ask his high school aged sister about the great features of Vi

Vim is great, but.. (1)

rucs_hack (784150) | more than 7 years ago | (#16136616)

Man do I get sick of trying to close documents in other applications with :wq

I even tried to close firefox with that a few weeks back.

For me though, programming without vim would be horrific. I've used Vim for so many years that I probably couldn't use another editor.

I tried Kedit, because some of my students were using it and I thought I should have a go, but I found it too krufty.

Since 90% of my programming is console based (the other 10% being shitty text only websites created in Vim, and slightly more funky opengl, written with guess what..), I use the console mode vim a lot. Although I am partial to gvim when a gui presents itself.

I get embaressingly lost in guis though, usually when someone is asking me to help them with something. I'm pretty much used to bash only.

One day I may try Emacs, but once you get used to the minimalist aproach, the bloat of emacs doesn't appeal.

Re:Vim is great, but.. (1)

teslar (706653) | more than 7 years ago | (#16136651)

I tried Kedit, because some of my students were using it and I thought I should have a go, but I found it too krufty.
Try Kate instead, if you want to. Although there'd be little point to change editors in your case anyway - never change a winning team...

Try :x (0)

Anonymous Coward | more than 7 years ago | (#16136668)

:x
is equivalent to :wq
and becomes an automatic response.

Forget VIM (0)

Anonymous Coward | more than 7 years ago | (#16136634)

nvi forever.

VIM has strayed too far from what is vi. You might as well use Emacs or Visual Studio. For those of us who prefer vi, nvi is the one.

Re:Forget VIM (1)

truedfx (802492) | more than 7 years ago | (#16136679)

nvi seems to no longer be developed, unfortunately. If it does what you want, though, great.

Vim is good (3, Interesting)

jandersen (462034) | more than 7 years ago | (#16136648)

But it is also becoming what vi was never really intended to be IMO. What makes vi such a great editor is a number of factors, such as:

- it is small
- it does a lot of things that are useful for editing source files
- it is very economical with bandwidth etc
- all commands map to keys that are found on all terminal keyboards

If I should say anything against vim it would be that it can do too many things that are only eye candy or 'cool features'. Fortunately you can turn them off, which I always do. If you develop on several different UNIXes (and other OSes with UNIX like environments) getting used to all the extra features in vim can be a real pain, when you have to work with the classic form of vi.

Burn him! (5, Funny)

kahei (466208) | more than 7 years ago | (#16136657)


Recently, Richard Stallman gave a speech in which he illustrated an academic point about programming history by quoting a guy who described vi as 'an editor spread at sword-point and which is really hard to use'.

I think I speak for all moderate vi(m) users when I say -- DEATH and DAMNATION (in that order) to this Cardinal of the CTRL key! Needless to say my own local vim user group has dispatched assassins to kill Mr. Stallman, but this is hardly the end of the story. The fact is that a man has referred to another man who in turn expressed some often-voiced reservations about OUR EDITOR! On behalf of all editors of text everywhere, I implore EMACS users to return to the true path, lest you be burned at the stake and then go to hell, the Buffer From Which There Is No Unloading. We'll see how productive you are then, with your ctrl-meta-alt and your ELISP and your 'ring buffer', whatever THAT is.

Peace and love to all.
^C
^X
quit
q
QUIT
exit :exit
zz
ZZ

Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account

Loading...