A Visual Walkthrough of New Features in Vim 7.0
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.'"
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.
http://rareformnewmedia.com/
3 .. 2 ... 1
Flameware commence :
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...
Ubuntu is an African word meaning 'I can't configure Debian'
I recently tried Cream For VIM see - http://sourceforge.net/projects/cream
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
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...
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.
I can explain it for you, but I can't understand it for you.
EMACS ? you mean Escape Meta Alt Control Shift ??
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.
I believe posters are recognized by their sig. So I made one.
For the younger ones in the audience, Vim is a superset of vi, which was originally written by Bill Joy.
:-)
Yes, the same Bill Joy who heavily contributed to BSD, TCP/IP, NFS, and csh.
Yet I still count vi as one of his top contributions.
Raj Against the Machine! http://social-butterfly.appspot.com/
I can see myself using the tab and undo features, but the spillchucker adn autocomplete seme useliss 2 me.
How do i enable that clippy?
If you mean what I think you mean, you can get that by setting u in your cpoptions setting.
From the Article: :
:earlier 10m
: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?
I realise that I have made a mistake. I can easily take the document to a point 10 minutes back by using the command
Or for that matter, move to a point 5 seconds ahead by using the command:
Umulated is when you emulate an umlaut on an pure ASCII system by replacing ü with ue. Or ö with oe.
// can someone else think of some examples that don't make German's spit their coffee?
#ifndef READER_IS_GERMAN
An example
E.g. Göring -> Goering, or Führer to Fuehrer.
#else
#endif
echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
FTFA:
AWESOME! Need to finish writing a paper? Normally take about 2 hours? Just type in
:later 2h
No muss, no fuss.
It is also charity ware. The website asks for donations to a charity that helps children in Uganda.
Think of the Children; Sleep with your Sister
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.
Windows Users DON'T get excited about text editors !
But I hear Vista has a new updated version of notepad..... woa... can't wait to get my hands on that baby !!
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 :-)
I believe posters are recognized by their sig. So I made one.
You can add "startinsert" to your .vimrc
.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.
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
Any other complaints?
thats because windows users cant read. (joking)
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.
"People who do stupid things with hazardous materials often die." -- Jim Davidson on alt.folklore.urban
Does it mimic the non-recognition of Linux style linefeeds too? That would be very handy on a Linux box.
Vim is nothing compared to Ed, the greatest WYGIWYG editor of all.
http://www.gnu.org/fun/jokes/ed.msg.html
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.
"People who do stupid things with hazardous materials often die." -- Jim Davidson on alt.folklore.urban
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..)
SCO employee? Check out the bounty
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
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.
No, he means Eight Megabytes And Constantly Swapping.
(And I even remember the days when that was a lot).
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.
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.
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.
Spineal Tap (The umlaut goes over the n).
"I think it would be a good idea!"
Gandhi, about Internet Security
'it looks like you're writing a c++ file!'
Noooooooooooooo......
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.
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
zz
ZZ
Whence? Hence. Whither? Thither.
Guy asked me for a quarter for a cup of coffee. So I bit him.
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.
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.
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.
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.
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.
And behold, a command prompt and he who sat upon it, his name was shutdown and -h 3:11 followed with him
nvi seems to no longer be developed, unfortunately. If it does what you want, though, great.
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.
An Eye for an Eye will make the whole world blind - Gandhi
urpmq -i vim-enhanced
Name | vim-enhanced
Version | 6.3
Release | 21mdk
Group | Editors
Size | 1239458
Packager | Olivier Thauvin [nanardon at mandriva.org]
Summary | A version of the VIM editor which includes recent enhancements
Description | VIM (VIsual editor iMproved) is an updated and improved version of the vi editor. Vi was the first real screen-based editor for UNIX, and is still very popular. VIM improves on vi by adding new features: multiple windows, multi-level undo, block highlighting and more. The vim-enhanced package contains a version of VIM with extra, recently introduced features like Python and Perl interpreters.
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.
So sayeth URPMI of the vim-enhanced version which ships with Mandriva 2006.0; and yes, it does start in editing mode, not command mode
Got time? Spend some of it coding or testing
Isn't that way of interacting with a computer just a tiny bit anachronistic? I have been working with editors for editing code since 1980 and had been using lots of editors ... from ISPF and vi over (x)emacs to IDEs like VisualC++, Netbeans or Eclipse. :)
I wish that some of the more modern IDE plugins would suck less when it comes to syntax highlighting and automatic code formatting, but I do not see much place for dinosaurs like vi(m) in my daily routine any more.
I wonder why those who still use vi not also use Wordstar as their favorite word processor? Ctr-somethings wherever you look! Or do they?
vi lets you access all of its powerful functionality using only these natural keys for typing (well, plus ESC, which is another computer addition, but its only used to flip out of insert mode, when you're done a bunch of typing, typically). Being able to move to the top of the screen by typing capital-H is a lot faster than control-whatever/control-whatever, or taking your hand off the keyboard, reaching for your mouse, aiming, and clicking. (It still amazes me that this latter approach is the one that leads the way in modern word processors, due to its obvious, but inefficient, nature.)
This is why vi fans often joke as emacs standing for escape-meta-alt-control-shift; to a seasoned vi user, all the escapes in emacs are far more confusing than the biggest complaint about vi, it's two modes. (Reminds one of the joke about the newbie asking the TA for help; the TA says, "you do know vi has two modes, right?" The newbie replies, "yes, the one where it beeps, and the one where it doesn't.") But at the end of the day, the concept of two modes isn't rocket science to learn, and as far as all the key commands one has to learn, it's no different than emacs, where I found the key sequences far more confusing.
Love many, trust a few, do harm to none.
This is a sad recycled article which featured at linux.com today around 4 months back !!!! http://www.linux.com/article.pl?sid=06/05/01/22352 42/
Striving to be common...
But if you don't like it then quit yer bitching. Use something else...
"Ignorance more frequently begets confidence than does knowledge"
- Charles Darwin
Hey, wait! Don't just go to sleep without telling us what those bindings are!
I resemble that remark.
I have to disagree, I am a long-time Emacs user, but I cannot stand the graphical interface, it is ugly, the ugliest thing on my system.
I use Emacs without X inside Gnome-Terminal, almost the same X functionality is provided by the Gnome-Terminal menu and without the hideous looking window.
Gedit is beautiful, light and responsive, Emacs should look more like that.
My little Linux and tech blog
The quote at the bottom of the discussion page when I loaded was:
"When in doubt, parenthesize. At the very least it will let some poor schmuck bounce on the % key in vi. -- Larry Wall in the perl man page"
Seemed oddly relevant.
OH MY GOD, gvim takes up 13 precious megabytes, how will I cope. Of which only 3.8 MB is private dirty BTW. Such is the enormous price one has to pay for a decent UI and decent font rendering
By contrast vim alone takes up 8.5 MB. If you don't want it, don't install gvim... what's the point in moaning on Slashdot about it?
PS, I'd be interested to see how much memory GNU Emacs with GTK uses up Bear in mind that it still doesn't use Freetype to render the fonts, and so the memory apparantly eaten by GTK will be lower.
...pardon me while I look for my asbestos suit....
A goal is a dream with a deadline
I know the best way to learn to use Vim is to use it every day.
That's the only way. Getting to like vi (or vim) requires that you damage your brain, and a tool to do that is already to hand - vi. After using it every day for a while, it will seem quite natural to you that the letter "l" is the command to move the cursor to the right.
q{0-9a-zA-Z"} Record typed characters into register {0-9a-zA-Z"}
(uppercase to append). The 'q' command is disabled
while executing a register, and it doesn't work inside
a mapping. {Vi: no recording}
To get escape from it, just press q again:
q Stops recording. (Implementation note: The 'q' that
stops recording is not stored in the register, unless
it was the result of a mapping) {Vi: no recording}
In the earlier releases of emacs, there was no GUI, it was all command line and simple commands were done by pairs of cntrl-? Meta-? and so on. At first, it was confusing to just figure out how to shut the program down.
Don't get me wrong, it was immensely powerful, even back then....it just wasn't even remotely user-friendly until you gained some serious experience with it.
On the other hand, vi was also a bit cryptic but did not have as many features. However, the learning curve was a lot shorter in my opinion. I used vi all through college (bachelor's portion anyways) and nroff (which lives on Linux as groff) to write my reports and resumes.
A goal is a dream with a deadline
I reluctantly got into vi back in the early 1990s, after being spoilt by the wonderful text editors available on VAX/VMS. Then I promptly forgot all about it -- never even had a fling with ELVIS on MS-DOS -- until discovering Linux sometime in 1999 or 2000. My favourite console editor used to be AEE; then I discovered pine, and hence pico. Now I can't live without nano. There's even a vi command built into BusyBox.
Je fume. Tu fumes. Nous fûmes!
2 spaces isnt enough to be worth it- just hit spacebar twice, damnit.
People who set their ts to 8 scare me.
-- 'The' Lord and Master Bitman On High, Master Of All
Now that you get GUI editors that not only auto-complete code, but know about the classes within the application you are developing and can correct method calls and parameter types who the hell would use VI to write code?
Rapid Application Development VI is not.
I suspect that there is a little bit of protectionism going on, in that, to the lay person, watching an IT boffin do stuff in VI looks "impressive" and makes the develper look like they are doing something difficult.
In my applcations, I always think, if a lay person is able to work out what my code does, then I've done my job as far as well-written code goes. Code should be easy to read, easy to correct and damn near obvious what it does. Using vi for programming obfuscates code and is used by those unwilling to move on.
The only time vi should be used is if you are editing config or other admin files on a server when using telnet which should be damn close to never, on a live box at least.
America, Home of the Brave.
I use both Vim and Emacs, and both have advantages.
Emacs: You can run a shell-like process inside the editor, which leads to really, really cool things like editing code in one buffer, and then sending that code into a running interpretor in another buffer. This allows something like "visual" debugging, only in a proper editor.
Vim: If you know how to touch-type, vim just has the most comfortable (in terms of avoiding things like repetitive strain injury) keyboard layout. It really beats stupid CTRL- or META- something combinations, which can give you pains in your wrists if you use them a lot.
Anyway, enough objectivity. Flame on!
Aiiieeeeeeee -- in what level of hell does vim have menus! Linuxers, we hates them we does!
My first serious use of vi was under OpenBSD 2.6 and I forced myself to become relatively proficient because I recognized that vi was the universal reference point for console administration. For creative work (writing code, documentation) I slogged through the emacs learning curve and eventually found a pleasant comfort level, though never equalling my old proficiency with Brief under MSDOS. Sometimes I manage to get twenty powerful psgml-mode commands embedded into my fingers, but they are soon gone again when I'm no longer working with those document types. I'm one of those people that never recovered from the CTRL key being displaced by the lawyers and losers CAPSLOCK key. As far as I'm concerned, all the lawyers out there writing license agreements should stick the 40 column upper-case only Apple ][. That's about the speed that the legal profession cleans up their own messes anyway, but I digress.
In my view the problem with vi as a universal editor is that the rules for leaving insert mode are *not* universal. Under OpenBSD 2.6, almost any use of the arrow keys breaks you out of insert mode. Other versions of vi will leave you in insert mode within some nearby region of the inserted text region, but break you out if you move further away.
Modes are bad enough to begin with, though I'm willing to live with a mode or two where there is a sufficient pragmatic justification. What I'm not prepared to contend with on a daily basis are inconsistent rules regarding magic-mode switches as an unintended/unexpected consequence of common actions (e.g. cursoring around).
Nor am I prepared to memorize and apply inconsistent commands to disable or override inconsistent mode switches on a per system, per host, per revision, per version, per day-of-the-week basis. I'd rather wrangle with the hopelessly misplaced CTLR, ALT, and Mr Bill keys.
Perhaps vim has defeated the mystery mode switches associated with cursor actions. But my purpose in learning basic vi was to have a consistent editor available on any system I might need to use, not just a consistent editor when an ideal flavour of vi happens to be installed, so it's worthless to me.
Anybody who has used Linux or any other OS would be aware of the very powerful and feature rich text editor Vi.
The remaining computer users, however, are left in the dark I'm afraid.
1) The most frequently used key ("go to normal mode") is the furthest away from the rest of the keyboard. "You can remap it to capslock!" -- does capslock send things to the terminal? Does the ability to pass global all-application-effecting configurations into an unrelated subsystem excuse poor usability decisions? (insert unrelated MDI debate here)
:)
2) The cursor position in normal mode is one-behind the cursor in insert mode, so if you switch between normal and insert mode, you'll wind up moving backwards. (Workaround: use "append", except you're not trying to append to where you werent, you're trying to insert to where you were)
3) Because keys are not translated from their terminal sequences before being remapped, you can't remap the escape key itself (as that makes all keys which produce an "escape" character break)
I use Vi/Vim all day every day, but sometimes it really pisses me off
-- 'The' Lord and Master Bitman On High, Master Of All
I love vi. There is not a single UNIX machine in the world that does not have it. I can go to Timbuktu, login to their sole Indy box and start editing right away.
:w!
I hate vi. To be precise, I hate that it changes. I hate new features. I am not Luddite, I am just a weak person, who succumbs to new features of vi very easily. And when it happens, vi looses its fundamentalist virginity. I start enjoy navigating between lines using arrow keys in the edit mode on my Linux box, but when I switch to my Solaris server, this feature does not work anymore, I get ugly "A" and "B" lines inserted between the beautiful lines of code. This sucks.
The advantage of vi is its "standard universality". That means availability everywhere of the same set of features.
I am adding to it "absence of non-universal features". Every time you innovate vi, you are subjecting new users of vi to the very thing that vi is against - universality. I ask you: do not spoil the users, do not lie to them with your new features.
The development of vi should be very slow and the most emphasis should be given to the universality of the changes, and to the fast propagation of those changes if you really really have to make those changes.
The best solution would be to freeze any new features of vi and make sure that all the old features are available on every single UNIX machine in the world.
ZZ
I do not believe in karma. "Funny"=-6. Do good and forbid evil. Yours, Oft-Offtopic Flamebaiting Troll.
Real men of genius
Today we salute you Mr. vi editor coder guy.
Mr. vi editor coder guy!
You type at lightning speed while while the rest of us squint our eyes in wonder.
What the hell you just did to my file!?
You scour through code like a red-hot knife on butter
now my file looks funny in Notepad!!
Thanks to you Mr. vi editor coder guy, you remind us, it's all about the code!
Mr vi editor coder guy!
- these are not the droids you are looking for -
As much as a Vim-fan I am (I really am!), I really want to see something like TextMate for Linux! It's hard to describe what makes TextMate so great, take a look at the Screecasts on the homepage and on the Ruby on Rails homepage to get an idea...
I use Ubuntu almost full-time but I still have my G4 iBook which I use when I'm coding, just because of TextMate. Before TextMate I used to be a die-hard Vim-fan and I know my way around it pretty well.
My other account has a 3-digit UID.
Every so often I'll see an article like this (vim, emacs, whatnot) and I'll go check it out. I keep trying gvim (I think after downloading and playing with it again this morning it's been probably 4-5 times now over the past few years), and I keep getting frustrated. For a developer using Windows, and programming primarily in .NET, what does gvim offer me over something like Notepad++ (my current editor of choice)? The extent of my raw text file editing is mostly classic ASP pages (small mods, nothing from scratch) or the occasional txt data file or something. Everything else I do in Visual Studio.
I keep trying gvim out, but it just seems like too much work to get to my basic functionality that I've come to expect out of other windows editors. Some of my shortcut keystrokes don't work, and I don't really want to track down how to remap them. I shouldn't have to. It took me 10 minutes to figure out how to change the default font, and make it stick. The same to get the bottom scrollbar to stick. I shouldn't have to look up settings in one file, and edit a different text file in order to make simple configuration changes. gvim offers "tabs", but not as I've come to expect tabs to work. It's not so much a "tabbed interface" as it is an interface that "supports tabs". How do I make it open each file by default in a tab?
I dunno...maybe I'm just too lazy. It seems very powerful, for the occasional edit and decent find and replace in files, it seems like too much work to get set up the right way, and on top of that you have to learn the basic commands, too.
Maybe if I worked in both Windows and Linux on a more regular basis, then it would be more of an advantage? I'll play with it some more and maybe I'll force myself to learn it. Just my $.02.
True with vi, but vim starts me off where I last edited the document, which is usually where I want to edit it next as well.
I am TheRaven on Soylent News
Get That Fucking Mouse Out Of Here didn't form a word, but VIM had a nice eastern European sound.
It was called 'vim.' If vim can't determine the file type from the extension, it guesses based on the contents. Try editing a .m file, for example; that can be Objective-C or Mathematica (I think; maybe I mean Mathlab), but it generally guesses the correct one.
I am TheRaven on Soylent News
mc has been my favorite file and text editor for a long time now, works in both a GUI terminal window and in a CLI shell...
Politics is Treachery, Religion is Brainwashing
I started out using vi early in my career (on a PDP/11). These days I mostly use either Eclipse, Visual Studio, or NotePad++. However, when I either need to edit a very large file, or manipulate a large text file using regular expressions - vim and gvim are hard to beat. My thanks to the folks that have kept this useful tool alive and running on modern machines.
[Insert pithy quote here]
muggenzifters!
I still like IBM's EPM editor (on OS/2). It emulated Emacs, sed, ed, edlin or any other editor if you cared to customize it, and was GUI if you wanted it to be. The memories ... are surely better than the reality ;)
As for GVim, I like the combo interface on Windows. On the Mac, there's a few GUI inconsistencies, but you have to love the fact that the console program is identical. And who worries about 13MB anymore for a PC when a 1GB stick costs around $65?
The cesspool just got a check and balance.
Surely it's just me... but where's the article with the visual walkthrough?
If you want to learn vi, play nethack. Then the hjkl will seem natural.
Of course, it may pose a problem when you're trying to type an email and cc: just scares you away.
I have recently switched to Gentoo, and during the installation process the Manual introduced me to nano and I have to say it's the easiest command line editor to learn. I can now ssh into my server and actually do something! I have no issues with Vim or Emacs, but for what I need, nano does the job perfectly.
I've been programming since the 1970s when we really didn't have screen editors. We used line editors, and had to keep retyping the "list" command to see how our program was shaping.
VI was actually not the first screen editor I used. The first I used was the old Textedit on the Mac. I thought it was wonderful. I could actually move the cursor around and see what I wrote. My introduction to VI was when I first started working with C on Unix. I hated it.
VI was primative. Where my Mac editor was single mode, I had to switch back and forth between command mode and insert mode with VI. Where my Mac editor would wrap text, VI wouldn't. Where I could easily find a command with the menus, with VI, I had to remember archaic key strokes. Who in the hell wrote this junk!
However, once I started getting use to it, VI grew on me. The commands I quickly learned could be combined. For example, "d" deletes. "e" moves to the end of a word. "de" deletes to the end of a word and "3de" deletes the next three words. "xp" transposes two characters. There was an order to them: "d" for delete", "f" for find, "r" for replace. It started making sense. Then I started learning the ins and outs of RegEx, and I never looked back.
Not only that, but I quickly learned that for program editing, VI simply worked better than Textedit or Notepad. Unlike word oriented text editors, VI was line oriented just like a computer program. I've been using VI ever since. Over the years, I've tried GUI editors (Jedit, Nedit, KDEdit, TextPad, etc.) but I keep returning back to VI.
Most of these young whipper JDs (Java Developers) with their "Object Orientation" and "Virtual Machines" think of my preference for this non-graphical editor as quaint. Sort of like the way you'd look at Grandpa playing around with his model trains. That is until they realize that I can write code a lot faster than they can.
Last year, one developer told me it was going to take a few hours to clean up a particular program. I loaded the files in VI and transformed them in a matter of minutes. He was shocked. How can this "obsolete" little text editor do the job much more efficiently and faster than his feature ladened GUI? Why doesn't his editor support regular expressions? Why can VI load the files in less than a second while it takes VisualStudio three or four minutes? How can I write a program and never have to touch the mouse?
My sons have just started taken up programming. My 15 year old kid likes working with PHP, and first refused to even look at VI -- to old fashion and out of date -- just like his dad. He had a *better* IDE that was made specifically for HTML/PHP web development.
I recently caught him using VI. He had to admit that once you get over the basics, VI is faster and easier to use for his needs. My oldest is in college and I saw using VI for writing his term papers and essays. He said he found working with VI better because it kept him concentrating on content than formatting. Plus, it makes writing a lot faster. Takes a lot of time switch to the mouse each time really slows you down. He showed me how he programmed a macro spell checker using an ASCII dictionary and ispell. He also showed me the "linebreak" feature in VIM (something I didn't know about).
After all these years, I still haven't found anything that is as efficient as VI for editing. From what I see in Linux world, a lot of younger programmers who grew up with nothing but graphical interfaces agree with me.
May the colon key on your keyboard stop working for you and the seven generations to come after you!
Just to let you know, it's not actually 'Vi iMproved', but 'Vi IMproved', and the correct capitalisation is 'VIM', not 'ViM'; or at least, if you load it with no files it announces itself as 'VIM - Vi IMproved'.
I'm being picky, but camel case has been known to make people's eyes fall out. (I'm also exaggerating.)
Look out!
99% of editors, Ctrl-end. Vim, G. Sorry, that's retarded.
Control-End is hard for a touch typist to reach, and it's in a different place on different keyboards. Maybe that's convenient for people who don't touch type and who use editors rarely enough to remember key bindings, and maybe starting in insert mode is convenient for people whose needs are served by Notepad.exe, but other people have other needs.
If you like an editor that uses Control-End and starts in Insert mode, you are well served. Why are you trying to force the remaining 1% of the editors to conform to your notions of how an editor ought to work? Don't you already have enough choices? Are you a member of the Borg and feel the need to assimilate and change everybody to conform to your own (IMO retarded) notions of how computers ought to work?
True... and bloatware also often creates garbage, however bloatware gets the garbage to market a hell of a lot faster than what you can do in notepad. In this day and age thats a commercial advantage.
The tab feature doesn't seem very well integrated. Vim 7 seems to make a distinction between files that are open and files that are open in tabs. Why would I want that?
Meanwhile, a real woman just goes and manually does whatever it is her husband's silly "program" was supposed to do.
Ach! That explains the extra 'o'. I'd wondered about it--I didn't think Dutch went in for double letters in open syllables. On the other hand, it's rather inconsiderate of the Dutch for not using umlauts on about half of their o's. We English-speakers need some reason to laugh at you|them!
Look out!
It's hard to get excited when you have no soul.
For #1 you can also use ctrl-c, or ctrl-[ (which is the escape sequence). If you're going to remap the capslock key you should remap it to ctrl IMHO.
Correct, in this day and age, it is very uncommon to see an application/editor which does not have the abbility to remap keys it uses.
answer to 2)
Not quiet, this might be because you are misinterpreting the cursor position, the cursor block covers one character, insert/append create scharacters on the corsor boundaries (left for insert, right for append)
I use vim for all text/config file editing, but as a java developer, I use eclipse for java.
I do use vim a lot for html and template files.
we need an "-1 Plain wrong" moderation option!
in Danish ø -> oe æ -> ae å -> aa
10 ?"Hello World" life was simple then
Having used vi for some 15 years now, I can say that there is no such confusion. In classic vi setups, the cursor keys just did not work. In modern vi setups, you should use vim. Your mistake was to use a non-vim version of vi in a modern context. In other words, the problem you describe is limited to OpenBSD.
There's really no reason to avoid vim. It's easy to install and runs on whatever platform you happen to be using. I have used it on AmigaDOS, BeOS, NeXTstep, MS-DOS, Win95, WinNT4 and WinXP, FreeBSD, SunOS (and solaris), Linux, and MacOSX. It worked consistently and confidently on every one of these platforms, regardless of the stupidity of the platform. Why would you ever want to use some half-baked BSD-vi reimplementation?
-josh
Doesn't it make you feel good to know that our freedoms are protected by politicans, lawyers and journalists.
Perhaps you're "retarded" for failing to ask "Why does Vim do that?" Again, Vim is supposed to work differently. Let's say you want to perform a regex pattern replacement on all lines from the one where your cursor is until the end of the file. Well, that's simple; highlight the lines using the command (V for Visual highlight by line, and G, as you complained about, to go to the end of the file). Now, let's put that together with a pattern replacement: That replaces all instances of "that's retarded" with "I'm too lazy and closed-minded to look beyond my own lack of understanding to appreciate software that's been tried and tested for decades". As a bonus, when you use regex pattern replacement, Vim will also automatically mark all places in the file that match the search pattern so that you can easily navigate through them using 'n' and 'N'. Wasn't that fun? For bonus points, you can go figure out why it's easier to modify a macro stored in a named buffer if that macro consists of printable characters instead of CTRL- sequences. Vim recognizes arrow keys quite well. The Windows port even behaves reasonably well with your standard CTRL- sequences, too. I know this is
I pity the foo that isn't metasyntactic
There are two types of people.
1) Those who can think very clearly and can write whatever they need to in one go, without ever having to revise it.
2) Those who cannot write even a single line without needing to use the delete feature 10 times.
For the type 2) people vi is not a useable editor. At least not for anything that requires writing more than a couple of lines. I unfortunately am a type 2) person and have to live with emacs. IOW vi is for perfect people, and I am actually a blathering idiot when it comes to typing in my thoughts or code.
I still use vi quite a lot, for quick editing. But if I have to write more than a couple of lines then I start searching for emacs.
I am quite used to the two editors. Since when you are within emacs you can do almost anything, there is very little motivation to learn another editor. This is why I hate having to use any other program that tries to make me learn its editor, and does not provide emacs key bindings.
It is good that some of the emacs key bindings are used in many editors like the firefox input box.
You had a magnetized paperclip? I had to move bits by feel!
"You can either have software quality or you can have pointer arithmetic, but you cannot have both at the same time."
Escher was the first MC and Giger invented the HR department.
Anybody who has used Linux or any other OS would be aware of the very powerful and feature rich text editor Vi.
Much like seeing Windows helps you appreciate Linux, seeing Vi helps you appreciate Emacs.
Have you read my journal today?
sync until it's still,
salt until it crunches.
As a Finn, I actually find it better to simply forget the dots if the charset doesn't have them, in the style über -> uber. The correct form is usually apparent from the context, whereas the ae/oe/ue form looks like a diphthong to us and thus confusing. It's particularly annoying when you have a long monophthong like "ää" transliterated into "aeae"
However, there are some examples where the umlaut really makes a difference: näin (I saw) vs. nain (I fucked).
Escher was the first MC and Giger invented the HR department.
Well, therein lies your problem -- those nasty arrow keys! Banish them from your repertoire of vi commands, and all will be right with your world.
Very few or no console editors on Linux seem to fit my needs. Ive tried vim but it seemed as useless to me as the others. For instance, I need soft line wrapping, that is, the editor wraps the line on the screen without inserting a line break. This is so if you add something in the middle it doesnt throw everything else out of alignment below. This is also called continuous line wrapping. I also like to have a constant display of the line number on the screen, and modeless editing. Really, the only thing that works somewhat decently for me on the console, is DOS edit, with its drop down menus and such. Is there something similar on linux?
What the hell are you talking about? I've been using vim for seven years now, and I've never even heard of that behavior, let alone had it happen. The only way I know of to leave insert mode is to hit ESC.
Are you talking about some old, weird legacy version of vi from ye olden days?
"Destroy science and religion. Science would re-emerge exactly the same; but not religion." - Penn Jillette, paraphrased
Because notepad fills my files with the number 13 for some unknown reason and I consider that unlucky :-P
Also because syntax-highlighting, automatic indentation, auto-formatting and now *drool* drop-down auto-completion makes life a lot easier and FASTER.
So, this article talks about the following "cool" features:
* on-the-fly spellchecker
* bracket highlighting
* keyword auto-completion
* tabs
* undo branches
I'm neither a vi nor emacs zealot, but this list really made me yawn - apart from the undo branches (which are cool but unnecessary if you do any CVS or SVN (which you do in *any* professional environment)) these features are something that about *any* editor I've encountered in the last years has.
I ACK the power of vi and emacs, but I wouldn't have thought that auto-completion and especially bracket highlighting would be something new and great...
Who is General Failure and why is he reading my hard disk?
I know that, filetype.vim, I was talking about when you open a New File (without a filename) it would work out the filetype from what I wrote in it.
Guy asked me for a quarter for a cup of coffee. So I bit him.
you can always have tons of CTRL+META+ALT-SHIFT schizofun with Emacs. :)
or you can have your basic and featureless CTRL-C/CTRL-V fun and mouse-select with the many editors following the notepad school...
I want the powerful features and easy-typing of vi-like editors...
I don't feel like it...
Let us not forget the standard ed editor, the pinnacle of user friendliness! (Or is it sword point? I forget...)
... and check out Bill's comment on patents and copyright.
I ask you, so what? Every other decent editor already HAS spell checking and bracket hilighting. Vim is just catching up. It has become so ingrained in developers' minds that people have been quite inattentive to other good editors popping up over the years. Kate is one good example.
I have switched to vi after seeing one of my college professors use it. Watching a vi master edit a source file is a truly breathtaking experience that people who say they do not like vi are certain to have never had. After the experience, the temptation to learn vi is irresistible.
The first thing I noticed when I emerged the VIM 7 was
:NoMatchParen. I've verified that this works .vimrc.
.vimrc?
the hilighing of matched parens (not to be confused with
'showmatch' that bounces the cursor to the matching
paren when you're typing).
The article says that this behavior can be turned off
by typing
when in VIM, but I can't get it to work in my
Has anyone figured out how to turn this behavior off
from
*sigh* back to work...
and you grew up playing Doom before you used linux, you want to use WASD. .vimrc so I just use nano.
But I'm too lazy to set my
THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON
Real Programmers are named Mel
Infuriate left and right
I just posted a link to that and then found yours when scrolling down. You beat me!
Arrrrrrrr! you scurvy dog!
Infuriate left and right
The UNIX geek's equivalent of the Rolex watch. More than perhaps any other program than I can think of, it's been considered a badge of honour if a person has the terminal degree of autism required to understand it. I think that also is the main thing about the application that I resent...I don't consider it to be genuinely useful, but simply so abstract, intentionally user-hostile, and obtuse that it confers bragging rights to anybody who is actually able to use it. I also strongly suspect that that is the primary reason why it has endured.
;-)
Some of us prefer applications that don't require the accompaniment of controlled substances for us to be able to comprehend them.
No, we use vim with latex..
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.
I can remember the days when 8 meg was a lot for a disk, never mind memory.
2.4M removable platters anyone?
The latest version from the Berkeley boys, nvi, is quite capable of holding its own with vim and does a better job of making its extensions (like "undo") feel like part of the normal command set. It's simply a more accurate implementation.
I've been using vi for a quarter of a century now, and have used vim and other clones like stevie and elvis when they were the only option. All but elvis have had me occasionally tripping over my fingers as their command structure didn't quite follow the original.
Oh no! Vim has been updated? There's so many commands to remember now! There's even a visual mode?!? Gotta get a bigger mug...that means more caffeine for my already-frazzled nerves...or have a shirt iron-on transfer done with the commands printed upside down so all I'd have to do is look down to see the commands...which reminds me, gotta put on some pants...
WARNING: Smartphones have side effects--most of them undocumented.
Doesn't VIM start you where you were last editing by default? I realize that this can be disabled, but why would you do that if it's usually what you want?
I thought it meant "Eventually Mallocs All Core Storage"...
Oolite: Elite-like game. For Mac, Linux and Windows
Actually, I do work a little differently in vim. I use the multi-level undo, and I enjoy spending my first day on a new installation trying to figure out how to get scp:// urls working and then fixing whatever's broken with the syntax coloring this time.
Still, at some point in the late 80s, I began to hate emacs, and that's the way it still is. I guess I had to build it one too many times.
From the section on keyword autocompletion:
"I press the key combination [Ctrl+x] [Ctrl+o] and Vim will smartly guess the correct keyword and insert it"
Anything that doesn't include ":" is the antivi! The believers must stay strong through these hard times! We must not aldulterate our holy editor with control and meta keys!
Actually, I do normally have nvi installed (and vim too). I just didn't know about nvi's . behaviour yet. :)
Unfortunately, I'm not able to find a way to do what you want... After uu, a . should try to redo "redo", and report an error because there is nothing left. However, for vim to be able to emulate this, it must have a way of knowing that the last command was "redo". While it undoubtedly stores this somewhere, I can't seem to come up with a way to reliably tell from a function.
I generally don't partake in editor discussions, but I thought I would point out something I find really interesting I figured out about emacs as compared to vi. I've used both, but almost always use emacs except for quick editing tasks.
The thing I find most fascinating about emacs is it's ability to give me more than one keyboard; each time you press Ctl, Alt, Meta, and Shift, you have access to another virtual, or meta keyboard, that can be used to enter commands. I like to think of it as keyboard layers with instant access simply by pressing a key. This is great for overall speed, and although a bit confusing at first (not like vi's two modes are all that intuitive either), it becomes totally natural after some time and practice, just like a musical instrument.
The two main layers can be thought of as Ctrl-X and Ctrl-C, which technically act like the menus you would access under windows using Alt-F, Alt-W, Alt-E, etc. There are also the very frequently used commands that are attached directly to Ctl and Meta (Alt) for letter, word, line and buffer movement and modification, and they actually follow a very structured form: Ctrl for letters and lines (single char/line movement), Meta for words and paragraphs (multiple characters and lines), and Ctrl-Alt for buffers. Of course there are exceptions to the rule that have come about over years of use, but in general this is the case, and if you find an exception that doesn't work for you or you can think of something better, you can always do a global-set-key to switch it to your way of thinking.
The computer as a tool is limited by the amount of information we can get into it so that we can command it to do our bidding. The emacs keyboarding system allows for a greater amount of information to be entered into the system at minumum physical cost at the price of some adaptation and learning time. In the end, if you want to get the maximum speed and efficency with your machine this type of system is essential.
But what do I know?
Listen to my music.
I fake my way along with Vim, in fact, use it frequently, but fake my way along with mostly "i" and ESC.
I've looked at the help for the new thingie, and googled a bit, but would really appreciate a simple step-by-step for getting autocomplete working for, say, Javascript or C#. Or even HTML.
Yank up to (not including) next period.
Delete to end of line, beginning at next :
Bear in mind that almost any search or action can be used in place of a count. :D
grey wolf
LET FORTRAN DIE!
Note, this post has informed you aboout the Jacaltec language of Guatemala and (if you view the HTML source) the uses of U+308 aka ̈ the combining diaresis
echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
Wow! Vim is becoming almost as good as Emacs!
o hai
If you have are an Emacs user developing Java code, you really should be using the JDE for Emacs. While I don't remember it having a refactor tool, it does understand and support many specific language-specific additions, including automatic completion of members, etc. It also is able to identify Classes you need for this Class and also remove unneeded Classes from the import list. There are lots of other support libraries for developing Java code in Emacs, including support for the PMD lint-like tools.
I assume that is some way towards the "language integration" that you refer to.
Cheers,
Toby Haynes
Anything I post is strictly my own thoughts and doesn't necessarily have anything to do with the opinions of IBM.
That's not Godwin's law, at least in not in the sense of comparing your opponent to the Nazis. Here's an example of Godwin's law in this context :
BurnEmacsHeretics: The world would be a lot simpler if everyone learnt VI. Then I would need to write scripts to auto uninstall Emacs on my boxen, or have my black clad, goosestepping lab monitors break the fingers of anyone who installs it. Plus I wouldn't need to bug users home internet connections to see if they are finding ways to get around the scripts.
GasAllViUnternmenschen: Oh, I see. Ein Lab, Ein Sysadmin, Ein Editor. Fukk you, Hitler!
echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
Me totally relate t' that. `Tis so much easer t' regex away then t' go through large chunks o' HTML/code bits. Me be usin' vim since 1999 an' me nay planin' t' let 't sink t'Davy Jones' locker on me desktop any time soon! Anyone who thinks otherwise be nay fit t' invoke th' programmin' gods!
"If I have been able to see so far, It is because I went out and bought a damn binoculars" - Ze da Esquina
You are far too subtle for me...
YMMV
Ratboy
Just another "Cubible(sic) Joe" 2 17 3061
Am I the only one that rushed to my browser to see who had nain.com, or, especially amusing, nain.org?
Definitely added to my "four letter words that befuddle" list. Been using the nivenesque "futz" for decades.
There is no right to feel safe thru security vaudeville at the expense of everyone's freedom, privacy and tax money.
He's from the Wild West, where editors use Dead Trees.
Bill Stewart
New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
I'm not "misinterpreting" anything. VIM gets it wrong. This is undeniable, despite its being universally denied. All normal mode operations act based on the cursor being where it appears to be, all insert mode operations act based on the cursor being where it appears to be. Entering Normal Mode causes the position on which actions occur to change. Whether or not behind-the-scenes the variable involved doesnt actually change is utterly irrelevent and unrelated.
.vimrc
If you're in an array of text and your cursor is as anArray[57], inserting a character should insert at position 57. Performing an operation on the current position should effect the character at position 57. Appending should effect position 58. The visual cues given by VIM insist that the cursor is at position 57 for inserting text and position 56 for operating on text. You can't defend an obviously incorrect interface with "but in the code it makes perfect sense!"
Move your cursor to the beginning of a line (not file! Line!) and watch it behave differently from all other positions. Suddenly moving backwards isnt such a keen idea?
With the current method, going between insert, normal and normal moves the cursor, while going between append and normal does not. While I can think of many reasons why you'd want a seperate "insert" and "append" key (that is: go into insert mode, starting to either the left or the right of the current cursor position), I can still not think of any reason why I'd want to reposition my apparent cursor (regardless of what internal states exist) before entering Normal mode.
Your argument is flawed and doesnt take into account all the facts: Regardless of how you entered Insert mode (using i or a), the Normal Mode cursor always appears to the left of the current position (as if, by your words, one had always entered Insert mode using the Append key). By your own words, it should be obvious the cursor belongs (in that case) To The Right of the inserted text (as text has been inserted To The Left of the cursor)
So the whole of what you have said is irrelevent, inaccurate, bunk. VIM gets it wrong, and due to processing remaps too early, it cannot be fixed in the
-- 'The' Lord and Master Bitman On High, Master Of All
1) The most frequently used key ("go to normal mode") is the furthest away from the rest of the keyboard. "You can remap it to capslock!"
Screw that, rebind it to 'jj'. It's right on the home row, and I've never had a problem with it. 'course, I happen to use capslock as a third meta for use with WindowMaker, so I have other reasons for working this way.
So I am agreeing with the parent post.
I like the idea of VIM being able to undo to any particular point in the history. This seems like a good additional feature, and I'm sure I'll get the latest version now. I tend to use very few features that are not in the earliest versions of vi since I am old and set in my ways.
==
If you want to get rid of the graphical stuff, put this in your .emacs file.
It looks better in term, but you lose the crap.
(menu-bar-mode -1)
(scroll-bar-mode -1)
(tool-bar-mode -1)
If you work with Windows at all, I highly recommend Notepad2. It's that good.
> By default, [on-the-fly spellchecking] is turned off. But by navigating ...
> to Tools -> Spelling -> "Spell check on"
Uhh, sorry, you lost me there.
That may not be where you want to edit. You could be responding to a compiler's error message.
I don't think I follow you correctly here, or we are using differnt vim's.
> If you're in an array of text and your cursor is as anArray[57], inserting a character should insert at position 57
As a test I opened vim in an xterm.
Did an 'I 1234567890 ESC', resulting in the following screen (I have linenumbers on):
1 1234567890
I then positioned the cursor on the number 5, so that it 'covers' the number 5 completely.
This could translate to your anArray[5] if you want.
I then hit 'i a ESC' wich results in:
1 1234a567890
So the INSERT command mode switch will result in inserting/creating new characters _before_ the current highlighted cursor position, and shifting following charcters to the right.
The APPEND command inserts/creates characters _after_ the currently highlighted cursor position.
So in my examle an 'a a ESC' results in:
1 12345a67890
I cannot find anything wrong with that.
On a site note, I often get confused by the difference in the p and P command to paste a buffer,
if the buffer is a complete line, the behaviour is obvious, but if the buffer only contains some words,
it often seems to paste in an illogical location.
we need an "-1 Plain wrong" moderation option!
Strange - I like vim for the very same reason. In Vim it's the different modes which make the different keyboards. And more so then in vanilla Vi because Vim supports more key combinations and more modes. See:
o r/Vim#Modes
http://en.wikibooks.org/wiki/Learning_the_vi_edit
Especialy the visual mode is cool. Select some text and you have a whole new set of commands to operate on selected text.
And of corse you can customize the key mappings for each mode seperatly - another feature missing from Vi.
Martin
In the end it's just the language we have learned to speak with our editor. They both say the same things, but in different ways. Our brains work differently...and hence, there are two ways of editing. I am a bit torn as to whether the first editor is our choice, or we have a natural inclination, but it's fascinating that we choose one or the other.
The wars should end, we are only just different.
Listen to my music.
Did you stop reading the post after that one note? That was half of the example. Standing by itself it is perfectly acceptable.
/at/ position 5 and insert, it inserts "at" position 5 (that is, before the text '5', which is moved to position 6). Meanwhile, the cursor is moved forward so the next "insert" would occur at position 6. Because when you entered insert mode from position 5 it allowed you to insert characters at position 5, it stands to reason that now that you are inserting characters at position 6 you should stay at position 6 when you re-enter normal mode.
I was talking about an inconsistency.
If you are
Now re-enter normal mode. You find yourself at position 5 again. Wtf?
It can probably be assumed from this (I havent actually read the code) that the so-called "Insert" mode is actually a "move backward one, then Append" mode.
I've seen this error excused by "but if we did it that way, the cursor would need to be handled differently at the end of the file than anywhere else, otherwise the cursor would be on some "virtual" non-existent character!"
This is a common excuse, and completely false. If you insert a new line and add no characters, moving between insert and normal modes behaves just as it should in any other circumstance- the cursor does not move. There are no characters on the line, so by the logic given in defending the wrong way, the cursor must be on some non-existant "virtual" character. Either way, does a flawed implementation ever excuse a flawed interface? [hint: it's an anagram of "on"]
VIM supports about 6378 options which allow the editor to behave a little less like vi, which is nice, but can be annoying. This is not one of them.
-- 'The' Lord and Master Bitman On High, Master Of All