In other words, it's vi with a few changes. I still can't navigate while typing, or delete while navigating, or search while deleting. As I tried to remember all those weird incantations that I last used in the mid 1970s, I felt as though I was in a time warp.
Guess why Apple Writer was so popular in 1979 (http://en.wikipedia.org/wiki/Apple_Writer), in spite of its many limitations? I wrote Apple Writer specifically to avoid the handicaps built into vi, which was the default editor in those times. After Apple Writer came out, people would write articles saying things like, "My God! With Apple Writer, you can read files, write files, type, navigate and search without having to change modes! How did Lutus do it?"
The answer is simple. Apple Writer wasn't so extraordinary, but I wasn't mentally crippled by the vi code base or method of operation, and I wasn't averse to exposing people to new ideas. But you know what? If I was told that people would still be using vi thirty-four years later, and boasting about its wonderfulness, I would have fallen down laughing.
Even pico and nano are easier to use, and they're desperately weak.
I shouldn't complain. Apple Writer made me a multimillionaire through the simple virtue of not being vi, and little else. I should thank you people.
No, to switch from entering text, to deleting text, to searching for text, to copying and pasting text, to saving a file, to loading a file, all require switching modes. Let's be honest.
> By making that compromise you make the system faster and more powerful ...
Having to enter additional keystrokes, a throwback to a computer keyboard that either didn't have control keys or couldn't exploit them, makes editing "faster and more powerful"? Nice reasoning.
You're calling vim commands "modes" to deliberately make it sound more complex than it is.
I want to change to next 3 words. I type 'c3w' - you're saying that's modal - which it sort of vaugly is. I could have done 'v3w' to highlight the next 3 words (something you would do in any other editor). Then I hit 's' to substitute them for something else. No mode involved (other than the selection - which is the same for any editor).
I stand by my assertions - it's up to you to provide the counter examples to back up your claims.
* I am moving the cursor, but I want to enter text. To do so, I need to enter colon, i, Enter, then my first text entry.
* I am entering text, but I want to move the cursor. To do so, I need to type Esc, Esc, then commence moving the cursor.
* If while entering text, I want to do something besides move the cursor, I need to type Esc, colon, then a command letter, then its arguments.
I don't need to "make it sound more complicated than it is." It is in fact more complicated -- more complicated than Apple Writer, now justly consigned to a museum, and more complicated than any modern editor.
> I type 'c3w' - you're saying that's modal - which it sort of vaugly is.
This is getting comical.
> I could have done 'v3w' to highlight the next 3 words (something you would do in any other editor).
No, in any other modern editor, I wold pass the mouse cursor across the desired characters, thus selecting them (any subset of characters or words or paragraphs, and very, very fast). There's a reason the mouse was invented, and it wasn't because it's a cute but insubstantial gimmick meant to pander to the tastes of ignorant, unsophisticated computer users.
In Android, I would swipe my finger across the desired text. No mouse needed.
> I stand by my assertions ...
Try moving beyond assertions -- try locating some evidence, as I have just done. Pretend to be a scientist.
> it's up to you to provide the counter examples to back up your claims.
As I have been doing since this thread started? Read my posts.
> * I am moving the cursor, but I want to enter text. To do so, I need to enter colon, i, Enter, then my first text entry.
That's incorrect. You can just press 'i' to enter insert mode in place. Or upper case 'I' to have Vim enter insert mode at the end of a line. Or upper case O for insert mode at the beginning of freshly inserted line below the current. Or 'a', 'A', 'c', 'C' and many other's for other kinds of movement/change+enter insert mode combos.
> * I am entering text, but I want to move the cursor. To do so, I need to type Esc, Esc, then commence moving the cursor.
No, the arrows work (should work, may be a problem on some terminals/terminal emulators, but that's common for console editors) in insert mode. No need for <esc> (and it's single <esc>, not double, anyway) if you want to move by a few characters. Ctrl+<arrow> works in insert mode, too, so you can move by words. You lose prefixes and other kinds of movements though.
> * If while entering text, I want to do something besides move the cursor, I need to type Esc, colon, then a command letter, then its arguments.
That's only true if the command is not bound to a sequence of keystrokes. If it is, it's frequently as efficient to type as in modeless editors, for example going to a certain line in Vim is done with <esc><number>G, while in Emacs it's default binding is M-g g <number> <enter>. If the command is not bound, both <esc> : <command> <args> <enter> and M-x <command> <enter> <args> <enter> beat navigating through menus with mouse in terms of efficiency and that's what they are for, not for the commonly used commands which should be (nv)maped or global-bind-key'ed anyway.
> I don't need to "make it sound more complicated than it is."
Well, you do, as shown above.
> I wold pass the mouse cursor across the desired characters, thus selecting them (any subset of characters or words or paragraphs, and very, very fast)
Well... I would like to measure this somehow.
You assert that using a mouse for this is quicker, but present no evidence. I have no evidence for the contrary, so we can't really argue about this. I personally feel that reaching for the mouse and using it is slower than selecting text with keyboard and that the latter requires less manual precision, which matters to me. You can feel differently and I respect and accept it.
We - Vim users here - can probably show you shorter and more efficient counterpart to any example you'd come up with. That you don't know these more efficient ways is a valid criticism of Vim in itself - which is not a popular claim among Vim users, but I think so - but it's argument for Vim not being friendly to beginners, not for it being inefficient.
It's not common in modern times for any of this to be either necessary or justifiable. But now that we're no longer discussing how inefficient vim is, but discussing tricks meant to minimize its acknowledged inefficiency, I think we're done.
> > I wold pass the mouse cursor across the desired characters, thus selecting them (any subset of characters or words or paragraphs, and very, very fast)
> Well... I would like to measure this somehow.
You can measure it by noticing that most modern computers since 1980 have control keys, and mice, and nearly none of them have vi or vim installed. People have voted against terminal editors with their mice, and with an absolute minimum of keystrokes.
> We - Vim users here - can probably show you shorter and more efficient counterpart to any example you'd come up with.
This is the most astonishing conversation I've had in weeks. I can also show you more efficient ways to push a rock up a steep slope while wearing a hair shirt, but the risk is that some spoilsport may mention that the entire exercise is unnecessary.
I started out using vi. Then I wrote Apple Writer, which was more efficient by far. Then I dumped Apple Writer for a more efficient editor that supported a mouse. Then I dumped that editor for a better one, ad infinitum. Lazy? You bet -- I have better things to do with my time than remember vim's arcane ways to avoid the use of the keys that are on all modern keyboards, or the pointing devices that have become popular since 1970.
Any of which? Please, be more precise. You mean that it's not common for certain keys to be mixed up in console applications? Please...
> You can measure it by noticing that most modern computers since 1980 have
Oh well, you have a curious definition of measurement then.
> some spoilsport may mention that the entire exercise is unnecessary
You mean editing text is unnecessary? Or what exactly?
> I started out using vi.
I came to Vim after using Visual Studio, Komodo IDE and some others...
> Then I dumped Apple Writer for a more efficient editor that supported a mouse.
...then I dumped it in favor of Emacs, which supported much better scripting language.
> the pointing devices that have become popular since 1970
You still didn't provide any kind of evidence that editing with mouse is faster than using pure-keyboard interface. Or do you believe that it was text editing that drove mouse adoption? Are you completely sure that it was working with text that demanded mouse and made mouse popular? Is it that impossible to believe that once mouse became popular thanks to other kinds of programs the editors started to support it?
I'm glad you wrote your Apple Writer. I'm less amused by your mistaken beliefs you insist on advertising in every Vim related thread. You may be a reason I finally check out this script for not showing HN comments of specific people.
How about the direction of computer history? Vi was superseded by Apple Writer (and other editors, some of them better) that supported the existence of control characters, those editors were superseded by editors that supported mice, and those editors have in turn been improved on to the present day. Do you really think this was all homage to empty fashion, and that modern editors require more work than vi/vim?
Apart from that, it's been proven over and over again that pointing devices improve the efficiency of text editing, compared to an editor that only has control characters to guide the process, and much less so for editors like vi/vim that don't have the advantage of control characters.
Reference: http://www.asktog.com/TOI/toi06KeyboardVMouse1.html
Quote:
* Test subjects consistently report that keyboarding is faster than mousing.
* The stopwatch consistently proves mousing is faster than keyboarding.
End quote (BTW the above is a famous quote by a friend of mine from the early Apple days).
Remember that the above comparison, and all modern comparisons, only compare mouse-dominated use with keyboard-only use for keyboards having control characters -- none of them take on the added burden of vi/vim's modes, which result from the absence of control characters on early keyboards.
> I'm less amused by your mistaken beliefs ...
I just proved that my views aren't beliefs, they're backed up by research, and they are not mistaken. You are not arguing in good faith -- you have no evidence for your position, but you have strong feelings. Not a situation conducive to generating light, as opposed to heat.
"In the early (pre-release) days of Lisa, we had command keys instead of pull-down menus. One of the primary reasons we abandoned command keys was the difficulty of coming up with fixed definitions that could be easily transported from application to application. Users were constantly confused."
"It takes two seconds to decide upon which special-function key to press."
No, it doesn't. When my cursor is on a function name I want to change in vim, I type 'ciw' and then word is gone and I'm in insert mode replacing it. There's no 2 seconds about it.
Your research doesn't apply to this scenario and you know it. But it's fine - you do it your way, we'll do it ours. There's no problem with that.
> We’ve done a cool $50 million of R & D on the Apple Human Interface.
Relevant to anything? I'm supposed to feel intimidated by a heap of dollars, right?
Where are the exact experiments described and results presented? Where is the paper with all of these details? I searched the web, but I couldn't find it. Perhaps I need to pay some $.
There's a commentary on this piece by Jeff Atwood, which points out the fact that the article is seriously old and that understanding of the issue has changed in the meantime. I can't say for sure, but from what little info there is in the article it seems that way - I'm not going to argue that there are efficient mouse-centric interfaces being designed and used or that the mouse should never be used as an input device. What I'm saying is that there is a least one keyboard based interface for text editing which is more efficient than equivalent mouse based interfaces - for the most part. I admit that there may be some tasks easier to accomplish with mouse (although we didn't see them yet), but that doesn't invalidate my argument, especially because if they exist, then Vim allows for mouse usage to do them.
The AskTog article is linked to from a page on Plan9 editor, Acme - it's another piece which uses ancient version of vi for comparison. It's so frustrating to see people completely ignore all the development in the Vim interface because it's early versions were much worse. And they are prominent people in our industry, too. It's just sad.
I now have some idea about what makes editing efficient. I may even create the next AppleWriter, although I think Chris Granger already does a good enough job. Almost nothing lutusp said turned out to be true, but the thinking I put into this discussion let me realize some important things about editing. So, on the whole, I don't think I wasted this time.
However, any more than this I feel would be a waste.
You don't type ':i' to get to insert mode, you just hit 'i'. You don't hit Esc, Esc - it's just Esc (though lots of people remap it to 'jj').
Really these are the two modes I was referring to - you need to move between them, yes, but you'll always be in normal mode except for times you're inserting a bit of text. The way you describe using it is the mindset of everyone who first starts using vim and wants to stay in insert mode. I started that way - but it's not the way vim is used. It's the first thing beginners have to understand - normal mode is where you'll spend almost all of your time.
I don't understand what's comical about 'c3w' - "Change 3 Words". You know what's comical? Reaching for the mouse to highlight 3 words to change. Though, you can make that choice - vim supports the mouse too these days. I used it when I first started on vim - it was a bad idea as it's so much slower than using the commands.
Again, I stand by my assertions; Vim is faster and more powerful - other editors are easier to learn. You still haven't provided a shred of evidence to the contrary.
I think your condescending tone is really unhelpful. I've given you the time and respect you deserved to address each of your comments. It would be honourable of you to treat me in the same way.
I just crafted the above example using the current vim. No memory required. Vim still imitates vi, and vi still imitates 1970. Extremely inefficient, steep learning curve in order not to press readily available control keys.
> I don't understand what's comical about 'c3w' - "Change 3 Words".
First, if you happen to be entering text beforehand, the number of characters required to select three words isn't three, it's five. Second, it's comical in modern times because there are much easier ways to select an arbitrary number of words, readily available ways, ways that don't cost any more than vim does, ways that are available on the machines owned by vim's advocates -- excuse me, living advocates. Machines that have keyboards with control keys.
On a modern machine, if I want to select three words, or 2 1/2 words, or 3 1/2 paragraphs, I glide the mouse cursor across the desired text. And to do so, I don't have to enter a special mouse mode first.
This conversation is funny for the same reasons that a conversation about a horseless carriage is funny. No, there's no miniature horse hidden in there -- they did away with the horse entirely. I know it sounds fantastic.
Remember with no .vimrc vim defaults to vi emulation mode for historical reasons. ":set nocompatible" to fix that, compatible mode turns off a lot of the wonderful Vim features us Vimmers have come to love.
> * I am moving the cursor, but I want to enter text. To do so, I need to enter colon, i, Enter, then my first text entry.
... you can enter insert mode a variety of ways, i, I, o, O, a, A, etc -- each has a specific meaning.
> * I am entering text, but I want to move the cursor. To do so, I need to type Esc, Esc, then commence moving the cursor.
... you just hit escape to go back to normal mode, which generally pay dividends on that single keypress with an better group of movement keys (move by word, sentence, paragraph, tag, search, etc). Or just use the mouse (works perfectly well, doesn't even change the mode, set mouse=a)! If you are in insert mode, you remain in it, same for normal mode!
> * If while entering text, I want to do something besides move the cursor, I need to type Esc, colon, then a command letter, then its arguments.
... actually, vims insert mode has many features for editing without leaving it for convenience, C-W, C-U, C-J, C-M, C-N, C-P, C-R and a bunch more for deleting words, lines, interacting with registers, etc.
> No, in any other modern editor, I wold pass the mouse cursor across the desired characters
Sure, and you can do that in vim (console or gui, works in both with mouse=a), but some of us (myself included) consider this an inferior way to select 3 words via sloppy indirect abstracted pixel pointing. Not to mention pulling your hands off the keyboard... to the mouse, then back again re-seating to continue typing. Mice are for FPS games, not selecting text!
EDIT: Even if Vim someday dies (decades from now maybe), modes have spread, I use modes in Word, Outlook, Visual Studio, Xcode, Sublime, Eclipse, Firefox, Chrome even on my ZSH prompt. Once you get used to modes based editing, it is an amazing addition to any editor or GUI, and people keep creating plugins so Vim mode lives on! Editing text hasn't change radially, because text hasn't changed radically... the reason emacs and vim live on is because of fitness for the task at hand, editing text.
Thereby allowing vim to become almost as efficient as a modern editor, specifically by disabling those traits that make vim vim.
> Once you get used to modes based editing, it is an amazing addition to any editor or GUI ...
That would be why why modern editor designers make sure to include a modes mode, to appeal to time travelers visiting from earlier times. Yes, I'm kidding -- no one wants an interface that requires any more than the absolute minimum of either keystrokes or arcana unique to one editor.
> ... the reason emacs and vim live on is because of fitness for the task at hand, editing text.
As to the thread's topic, this is false. Vi and vim aren't as efficient as a modern editor, which is why most current computer programming activity uses tools designed with a modern computer -- and a modern computer user -- in mind.
I could easily write an editor much more efficient than vi/vim -- I know this because I did, and it became very popular -- and its advantages would become obvious to all but True Believers.
As soon as someone invented the control key and its purpose, and well before Douglas Engelbart invented the mouse, the retirement clock started ticking for vi and vim. It's still ticking, but it seems not everyone can hear it.
Please define a mode and define mode switching. It's obvious we use different definitions for those and so we can't have meaningful discussion.
If I'm entering text, I cannot move the cursor. Mode one.
If I'm moving the cursor, I cannot enter text. Mode two.
If I'm using a modern editor, these modes are not present -- if I want to move the cursor, I press the appropriate keyboard keys. Instead of pressing a letter key to insert a letter, I press the up-arrow key to move the editing cursor, without any preliminary mode-switching keys. This means an absolute minimum of keystrokes, and because there are no modes, the letter keys always insert letters, and the arrow keys always move the cursor.
All before beginning to discuss the mouse or other pointing devices, methods that have existed since 1963 and have been in wide use since 1980.
Any questions?
The reason I ask is because in vim, I can move the cursor with my arrow keys when I'm in insert mode, and if I wanted to, I can select blocks of text with my mouse, without pressing any key to change mode.
In addition to those features I can move about more efficiently without moving my hands from the keyboard, by changing mode. I touch-type, and I write for a living, so this is quite important to me, but assuming the features you mention are the most important ones to you and that you don't want to change modes, you can still do the things you say you can't. Well, I can. Not sure if you can, but I'm fairly sure it's not due to any limitation of vim. I'm curious how you appear to be mistaken in some very basic facts.
Guess why so many people still use Vi(m) and not Apple Writer.