A religious attachment to vim? No friggin way. No editor has ever caused one of my projects to come in late (or early). The factors that affect real projects are so far removed from the software one uses to edit code that it is incredible some people evangelize something like vim to such an extent.
The other really funny thing is to see articles and blog posts describing how to add trees, tabs and all manner of other things to vim and how this makes it even cooler. Really funny.
I wouldn't consider it funny that someone would want to optimize a very important tool to make it more functional. The tools we use for software development are both a curse and a blessing. A curse that there is no ONE TRUE WAY of doing something and a blessing that we can build and mold the tools to accomplish what we need.
I am not religious about Vim or any other text editor but I can definitely appreciate others wanting to optimize their usage.
Personally, I find that once you have setup Vim the way you want, its pretty much on autopilot. I would say that if someone is a natural tinker, Vim is the best black hole one can get into as there can be no end to the tinkering.
My blood pressure goes up when people start to get religious about this stuff. Some go as far as proposing that one can only be a professional programmer if one uses vim, which is utter nonsense.
That's the point. vim does not make you super-efficient at anything other than being a data entry clerk. That's not where significant value is developed in a technology business.
> True vim followers use buffers only.
Don't forget a Lear Siegler ADM3A terminal over a 300 BAUD modem leased line to the mainframe. Oh, wait, that's the way it was when vi was written.
:-)
I love this quote from Bill Joy: "I think if I were going to go back—I wouldn't go back, but start over again."
There are plenty of legitimate gripes to be made about vim, but you really should consider taking the time to learn a serious programmers editor like Vim or Emacs. That would at least help you avoid looking like a fool by ranting about things you clearly don't understand.
You may even find (god forbid) that you enjoy it.
Let's talk about being a fool and talking about things I don't understand.
I have started (and self-funded) at more than three technology businesses in my life. I am in the process of starting two more.
In all cases these businesses started in my garage (one actually in my closet, before I had a garage) and managed to grow to the point where I got them out of the garage and actually hired many people.
Some of these businesses shipped product internationally, all over the world.
All of these businesses were hardware and software businesses.
Some succeeded and others failed.
And, in every single case, different technologies and tools came into the fold.
In no case whatsoever --not one-- across THIRTY YEARS of entrepreneurship did a fucking text editor have anything whatsoever to do with the success or failure of the enterprise or project.
Across a wide range of languages and technologies: machine language (actually typed-in code with a hex keypad), assembler (various processors), Forth, C, APL, C++, Fortran, Visual Basic, Lisp, Python, PHP, JavaScript, Objective-C, Verilog, 8080, 8085, 80x86, PDP1104, 6502, MC68K, PowerPC, Xilinx FPGA's, PC, Mac, Linux, embedded, workstation and server software and a few other things I probably don't remember doing.
Not once. Not ONE TIME. Have I experienced a situation where using something like vim would provide any advantage whatsoever.
And, yes, I use vim on my Linux servers because it's there. I don't have to think about it. It's the tool that comes with the box and I use it. From there to actually CHOOSE to use vim everywhere for coding our projects and to go past that and evangelize vim? That would be insane. There far more moving parts and issues in a business or in any piece of software for a text editor to make any real difference whatsoever. You can go on believing it does. And that's fine. That's not going to make it any real than believing in the tooth fairy.
Show me a real project and a real business that came in on-time, bug-free, profitably and ahead of schedule BECAUSE OF vim and I'll gladly eat my words. Because I actually happen to know what I am talking about I can say with absolute confidence that the whole thing is a big smelly pile of bullshit. If the authors had the tools, keyboards and peripherals we have today vim would have been completely and utterly different. Do you honestly believe that these guys CHOSE to have modes because of some divine revelation? No, they didn't have the friggin keys and needed to come-up with a solution. The same reason Wordstar had shit like Ctrl-K-X.
you've boiled the whole argument down into whether a text editor is the pillar upon which a successful product is built. Well of course not! Nobody is even claiming that. Some people are merely expressing it allows them to put thought onto paper a little quicker, or that they just enjoy it. Others just enjoy being able to tweak their editor, it's a fun meta activity for any programmer.
It's fine that it might not be the most optimal way to spend your time, or that you don't get it. but relax already
"machine language (actually typed-in code with a hex keypad), assembler (various processors), Forth, C, APL, C++, Fortran, Visual Basic, Lisp, Python, PHP, JavaScript, Objective-C, Verilog, 8080, 8085, 80x86, PDP1104, 6502, MC68K, PowerPC, Xilinx FPGA's, PC, Mac, Linux, embedded, workstation and server software and a few other things I probably don't remember doing."
For all that name dropping of the vast and expansive techs you've worked with, you seem to be extremely close minded on this issue.
I went to a startup pitch event the other day. VC's on the panel were asking the entrepreneurs the usual cadre of tough financial questions. Questions like: "How are you going to spend the time and money once you get funded?".
What do you think would happen if someone said something like this?
"I am going to take a month or two to learn and get really good at vim because I keep reading on HN that it takes too long to reach for the cursor keys. Then I'll start building the product you will be investing money on."
I don't know about that panel. If I was on the panel the lightest kick would land the would-be entrepreneur on the moon without a rocket.
Not important. Not significant. A complete and utter waste of time, focus and mental resources.
Let's exaggerate in order to enhance the effect.
Both you and I launch new startups to produce exactly the same web software product.
We both get programmers who have zero experience with vim and Ruby. Let's say they only know PHP and only know how to use Notepad++. No frameworks.
I have my programmers go to Ruby class and learn Ruby on Rails for a month.
You have them learn vim for a month. They get to stay with PHP.
Not fair? One is a framework designed to speed time to market while the other is just a text editor? Exactly!
Who do you think will see the greatest productivity gains in a month?
In six months?
Who will ship product first?
Who will ship product with more features?
Who will ship product with less bugs?
Who will go out of business?
Who will get fired by the board?
Right.
Or, let's take a different route:
Our investors just gave us a million dollars each for these startups.
I go to mine and propose that I want to have the entire team take a month to learn RoR due to the productivity and code quality gains we are going to be able to derive by taking this approach.
You go to yours and tell them that you want your team to spend a month learning vim because it takes too long to go from home row to the arrow keys and you can shave seconds while editing.
Sign-up for YC and tell PG that you are going to have your entire team go learn vim for a month instead of something that delivers real productivity gains that are orders of magnitude greater.
Who gets fired?
Again. Right.
When you measure what really matters just about any argument for vim is as hollow as can be.
Let's not, they are entirely irrelevant.
Noone is claiming that any specific tool will make your startup succeed, or fix your bugs, or add features to your software for you - I thought we were discussing text editors.
It's exactly the opposite. All of that has given me perspective that seems lacking on some entering into these religious conversations. I don't even know how many code editors I have used over the years. I probably couldn't list them. I've even had to write some of my own. The point is that across all of those technologies, platforms and years, this has never mattered. The text editor has never --ever-- played a significant role in the factors leading up to the quality, schedule, success or failure of a project.
If you like using vim and messing with it. That's OK. I use it too when I work on Linux. No issues there. Now, to go to the extreme to say that one is not a professional programmer if one does not use vim (I claim I have seen many times) is, well, nonsense.
In addition to that someone chose to call me a fool who does not know what he is talking about. I felt the incomplete list might be a reasonable superficial qualifier. Not enough? My email is in my HN profile. Shoot me a note and I'll provide you with my Linkedin profile.
My primary objection to the "vim religion" is that newbie programmers are almost intimidated into wasting their time with such an utterly insignificant aspect of the job. This is particularly true of someone who wants to be an entrepreneur as opposed to a data entry clerk. There far more important and useful places to spend your learning hours than learning to use a shit editor with a shit UI that originated at a time keyboards had half the keys they have today, GUI's did not exist, monitors were terminals that displayed 80 x 25 characters and mice were nowhere to be found.
In the context of starting, launching, growing, evolving and maintaining a tech business spending any time to get into something like vim is an absolutely irresponsible waste of time and effort.
Possibly, but some people are not starting, launching, growing, or evolving anything but software - and a text editor is where 99% of that work happens.
I haven't measured it but I'd venture to say that actual time typing code is probably somewhere in the order of 15% to 30% of a project, if that high. In fact, I really doubt that initial code entry goes much past 20% of my time.
Then there's testing, debugging and source control/management. If the project requires media a substantial amount of time might also be devoted to the creation and management of image, video and sound assets.
One interesting thing is that as the years went by and I became more experienced I quickly spent less and less time debugging. My code is largely bug-free due to the fact that I devote a lot of time and effort to initial planning before I even think about firing-up a text editor at all.
So, yes, your claim that 99% of the work in creating a software product happens in the editor is something that can only be true for an absolute rank newbie. I don't know many experienced programmers that, for a non-trivial project, just launch into an editor and spend 99% of their time there.
Don't take my word for it:
http://www.codinghorror.com/blog/2006/09/when-understanding-...
http://programmers.stackexchange.com/questions/93302/spendin...
Personally, the one thing vim(and Linux) have taught me is that mastering your tools is hard in the short but entirely worth it in the long run. Do really never learn shortcuts or concepts or the tools you use? A language is just as much a tool as a text editor.
How much of your time did you waste here, religiously debating religious vim users? At least from here(the internet can distort things) it seems you're just as religiously anti as they are pro.
Wow, it's sad that parent never learned how to use a real text editor. Can you imagine how much more he could have contributed to the world if only he hadn't been held back by bugs, delays, and quality problems inflicted by bad tools? If only some stubborn people would invest a little time in learning vi or EMACS, the world could have so much more productivity from people like that.
As for myself, I don't really care much about speed while coding, however, I do care much about being efficient at doing things. Why should I have to move my hands up to reach the arrow keys, if I can use the home row instead? I do think it is very tiresome to move my hands around (maybe because I'm lazy?). This of course applies to the mouse/trackpad as well. Again, you need to move your hand to away. Again. Not necessarily about speed, more about efficiency and convenience.
Today. Sure. Imagine my surprise when I see yet another bullshit vim article on HN, this one now saying "don't use the hjkl" keys. When will the madness stop?
Newbie programmers reading HN actually need to hear from someone who clearly sees that the emperor has no clothes. Some look at HN as the reference by which they ought to shape their learning and careers. There's a definite pro-vim bend here. And it's all bullshit.
If your goal is to be an entrepreneur, focus on the stuff that actually matters and is many orders of magnitude more signifiant than a ridiculous text editor from an era when keyboards had letters, numbers and three or four extra buttons.
If you want to be a fast data entry operator, definitely spend months getting good at vim.
Better yet, buy one of those single-hand chord-based text entry keypads and modify vim to work with it. You'll be able to type faster and with only one hand. Not sure if the work will have any quality at all or if it will be bug free or if you will be building anything anyone wants or if it will be profitable, but it will be awesome to behold.
If you want to type significantly faster English text, stenography looks like the best approach by a long shot. Not so good for symbols though.
/ off topic.
Vim is making a 5 seconds difference on every edit. Each edit can be defined as commenting out blocks of code, insert/delete text, or moving blocks of code. If your IDE provides convenient key combo to do these tasks, then great, you have no reason to use Vim. But as soon as you reach for your mouse, you just wasted 1 seconds. Dragging your mouse to select the text you want to change takes another 5 to 10 seconds.
> Oh, yes, and 100% of your time is spent coding. You don't lookup documentation and you don't do any file management at all.
Documentation lookup is much faster through terminal :) Man page is easier to navigate than JavaDoc because of that no mouse needed.
File management is easier and faster through terminal. Think about the process that you move/copy file in GUI. 1) You open one Window, then navigate through folder tree with mouse double clicks; 2) You issue a copy command to the file you want to copy/move; 3) You mouse click to destination folder then paste it. Terminal based file management is just `cp /source/folder/autocompleted/with/tab/key /destination/folder`
I think the true argument here is not Vim or not Vim. It's about mouse or no mouse.
Please. I'm on the floor laughing. Five seconds. I'm not 12 years old any more. I learned to use a stop watch a long time ago. If you want to believe your own folklore that's fine with me.
In any non-trivial software project far more time --ORDERS OF MAGNITUDE MORE TIME-- is spent (or wasted) on planning, executing and, yes, fixing bugs, on software. The speed of your text editor is a rounding error in the balance sheet.
Like you say when your jumping around a lot then it matters less. When you're typing a lot then it does matter to keep your fingers on the home row.
And my point is that it does not matter. Use the mouse. Use the arrow keys. Use the function keys. Use a GUI. Use multiple monitors.
If we are talking about productivity and code quality, the editor is orders of magnitude less significant than a huge list of other things. It does not matter.
Then we have someone now saying "don't use the hjkl" keys. Really? How far is the idiocy going to go?
If I am building a business or a product the last thing on my mind is what text editor we will be using. It is so ridiculously insignificant in the grand scheme of things that seeing people focus on it is beyond comprehension.
I see your point in people evangelizing VIM, Emacs, Apple, whatsoever, but... who cares? Let them be. I don't see, why you try so hard to prevent people from being happy and enjoy little things in life. Why does everything have to be insignificant, because something else is so much more significant? I seriously don't get your point there.
Let people love their editor, even if it is insignificant to you. People actually are more productive, when they are happy using a product they like, or could you seriously imagine writing code/surfing the web/do anything with the on-screen keyboard? Even you would get frustrated and would hate your job. It does matter. Maybe not the productivity-wise, but definitely how you, as a person, feel.
If all I achieve is to virtually snap a newbie out of the trance created by HN dogma the result is good. It would be a tragedy to promote these tools for another thirty years.
The first point is true. The second point is false -- it does matter. Saying that X is less important than Y can't be used to argue that X doesn't matter at all.
> If I am building a business or a product the last thing on my mind is what text editor we will be using. It is so ridiculously insignificant in the grand scheme of things that seeing people focus on it is beyond comprehension.
That's true in general, but there's an exception -- if you can improve the efficiency of editing, you might make a basic change in people's thinking and become a millionaire as a side effect.
Guess how I know this.
vim is a cult based on metrics that are not significant drivers in the context of building a software product or company.
Oh, I agree -- based on modern standards it was quite primitive and somewhat poky when used by an experienced touch-typist. But I was only comparing it to vi. :)
I have never, in THIRTY years of designing hardware and writing software, been slowed down by a text editor of nearly any kind (other than the first time I used VI). And, yes, I can use vi and vim. And yes, I think it is total horse-shit. The things that have slowed me and others down, caused projects to fail, caused robots to crash and damage something or caused the success or failure of a business have been orders of magnitude removed from any advantage that could be had via a text editor, even if it was wired into my brain.
It is OK to make oneself believe that this is really useful stuff. Some people believe in all kinds of invisible things. And, in that context, anyone going against those beliefs is a lunatic. I am, on more than one front. I prefer to focus on what is real and what is significant.
It isn't only about shaving milliseconds off your coding. I realize this is mostly anecdotal, but I find when I'm editing in vim or any good IDE, I can focus more on the algorithm and less on the act of typing, and a deeper focus on your program (i.e. data structures, control flow, etc) rather than on typing, does have an advantage.
Holding down the left or right arrow key while waiting for the cursor to move to the end of a line, or reaching for the end key is distracting and interrupts concentration, even if it is brief. Waiting for a cursor to move puts a greater strain on working memory because it means maintaining state information, in memory, for a longer period of time. While these distractions are somewhat minor for a single line of code, they really add up when you're' coding for 8 or 10 hours a day. In fact, I find these distractions add up to the point where I need to be editing in Vim or a good IDE to get in a state of flow.
Now, before someone calls me out on it, I'd also suggest that I don't believe using vim or an IDE increases the load on working short term memory. When you're initially starting out with a new tool, obviously it does increase the working load on memory, but once the key bindings are committed to muscle memory then, almost by definition, you're no relying on working memory.
I am no stranger to 16 hour coding marathons. In fact, about 15 years ago I launched a company out of my garage. For the first nine months or so I nearly locked myself in the garage for 16 to 18 hours a day coding. The work required a combination of Verilog for the FPGA, C for the embedded processor and Visual C++ for Windows. Three different editor/IDE's: Xilinx ISE, Keil uVision and MS Visual Studio. Over the nearly nine months of intense 12+ hours of straight solid coding in that environment I could not give you one example of situation where having to reach for the "END" key, the mouse, the arrow keys or "Ctrl-F5" or whatever bothered me in any way imaginable. The IDE's and the text editors, for the most part, were relegated to background noise.
The things that slowed me down, caused grief and broke my short or long term concentration and my ability to maintain state have never, in my thirty years of programming, had anything whatsoever to do with the editor and the keystrokes I might have to use running it.
Anecdotally I will make a blanket statement and say that this is exactly the case for the vast majority of programmers. No, I don't have data other than to say that I have worked with lots of people over my career. Across platforms, languages, tool chains and editors I have never heard anyone complain about loosing state or concentration due to the editor. Until I started reading HN.
Is there a type of personality, a type of programmer that can loose state from something as insignificant to some of us as reaching for the mouse or the arrow keys constantly? Maybe, I don't know. I have yet to meet someone like that in person. If the answer is "yes", I'll have to simply take your word for it. I don't know.
It might be also important to consider for a moment that those who have NOT forced themselves to use vi/vim are perfectly comfortable with the keystrokes and commands typical modern editors use.
If you stick to Windows and even Linux GUI the vast majority of the navigational commands are the same that you might find in MS Word, Excel, Outlook and your web browser. The "Ctrl-C", "Ctrl-V", "Ctrl-X", "Shift-[down arrow]", "Shift-[end]", "[home]", "[end]", "Ctrl-[left arrow]", "Ctrl-F", "Ctrl-H", "Ctrl-S", "F3", "Shift-F3", mouse scrolling modes and other commands are part and parcel of this "muscle memory" a lot of vim proponents mention.
In other words, nobody thinks "oh crap, I have to reach for Ctrl-F again", it just happens. And, it happens with great uniformity across platforms, applications and tools. Various tools introduce a few (or a lot) of specialize commands, like "Ctrl-F5" for "compile and go" on an IDE, "Ctrl-B" to "build" or "F12" to launch your site on a browser on something like Dreamweaver. These are not and have not been problems for anyone with whom I have ever worked.
Here's what I find interesting. I was using real terminals and 300 to 9600 BAUD teletypes over real leased lines talking to mainframes towards the very tail of that era in the 80's. I even had a little bit of experience using Tektronix storage tube terminals (one of the few ways you could render APL characters at the time). All of these had crippled keyboards with half the keys we have today. Editors at the time were weird and had shit user interfaced due to the limitations of the hardware. Every single one was different. Either you had modal editors or editors with weird Ctrl-<something>-<something> keystrokes. When CPM and S100 computers came along you could get WordStar and eight inch floppies. Ctrl-K-X brother! I even owned a real DEC VT-100 terminal.
I think I can safely say that those of us who came up that route were GLAD to get rid of these shitty UI's and crappy contorted-command editors that were a pain in the ass to use and learn. As keyboards and peripherals evolved and we got things like "standard" keyboard with expanded key sets (Thanks, mostly to IBM and the PC revolution) things began to standardize around the newly available keyboards. No programmer in their right mind would write a text editor at the time and IGNORE all those extra keys. The only way you could even consider writing something like vi is if you didn't have any option but to write vi due to hardware limitations.
And so, what I find very interesting is that here we are, so many years later with better hardware, software, multi-monitor GUI's and computers with gigabytes of memory and direct DVI connections to the monitors and we have a class of programmers that insists that --to be effective and to be considered a professional programmer-- you have to use a tool who's only reason for being designed as it was thirty years ago is that the writer had a keyboard with half the keys, over a 300 BAUD modem, a crippled terminal, limited memory, no graphics, 80 x 25 characters and no screen buffers. Please understand how someone like me could see this as being nothing less than ridiculous. Even vi's author relates the story of having gone down the path of adding windows to vi but loosing the code in a crash and never going back to re-creating it (the implication being that vi was already on a path to become a totally different product).
Anyhow, at some level, of course, to each his/her own. My problem is with vim zealots who in places like HN tend to give newbies the idea that there are magical qualities attached to adopting the "cult of vim". From my perspective nothing could be farther from the truth. And, as I have stated, from a business perspective, there are far more important and significant levers and knobs in a business to focus on than which editor you are using.
"hjkl is faster than reaching for the cursor keys". Holy frigging crap! Really? You are so good as a developer that MILLISECONDS make a difference? It does not take you hours to come up with algorithms or program structures to solve problems. And, when you do, you write code at blinding speeds (using vim) with NO BUGS, therefore MILLISECONDS matter because you are not one of those programmers who will need to spend HOURS hunting down and fixing bugs. Oh, yes, and 100% of your time is spent coding. You don't lookup documentation and you don't do any file management at all. You are a damn coding machine who can actually measure productivity by the millisecond and who must absolutely use the shittiest possible UI in the context of modern hardware to shave milliseconds from your every keystroke. You never reach for your iPod to look for music or read through HN, Facebook or even your email throughout the day because that wastes minutes. You never take a break, shoot the shit or theorize and ponder with your coworkers because you measure your life by the MILLISECONDS of flight time difference between the hjkl keys and the up, down, left, right keys 12cm away.
Right. The reality is that this is just a "I belong to the club" delusion that has nothing whatsoever to do with being a good programmer, writing good, clean, usable, extensible, reusable, fast, efficient and bug-free code. It has nothing whatsoever to do with delivering a product anyone wants and doing that on time and on budget. It has nothing whatsoever to do with being an entrepreneur, building a company, paying the bills and delivering value to users and investors alike.
It has everything to do with being a complete child and refusing to understand that there are places where you could optimize your time and energy that represent, without exaggeration, PRODUCTIVITY GAINS IN THE ORDER OF MILLIONS TO BILLIONS OF TIMES GREATER than the time required to reach for arrow keys or, Darwin forgive, the MOUSE (yes, he used that word) a few hundred times per day.
Grow up!