Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Oooh. I'd love to hear those many more efficient options!


> I'd love to hear those many more efficient options!

This may come as a surprise, but modern programming editors don't require the operator to switch between three mutually exclusive modes -- insert, delete and navigate. That's because modern keyboards have keys dedicated to those purposes, which means the operator doesn't have to either wonder which mode he is in, or switch modes, which saves an enormous amount of time when programming.

The first step toward modern editing is use of the arrow keys for navigation. The next step is to realize, if the arrow keys can reposition the cursor without using letter keys, then maybe there's no reason to have to switch modes.

Vim's focus on keyboards that no longer exist, and on displays that no longer exist (including the paper terminal I used with vi while working for NASA forty years ago), requires an incredible number of unnecessary keystrokes, as exemplified in this typical conversation:

http://stackoverflow.com/questions/1379198/in-vim-how-do-i-d...

Notice that no one says "have you considered solving the problem by changing editors?"


> This may come as a surprise, but modern programming editors don't require the operator to switch between three mutually exclusive modes -- insert, delete and navigate. That's because modern keyboards have keys dedicated to those purposes, which means the operator doesn't have to either wonder which mode he is in, or switch modes, which saves an enormous amount of time when programming.

You speak as if modal editing came first and universally agreed upon better things evolved afterwards. I know this isn't true. I know you know this isn't true. You're being highly disingenuous.

Your link is equally disingenuous since you either don't understand that the operation involved there is not one you can do in-stride or with as few keys in any other "modern" editor, or if I give you slightly more credit but presume malice then you're being willfully misleading again.


> You speak as if modal editing came first and universally agreed upon better things evolved afterwards.

That's exactly what happened, and think before objecting, because I was there. I used vi while working for NASA during the 1970s, when mode changes made sense (it saved paper on paper terminals). Since then, it has stopped making sense.

> I know this isn't true. I know you know this isn't true. You're being highly disingenuous.

When I wrote Apple Writer in the late 1970s, I suspected it would become popular because it eliminated the modes that plagued most contemporary editors including vi. I was right -- it did. Apple Writer became a best-seller because people hadn't yet realized that modes and mode switching were pointless burdens in a era of glass terminals and extended keyboards.

I can't believe there are people who haven't learned this elementary lesson now, over 30 years later.


> I can't believe there are people who haven't learned this elementary lesson now, over 30 years later

Why would you let something like this bother you? There are many popular text editors and IDEs in the world, and of all these myriad, there is only one popular editor that is modeful: vi. Why would you begrudge the people who prefer to do their editing modefully, a single editor that does things this way?

It's not like vi is going to corrupt the yout's of today, as the yout's are fully exposed to IDEs such as Eclipse, IDEA, Xcode, and Visual Studio, all of which are modeless, not to mention Word, Pages, Google Docs, etc.


Modal editing did come first, and universally agreed upon better things did evolve afterwards. I remember "modes are bad" being established UI-design wisdom as long ago as the mid-'80s, after the Macintosh came out and everyone started moving toward graphical interfaces. I'm surprised there is anything about this question which is seen as being open to debate here in 2013.


No. It didn't. The first editors were not modal.

And no, universally agreed upon better things did not evolve afterwards. I have no idea what the numbers are, but Vim is immensely popular amongst developers and I would highly suspect more popular amongst experienced developers than any editor whose name isn't emacs.

You are deluding yourself if you think that the modern world uses modal editors because their ancestors had keyboards that were too cramped.


> the operation involved there is not one you can do in-stride or with as few keys in any other "modern" editor

SublimeText2: Ctrl-Delete: deletes the rest of the current word.


That's not the operation from the question in the link (not that I'd be terribly surprised if Sublime Text had a way to do it anyways, but it's not as fluid as vim).


My bad.

To fix my blunder:

Delete rest of the current word (and go to insert mode when applicable)

Vim: ce -> ST2: Ctrl+Delete

Delete current word (and go to insert mode when applicable)

Vim: caw -> ST2: Ctrl+D, Delete


I use both vim (over ssh) and modern GUI programming editors on a regular basis with extremely large code bases. I am thoroughly familiar with the the various navigation shortcuts available to me and (at least for me) find that navigating and editing source code in vim is still faster by a large margin compared to modern editors that have the convenience of modeless editing.

That's not to say that modern editors don't have their advantages but I think it is a bit of a stretch to argue that modern editors are substantially better at editing text than vim.


> I think it is a bit of a stretch to argue that modern editors are substantially better at editing text than vim.

Yes, well put, except it's true -- modern editors are much more efficient at editing large code bases than vi/vim. None of them require a "cheat sheet" of keyboard arcana, for the simple reason that to use a modern editor, you don't have to cheat.

It gives one pause to consider that Pico, the tiny, throwaway command-line editor, is easier to use than vi. The proof? It has become the default choice when someone wants to save time.


I disagree that Pico is easy to use. The only way to move around within a line is to hit the arrow keys sixty times. By default, cut and paste works on whole lines only. If you want to cut just one word you have to figure out the commands for select mode.


> I disagree that Pico is easy to use.

I didn't say Pico was easy to use. I said it was easier to use than vi/vim.


I spent a good while reading your replys and one of the things you keep saying is cheat sheet. Now I dont use a cheat sheet because my fingers have become accustomed to the way vim works. The other thing you are saying a lot is that it takes time to switch modes. It does not. For most people you have to move your fingers off of the home key row to click delete or control so it is easier to just use the keys closer saving lots of time. The other thing you said is that modal editing has become obsolete which is simply not true because almost every IDE comes with a VI(M) mode and is not restricted to the non modal form. Also you say that hjkl are inefficient you have to move your entire hand to use the arrow keys but with hjkl you just have to keep it in the same place.


Then I shall be clearer and say that I disagree that vi/vim is harder to use than an editor that needs a command-line flag to enable search-and-replace and doesn't do case-insensitive search at all.


But Vim's not just hjkl. And all those new keys don't exactly help me get stuff done faster.

Sure those F-keys can be useful. If I'd like to change the screen brightness or skip to next song. Pause/Home/Insert/Print... Half of the time they don't do anything the other half they don't do anything useful. And then there are a bunch of keys that toggle a light and change the behaviour of keys to annoy everyone. Because switching the num block from one duplicated set of functionalities to another greatly increases the available keys!

No wonder 'modern' editors use so many shortcuts. There are simply far more useful functions to perform than keys. Most newer editors go the emacs way and make you press a bunch of modifier keys. Vim makes you go through modes. I prefer to hit easy to reach keys multiple times, but to each his own.


Please see http://vimgolf.com/ and let me know if you still believe Vim requires and incredible number of unnecessary keystrokes. Some of the editing you can do with so little keystrokes is amazing!


> Please see http://vimgolf.com/ and let me know if you still believe Vim requires and incredible number of unnecessary keystrokes.

But that site's purpose is to show how clever people have become in fighting vim's innate inefficiencies. If someone posted to that forum using a modern editor, he would be thrown out for cheating, for suggesting that there's a better way.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: