16 ms·
Just Use Sublime Text
- schmidtty 14y agowhy?
- chetanahuja 14y agohah ha. Obviously the op needs to start learning emacs. Note: j/k lol guys.
- christiangenco 14y agoNot to mention most of the vim keybinding benefits are already there in Sublime. Most developers I know now know enough vim to use it in a pinch for editing on remote servers. What I'd really like to see to handle even this edge case is a browser implementation of Sublime. Now that would be cool.
- elliottlan 14y agoNot exactly sublime text but check this out: http://icecoder.net/ http://icecoder.net/
- MetaCosm 14y agoNo. This simply isn't true, Sublime Text 2 has one of the least complete examples of a "vi-mode" I have used. ViEMU, Emac's EVIL, XVim for Xcode, all seem much better thought out and break less muscle memory than Sublime Text 2's vi-bindings. Sublime Text 2 left out all of Ex... seriously. The only major upside is that Sublime Text might have a 3rd party step in and fix its broken vi handling (someone started to do this with VintageEx).
- yen223 14y agoWhy do we always put Vim bindings on a pedestal? It seldom makes sense - why hjkl and not ijkl? why u to undo but ctrl-Y to redo? -, it doesn't conform to modern conventions, and learning how to use it is a real uphill battle. One of the more underrated features of Sublime Text is the Command Palette. Just by pressing ctrl+shift+p, you can access almost any command, without having to memorize some arcane shortcut key. It is an incredibly powerful feature - one that I really wished Vim had.
- Shorel 14y agoAgree. BTW, the Ubuntu HUD does the same for any set of menus in a compatible application. Hit Alt key, access all the menu commands.
- r00k 14y agoThe author has some points, but sadly they're mired in a lot of inaccurate ranting.
- xutopia 14y agoI agree with you. I think he's spot on about how the editor should know more about common languages like HTML and Javascript out of the box. It's frustrating to me that formatting is still bad despite my attempts to make it better.
- lucian303 14y agoThis is one of many vim plugins for Sublime. I really don't understand posts like this (although it's quite hilarious). Every major IDE and text editor worth consideration has a VIM keys plugin. Other than that, one can find at least two or three IDEs or text editors for any major language that will do what vim does and more. Using the best tools for the jobs is a mantra much repeated but hardly practiced. Asking a new engineer to work on vim (or emacs or any antiquated editor) would indeed be stupid and I would question any engineer's sanity who would suggest such.
- throw_away_acc 14y agoPoint well made and so true. Vim definitely appeals to minimalists and it's non apparent design and GUI makes it sexy. But I totally agree that's it's not worth to learn Vim nowadays and people using Vim in general just want to show that they are some real hackers.
- purplelobster 14y agoI spend 90% of my time thinking or debugging, not writing/editing, so I feel like it's optimizing the wrong thing. If you're typing with two fingers, don't use any shortcuts and only use your mouse to move around, then by all means try to improve. Personally, I don't feel it's worth it. Sure, you should know your tools, but I feel many programmers take it to the extreme with Vim/Emacs and Dvorak keyboards.
- griffordson 14y agoVim literally saved my career. I have not found a mouse that I can use 8 hours a day (let alone 12+) that doesn't cause me severe hand and wrist pain after a few days. Using Vim, and Vim keyboard shortcuts in every program I can, is the only reason I can use a computer at all. And since I so rarely use a mouse now, I can actually occasionally play PC games again with a good weighted gaming mouse if I don't overdue it. That is a treat. When I was in my 20's and early 30's I rarely thought about optimizing such things. I thought people who obsessed over Vim/Emacs were a bit odd. Now I'm one of the odd ones. I hope you never have a need to resort to such arcane arts, but if you do, Vim and Emacs will be waiting for you.
- cjh_ 14y agoSimilar story for me, I'm 21 and due to bad computer and mousing habits I have quite nasty RSI/OOS in my wrists. Switching to an ergonomic mechanical keyboard (kinesis advantage) and a keyboard-heavy workflow (vim) allows me to work as a developer. I can tell how often I resort to using the mouse each day by the pain when I get home (I have a trackball on my left hand side and a touchpad on my right hand side to try alleviate this), thanks to not using the mouse all day I can often game for a few hours without too much trouble. This isn't necessary specific to vim, however vim's modality and extremely expressive command language really minimize the amount of movement I need to do for any given action, no more emacs-pinky for me.
- griffordson 14y agoMy current development machine is running Linux with Xmonad (Vim keybinds). I run console Vim inside Tmux (vim keybinds). I run Vimium in Chrome. I have also remapped the caps lock key to CTRL in every OS I use (all of them) to avoid reaching for the CTRL key. I've also retrained myself to use C^[ for ESC rather than remapping "," or something else. C^[ works in a lot of places too, so that is a nice bonus. I can usually code for hours without using the mouse at all unless I'm using Chrome's dev tools. Before switching to Vim a few years ago I got a Comfort Keyboard to see if that would help. But after switching to Vim I find that I don't need anything other than a normal keyboard so far. I hope that doesn't change for the foreseeable future. I hope you continue to find ways to improve your situation. It seems like things just keep getting better for those of us who need to avoid the mouse as much as possible.
- fumonko 14y agoMy friends, I had not intended to discuss this controversial subject at this particular time. However, I want you to know that I do not shun controversy. On the contrary, I will take a stand on any issue at any time, regardless of how fraught with controversy it might be. You have asked me how I feel about vim. All right, here is how I feel about vim: If when you say vim you mean the antiquated relic, the impossibly-steep-learning-curve editor, the maddening modal machine, the most discouraging interface, which infuriates experienced users, confounds new users, and yea, literally takes the mouse from your hands and sets it on fire; if you mean the editor that takes every other editor and stomps them into the floor, shouting all the while, "I am better than you!" as you look on in total despair, then certainly I am against it. But, if when you say vim you mean the savior of efficiency, the feature-complete friend, the wise teacher, the universal helper, that is there no matter what the task, that asks only for your patience in return for life-long skill, that teaches new lessons right when you think you have mastered it, that frees you from reliance on the IDE and says, "rely only on yourself"; if you mean the tool that becomes a personal, intimate companion to anyone who has the fortitude to let it, then certainly I am for it. This is my stand. I will not retreat from it. I will not compromise. (Borrowed from the "If-by-whiskey" speech, delivered by Noah Sweat in 1952. http://en.wikipedia.org/wiki/If-by-whiskey http://en.wikipedia.org/wiki/If-by-whiskey)
- flippyhead 14y agoNicely done, sir.
- Arzh 14y agoI was thrown a bit when he say's "To code in Vim, you have to keep Vim in your head just as much as the code that you’re editing. You have to constantly think about what you’re doing." I have a few coworkers who work completely in vim while the rest of us use Visual Studio. I ask them questions about vim usage and usually they have to think a while about what they actually do because using vim is second nature to them.
- readme 14y agoYeah. I do not have to think about what I'm doing in vim, when it comes to normal text editing. To be quite honest, getting up to normal-editor level with vim shouldn't take more than a month to become comfortable. Learning to move, yank, paste, and navigate windows is not hard and you really don't have to think about it. More advanced usage I have to think about, but that's no different than if you had to think about what you were doing in sublime when you clicked search and replace and started typing in a regular expression.
- onso 14y agoHow about modifying code on servers?
- torpy 14y agoThere's the brilliantly awesome (and I cannot stress this enough) rmate/rsub extensions for Sublime Text. https://github.com/henrikpersson/rsub https://github.com/henrikpersson/rsub
- MetaCosm 14y agoThanks for this link -- for my coworkers who use Sublime, this seems like it is an improvement over what they do know (create a shared directory on their computer to the VM's files).
- vacri 14y agoYou use Puppet for that.
- drdaeman 14y agoFirst option: don't directly modify code on servers. Deploy it. Second option: Use sshfs and autofs. Works straight at kernel's VFS layer, which is IMHO way saner than any kludges like netrw/rsub/TRAMP/etc.
- msoad 14y agoIn my opinion, relying on keystrokes for doing things is not a problem but a future. If you use Sublime Text very often and try to learn tricks you will find yourself touching mouse less and less. The problem with Vim is that it is not designed for my shiny MacBook Air keyboard, it can't get benefit from all modifier keys other GUI text editors uses. I don't know much about computer history, but I believe keyboards that Vim is designed for didn't have any modifier key but Escape. I guess they didn't have Shift too. That's why old programming languages are all uppercase. Anyway, don't love your technology: http://prog21.dadgum.com/128.html http://prog21.dadgum.com/128.html
- ths 14y agoIf you want ⌘S, ⌘C, ⌘V etc., try Macvim (https://code.google.com/p/macvim/ https://code.google.com/p/macvim/). I use it for longer coding sessions (more colors, faster rendering when in fullscreen with split panes), and terminal vim over ssh when working on a remote server. Also, I map Caps-lock to ESC on my mac, easier to reach (and who uses Caps-lock anyway).
- nobleach 14y agoThey actually had META, SUPER, and SHIFT (someone please correct me if I'm wrong on which ones. I'm trying to remember which one came from ALT, and which one we now use the 'Windows' key for) The point is, all modern keyboards basically have what keyboards have always had (unless you're counting those old Lisp machines or a 5250 for an AS/400 or something) 4 modifier keys.
- kbar13 14y agothis guy's trolling right?
- manicdee 14y agoJust use what is most appropos in context. I use vim over ssh connections because vim was designed to be used over slow/high latency connections. You can't fire up BBEdit or Sublime Rext on the remote end and get reasonable performance locally unless both ends are on a decent high speed network, mostly due to the need for screen sharing. No need to rant.
- kecebongsoft 14y ago1. People who want to learn sublime will use sublime. 2. People who want to learn vim will use vim. I've tried many editors before vim, and now I'm solely using vim, I mean, the whole thing about it. The integration with tmux, ssh, working with all the shortcuts and command magics, its community, everything. I realize this is the editor I wanted to use. I can spend hours doing things in terminal, seamlessly with vim, most of the time I didn't produce either good quality or good amount of code, but I enjoyed every minutes of it. I'm sure people feel the same way about whatever editor that they use now, if they don't, let them pick whatever new editor they wanted to learn. Why all the hate?.
- jcoder 14y ago"The Editor You Need To Read (At Least) Two Books On To Use Well" Read :help. I haven't read any books on Vim so I'm not sure if there are any good ones, but you most definitely do not "need" to read one. "The point of a mouse is to make arbitrary on screen jumps efficient, and it’s very good at doing that. Don’t you ever think you can beat a mouse. Only in very few edge cases will it even matter." That's kind of ridiculous. When you edit text, your "jumps" are not arbitrary—they have a structure to them, and Vim lets you express your movement within that structure very efficiently in terms of lines, words, sentences, search, etc. With a mouse or trackpad, you have to move away from the keyboard, make a movement to the general area you are targeting, then fine-tune your target down to a space between two characters to insert the cursor. "Pathogen, the first widely used, known, and celebrated path manager making plugin management possible, was released in 2008! Before that, you were encouraged to recursively copy the plugin’s directory into your Vim folder." And before 2008, Sublime Text was nonexistent. What's your point? I have used a plethora of plugin systems, and Vundle is the pinnacle of all of them. Simple to install, remove, and update. "700 hand written lines in my .vimrc, and 45 plugins" I may have found the problem. Learn to use the editor.
- msutherl 14y agoAs somebody who recently switched from Vim to SublimeText, I agree and disagree with much in the article, but the point about the mouse is interesting. For years I believed that eschewing the mouse was speeding me up. But I recently had the pleasure of working with a fine gentleman, and a SublimeText user, who is an absolute fiend with the mouse. He has considerably more development experience than I, so it is not an unbiased comparison, but I believe his raw editing speed was a bit faster. This confirmed my suspicion, originally triggered by reading about the Acme[1][2] editor in Plan9, that such a workflow can be quite efficient. [1] http://en.wikipedia.org/wiki/Acme_(text_editor) http://en.wikipedia.org/wiki/Acme_(text_editor) [2] http://www.youtube.com/watch?v=Pydckb9ZU8Y http://www.youtube.com/watch?v=Pydckb9ZU8Y
- catenate 14y agoIn my experience (11 years with Emacs, then 8 years with Wily/Acme-SAC/Acme) using the mouse is much more efficient than typing to move the cursor and select text. Acme takes it a step further by binding cut and paste to mouse chords. Guide files are the big win, though, since I edit and reissue commands (highlight and middle-click) instead of retyping them.
- jchiu1106 14y agoVim is one of those things you have to suck it up and learn it but after you did, it's so much more productive than most other editors. Editors like subl may seem friendly to beginners but your productivity never grows the more you use it. I use vim exclusively and I have co-workers who only use subl, and I can confidently say I can edit code at near the speed of thinking, which is not something I can say for subl users after pair-programming with them. You just have to learn it, period. It seems daunting but it's not as hard as some people make you believe it is. I admit vim's plugin system is bad and vim doesn't have a nice API subl has for extensions, but there are experts who write great vim plugins so you don't have to and worse comes to worse, you don't have to load up your vim with plugins to be productive. I have another co-worker who uses vim and is very productive and does not use any plugin at all. Finally, if you're a new developer, don't listen to the op. Spend a few weeks to learn vim, or emacs for that matter, and you'll be so much better off in the long run.
- ob 14y agoI learned emacs first and became reasonably proficient in it. Some years ago, I joined a company where most people used vi. I saw it as an opportunity to use vi (also vim) and I already knew a bit of vi from editing unix config files. I spent almost 3 years working exclusively in vi. I got used to it enough to handcraft my own .vimrc file, use multiple buffers, integrate with ctags, etc etc. I think I was reasonably proficient in vim at that time. At around that time, I did a coding project with a friend who was an emacs user and when I say him code I thought to myself "Wow, he flies!". That day I dumped vi and went back to emacs. I've never looked back. Emacs' macros, different modes, integration, shells, etc, etc, let you deal with all sorts of systems in a pleasant way. Learning emacs is a much better investment than vim.
- d0m 14y agoI think the OP has never seen a very efficient VIM user crack some code. There are some valid points but they are surrounded by unnecessary ranting and lack of knowledge. >> Don’t you ever think you can beat a mouse. Only in very few edge cases will it even matter. Already saw someone clicking the "Search" button on a google page instead of pressing Enter? This is the same sensation I get when I see someone editing code with the mouse. These same people also scroll a document instead of jumping to the definition or using incremental search. Btw, not that I have something against programmers who use the mouse in their editor. Just don't say it's as fast because it's not.
- msoad 14y agoI agree. I would say even if you are using Sublime Text don't touch the keyboard. You can do EVERYTHING without mouse in sublime text.
- rdw 14y agoMany of the most productive programmers (in terms of text editing ability) I know are heavy mouse users. Watching them work really opened my eyes and taught me a few good habits. One of the skills that you have to develop is the ability to hit very precise targets with the mouse very quickly. I think that a lot of people are simply inexpert with the mouse and misclick a lot, and that adds to the perceived cost of the mouse in their head. But I assure you that if you can reliably hit targets with your mouse it will unlock productivity doors for you. Want to rename an identifier? Double click it with the right hand, Ctrl-<replace> with the left, tab with left to proper position in dialog while right hand is returning to home, type replacement, hit enter a few times. Adding a prefix to a bunch of strings? Click-drag to select the prefix while hitting Ctrl-C (stretching the pinky to reach the Ctrl takes about as much time as the entire click-drag), click click click on all the places you need it to go, timing the clicks with Ctrl-V on the left hand, scrolling with the wheel as needed. Very, very fast. I suppose that describing it doesn't do it justice; I certainly wouldn't believe it if I hadn't seen it with my own eyes repeatedly.
- Daegalus 14y agoSee, I have tried so many times to use and love VIM, but I can't. I feel its a monstrosity. I find "nano" 1000000x better for quick editing on a server. Most servers I have worked with, have it. I only use vi/vim if i REALLY REALLY have to. Hell, I even did VIM Adventures. I like a lot of the hotkeys and shortcuts for stuff, but its weird. I am much happier and productive in IntelliJ and Sublime. and if I do something in command-line. Its Nano that I use. I think its mostly the hotkeys and the lame "insert" and "command" mode seperation. I want to be in both modes. Hence I like the hotkeys on most IDEs.
- vacri 14y agoYou are never in both modes. In another editor, as soon as you press Ctrl, you have flipped the mode. 'command' mode is a bit like having a 'ctrl-lock' key.
- ebbv 14y agoAm I the only person in the world who: a) Never thought vim was that hard to learn (and I first learned it when I was a teenager and nobody helped me. I switched when someone on a MUD made fun of me for using pico.) and b) Thinks vanilla vim works just fine. Seriously my vimrc is like 10 lines long and I don't even have it on every server I work on. I don't bother with any plugins. I don't need vim integrated with git, I don't need it to do anything except let me edit text efficiently. I dunno maybe I'm crazy. EDIT: I also often feel like I'm alone in not treating what tools (including text editor) I use like it's a religion. I don't care if anybody else uses vim or not. People should use what they wanna use, what do I care? These kinds of rants make me wonder what kind of medication the OP stopped taking. If he hates vim so much stop using it. It's clearly causing him a lot of misery.
- MetaCosm 14y agoHe tried to turn vim into an IDE, a role that vim specifically decided not to embrace, that will make anyone go a little crazy. Vim is good at editing text, is extremely portable, and works great with a partner in crime like tmux. I have used vim for 12+ years, and the complexity of his setup makes me a bit dizzy.
- DelvarWorld 14y agoWhat languages do you normally edit? Are you employed?
- pekk 14y agoThere is nothing wrong with using vim's intentionally built in extension mechanisms.
- MetaCosm 14y agoThere is nothing wrong with using them, except that (as the article points out) they don't work terribly well, take a lot of effort to get right, and aren't the focus of the editor. Sublime and Emacs are joys to extend versus Vim, that doesn't mean it can't be done, just that it is tough.
- shurcooL 14y ago> Vim is Oddly Bad at Indenting Since he mentioned indenting, let me ask: how do you properly indent JSON or XML in Sublime Text 2 out of the box? I've tried setting the appropriate syntax, selecting all text, then doing Edit->Line->Reindent but it gives half-broken results. Is that intentional, or am I doing something wrong? Also, is there a way to quickly select all instances of currently selected identifier within the local scope? Selecting one _highlights_ all other local scope instances, but how do I make it select them all with one action?
- Cyykratahk 14y agoCtrl+D to select the next instance of the current selection.
- shurcooL 14y agoThanks, this is the best I've found. But it doesn't select all the instances within local scope (which happen to be highlighted, so it's not stretch to imagine being able to select them all), you end up having to do it manually by starting with the first entry and then carefully select all others that still fall within the local scope. Isn't it a pretty common thing to rename local variables? I'm not sure why it's not a readily available feature.
- Shorel 14y agoIn sublime text the shortcut is Alt-F3. You get one cursor for each instance, so you can select and then edit all at the same time. I'm sure it is a readily available feature. In fact, I use it every day several times since I first installed ST.
- shurcooL 14y agoAdditionally, does anyone agree with this bug report (or is the current behaviour expected) at the bottom of http://sublimetext.userecho.com/topic/52275-down-arrow-doesnt-make-cursor-go-next-line-if-text-is-selected/ http://sublimetext.userecho.com/topic/52275-down-arrow-doesn... If so, what can be done to make it more visible?
- nthitz 14y agoCan anyone explain that one liner at the end? :set tw=10000 | norm gggQG
- ktsmith 14y agoI'm probably forgetting something but it should just be setting the terminal window to 10000 characters. So basically for the entire document word wrap won't happen automatically until a line reaches 10000 characters long.
- zalew 14y agoincreasing the default 90 characters linebreak to 10k and reformatting the content.
- Kluny 14y agoIt changes his 80-column block of text to justified, I think. He mentioned needing to look that up.
- gsb 14y agoI think he has a typo at the end which should be gggqG where gg means motion to top of file, gq means reformat over a motion and G means motion to end of file.
- wting 14y agoHooray, another tools discussion where nothing gets resolved. Tools are a highly personal topic, what works for one person doesn't necessarily work for another. My advice is to try using one and only one new tool a week. By the end of a month you'll have a good idea of what your own preferences are and the relative strengths/weaknesses of others. With editors, that'd probably be a gamut of vim, emacs, Sublime, Eclipse, and Visual Studio Express. If you're a Java developer, IntelliJ is worth looking at. > [...] I’m going to go search for how to do it. I’m probably going to learn something in the process. At year 4 of Vimming. I don't get why this is a bad thing. I've been programming for decades and still learn new stuff every week. It should be noted that vim and emacs definitely appeals more to the maximizer over satisficer personality: https://en.wikipedia.org/wiki/The_Paradox_of_Choice:_Why_More_Is_Less https://en.wikipedia.org/wiki/The_Paradox_of_Choice:_Why_Mor...
- readme 14y agoMove over emacs, sublime is here to take your spot in the jihad.
- readme 14y ago>:set format=html and then gg=G. Let me know what you get. In all seriousness, never, ever tell me what you get. 'format' is not a vim option. Perhaps he meant filetype?
- ozataman 14y ago1. I like learning new tools and I got pretty good at vim's 10-15 fundamental commands in probably a couple of weeks. I was certainly OK, albeit a bit slow, by day 2 or so. 2. By the end of month 1-2, vim had become completely second nature. I did stuff without thinking. Actually, thinking about what I was doing started to confuse me. 3. Sure we all spend lots of time thinking, but I also often find myself cranking out code and vim is quite amazing for that. 4. I ended up switching to emacs because a) I like learning about tools (see #1) b) emacs gives you a more IDE-like experience c) while retaining 90% of vim's editing power d) and in general has the similar "become an editor expert" philosophy to optimizing editing workflow I haven't used sublime, but I'm quite fond of editors that are keyboard-only (especially for jumping around, etc.), cross-platform, have stood the test of time and have endless extensibility. edit: I have customized both vim and emacs to crazy depths. There was a time when just as I started to code, I'd say "why can't I do this [blah] drudgery automatically?" and end up writing an emacs function to do it :-)
- jaequery 14y agoat the end, emacs always wins :)
- ozataman 14y agoSorry for the cliche, but the obligatory: http://xkcd.com/378/ http://xkcd.com/378/
- ths 14y agoI rock back and forth, depending on the languages I'm using. Emacs does more, but is in my experience more kludgy, even after having in aggregate spent many days customizing it (maybe it would rub better if I wasn't hardwired to the vi/vim modal editing/motions method). Vim feels cleaner and less annoying, but sometimes the easy integration with external tools tips the balance in emacs' favor. E.g. I use vim for Rails apps (where I didn't really feel enough difference from vim + terminal), but if I were writing Clojure, stuff like the repl integration would probably mean emacs. Sublime is really pretty, and has great functionality out of the box. Ultimately, vi/vim's contribution is the modal editing method (and derived things like motions), which can be transplanted to any other IDE or editor that cares to support it. But for the fundamendals - editing and switching between files - I've so far found vim to be the cleanest, most natural vim.
- elteto 14y agoEvery time I read these comparisons I can't help but picture two guys arguing about screwdrivers: Guy 1: Hey, mine is a flat head, definitely better! Guy 2: Nah, mine is a Torx, shiny and fancy, definitely superior!! And these two guys always seem to forget that one works as a carpenter and the other one services electronics. I can't see much rationality in the argument.
- lowboy 14y agoAs an occasional carpenter, Robertson or Philips are far superior and I can't see any carpenter choosing a slot (flathead) over them. https://en.wikipedia.org/wiki/List_of_screw_drives#Robertson https://en.wikipedia.org/wiki/List_of_screw_drives#Robertson https://en.wikipedia.org/wiki/List_of_screw_drives#Phillips https://en.wikipedia.org/wiki/List_of_screw_drives#Phillips
- elteto 14y agoThanks for the info! But you are missing the point entirely (or rather proving it).
- lowboy 14y agoI got the point just fine, I just didn't speak to it. You feel that for Vim vs Sublime, one can only be considered superior to the other when context is taken into account, correct? Well, that's not the case with driver heads. There isn't a serious application that I can think of where slot screw heads would be superior for either carpentry or electronics. Or any discipline, really. Their only benefit is that in low-torque applications a substitute driver can be used (butter knife, coin, etc), but I imagine that is rarely a concern in practice. If you had gone with any other driver head in your example I wouldn't have been compelled to comment. As is, slot is the worst. It would be the Windows Notepad of the editor space.
- woah 14y agoUntil you need to open a can of paint. HA!
- justinhj 14y agoIf you intend to be a professional programmer for 10 years, 20 years, maybe 40 years, why is it a big deal to spend 2 years becoming adept at an editor? Vim and Emacs are both likely to be lifelong tools that will easily repay the difficult early days.
- JulianMorrison 14y agoIf you are going to become adept in an editor, Sublime text has a lot of depth and power and seems like a good one to learn.
- justinhj 14y agoFair point.
- ngokevin 14y agoThe blog's tagline seems very relevant to the origins of this post. Here comes a editor war... In seriousness, though the author makes some good points, I cannot support his arguments that a mouse can beat a keyboard and that one shouldn't recommend vim because it is ugly.
- Osiris 14y agoOne of the talking points I hear a lot about VIM is that you can do a lot with keyboard. All kinds of fancy shortcuts to move, delete, paste text, etc. I've used VIM (casually), Sublime Text, and other IDEs. Currently I'm using PhpStorm and I have to say, that thing has keyboard shortcuts that do all kinds of awesome things. Jump to a function by name, jump to the next function, duplicate the current line(s), move current line up/down, select current word/line, open file by partial name, jump to function declaration. VIM may have lots of navigation but when I want to find the declaration of a function I'm calling, I hit CMD+B in PhpStorm and I get taken either inside the file or another file where that function is defined. CTRL-J shows me a popup with the documentation for the function, CMD+P shows me the parameter list. Personally, I think IDEs can provide a lot more shortcuts that do a lot more meaningful actions on complex code projects than VIM.
- jussij 14y ago> Jump to a function by name, jump to the next function, ctags allows you to do this. > duplicate the current line(s), move current line up/down, select current word/line, open file by partial name, Any scriptable editor can do these sorts of things via a simple macro script. Now, yes the user would need to create the script, but in most case that would take less than a dozen lines of code. And once created, the script could then run it directly, via a keyboard binding or in some case via a mouse click. > jump to function declaration. ctags once again. > I hit CMD+B in PhpStorm and I get taken either inside the file or another file where that function is defined. But if you then open a C/C++, Python, Perl, SQL or a Java file in PhpStorm suddenly those features no longer work. Using the ctags approach the feature continues to work for any of the 33 languages supported by ctags.
- Osiris 14y agoI've used the ctags plugin for Sublime Text and it's pretty damn awful. Maybe it's just with PHP, but it seems to look only at symbol names and doesn't do any static analysis of the code, so if I have several functions named the same thing in various files ctags has no idea which one it should look up. It's also not up-to-the-second. It has to re-run an analysis of the whole project to update its db. It doesn't update it's cache as you edit a file. Not sure if that's ctags in general or just the ST2 plugin. Still, the point the author is making is that to make VIM useable you have to use a lot of plugins to get what you want while many IDEs provide it out of the box without the user needing to figure out what plugins/addons/scripts/config files to setup to get it to work.
- deleted 14y ago[deleted]
- deloschang 14y agoInteresting article. I accept that the seeming overstatement of "about two years ... [to] be proficient" differs case by case and may be an average or worst case scenario. Still, the next argument that "The argument that Vim is more efficient is dubious and untestable" because "developers are commonly on machines where the trackpad is a micro-hand movement away" seems to miss the critical point that moving away from the keyboard tends to break trains of thought, at least for me and other programmers I know. This is critical because it takes a while to load problems and solutions into your head. It's like building a house of cards. Looking for the mouse cursor slows down that building tremendously.
- TallboyOne 14y agoThese articles are just idiotic. Mouse as fast as the keyboard except a 'few edge cases'? Get out of here. Vim destroys using a mouse every day of the week, and unless the highest skillset you've learned is fingerpainting, it's not that hard. Sit down for 2 days, stop being a bitch, learn the keybindings, and you're good.
- baby 14y agoIf you need to make a random selection somewhere far away in the text. The mouse was made to do that. Not a multiple keyboard combination. ( I mean "if you're using a trackpad").
- tracker1 14y agoFor that matter, text selection in general is often better with a mouse.. I'll go either way (sometimes mouse, others keyboard) but I much prefer a gui editor/ide over console UI... when I am remote, I prefer nano, just get it done/save/out.
- danneu 14y agoIs the mouse for clicking the "incremental search" button?
- Bitwse 14y agoMostly agree. Easy motion does wonders for jumping to arbitrary places.
- smalltalk 14y agoUsing the keyboard seems faster than using a mouse to move the cursor because you're thinking so hard about what to do with the keyboard that you forget the time it takes to get what you want accomplished, but using the keyboard is objectively, measurably slower than using the mouse for the same task; in other words, using the mouse is actually proven to be faster for cursor movement overall. You're just fooled by your subjective impression. http://www.asktog.com/TOI/toi06KeyboardVMouse1.html http://www.asktog.com/TOI/toi06KeyboardVMouse1.html
- derengel 14y agoThis is what happens when someone from the Java over-engineering crowd uses vim. (45 plugins) Where you trying to convert vim to a eclipse IDE clone?
- kragen 14y agoThis seems overdone to me. Vim out of the box is a perfectly adequate text editor, and all you need to know to use it is /?xiap ESC 99dd :wq! and the arrow keys. With gq (formerly Q, RIP) you can then edit text. hlJG<>wbvn.fF;#% help too, especially for code, and c is nice, especially ci, which is a Vim innovation. ^F and ^B move around. Then, if you're programming, you probably want to build a tags file and use ^] and ^T. Vim has g] and g^], which sound like they'd be nice for OO, but honestly I never use them, because at the point where I want an IDE instead of a text editor, I switch to Emacs. I use Vim every day for non-code things, though. Learning the above is not going to take you two years or probably even two weeks. This is my .vimrc: set tabstop=4 shiftwidth=4 expandtab autoindent incsearch hlsearch syntax enable I've been using vi (and vim) since 1996, when I had vi installed locally on my workstation but had to load Emacs from NFS over a shared 10Mbps Ethernet. A few months later my roommate Payton Whitaker (RIP) made fun of me for using elvis, so I switched to vim, and I've been using it ever since, on probably half a dozen operating systems. I've been using Emacs since 1993, but I used Epsilon for a few years before that. I've also used Eclipse, IDEA, Visual Studio, Squeak, and XCode, among other excellent development tools. I've also written a game in locally-hosted DHTML using TextEdit (from F-Droid) on Android, which was painful. The difference is just not that big. An IDE is not going to turn you into a hacker. Just understand the system, look for limitations, and obliterate them. That will make you a hacker.
- Mahn 14y agoVim out of the box is a perfectly adequate text editor, and all you need to know to use it is /?xiap ESC 99dd :wq! and the arrow keys. With gq (formerly Q, RIP) you can then edit text. hlJG<>wbvn.fF;#% help too, especially for code, and c is nice, especially ci, which is a Vim innovation. ^F and ^B move around. As somebody who never used Vim, I seriously can't tell if you are being sarcastic here.
- kragen 14y agoI was being serious, but I appreciate that my brief precis above is impenetrable to someone who hasn't used some flavor of vi. / search forward regexp ? search backward regexp x delete character i insert before the cursor a insert after the cursor (useful at end of line) p paste ("put") the last thing you deleted ESC stop inserting (exit insert mode, return to command mode) 99dd delete 99 lines :w RET save :q RET quit :w! RET save despite write-protection :q! RET quit discarding changes :wq save and, if successful, quit arrow keys move as usual. That much gets you an editor better than Notepad (because of instant search, with bonus regexps; multiple line ending support; and large file support), if somewhat more confusing, which you can use via ssh, and which won't lose your unsaved work if your machine crashes or runs out of battery. (Although you have to learn the :recover command to recover that unsaved work.) Occasionally you'll hit a wrong key and end up in some weird mode, which in Vim (unlike vi) displays at the bottom of the screen. Hit ESC to escape from the weird mode unless you feel like exploring it. If it split your screen and added another window (q: does this) then use :q to escape from it instead. One more thing I forgot at first, which is kind of essential: u undo ^R (control-R) redo For editing text, as opposed to code, you need to be able to refill (word-wrap) paragraphs so they aren't too ragged after you edit them. The command sequence {gq}, including the curly braces, will refill the paragraph your cursor is in. That's 22 commands to memorize, which you can do in less than a day. That much already gives you an editor dramatically better than Notepad, and probably better than Pico or Nano, too. You can now move around very rapidly, insert and delete, cut and paste, save or discard changes, and refill paragraphs. Unix was written with editors less powerful than this. For additional power, a second level of common commands, once you're comfortable with the 20 or so above: h move left (without having to take your hand off the home row) l move right G go to the end of the file 1G go to line 1 (the beginning of the file) w move right by a word b move left by a word n repeat the previous / or ? search fe find the next "e" on the line Fe find the previous "e" on the line ; repeat the last f or F command % jump to the matching parenthesis, bracket, or brace # (or shift-click) search for the last occurrence of the word you're on ^F forward a page ^B back a page Plus a few more editing commands: J join the next line onto this one > indent something (>> indent this line) < de-indent something (<< de-indent this line) c change something (cw change word) v highlight something with the cursor to delete, indent, change . repeat the last edit (insertion, deletion, or change) ci" change inside "" delimiters ci( change inside () delimiters (etc.) ^P, ^N in insert mode autocomplete the current word So that's another 25 or so commands, and now, after three days of vim, you can jump around in code like a madman (albeit in a single file); insert long method name identifiers with a few keystrokes; do interactive search and replace, using /, cw, n, and .; reindent blocks of code; and cut and paste in a more interactive way using v. At this point you probably want to set a few options, which you can enter using : or put in your .vimrc without :. :set incsearch makes / and ? search incrementally :set hlsearch highlights search hits :syntax enable enables syntax highlighting :set shiftwidth=4 makes < and > indent by four spaces :set autoindent begins each new line with an indent :set expandtab avoids putting TABs in the file (holywar) :set textwidth=72 auto-word-wrap at 72 columns Except for the last one, you probably don't need to learn these; just leave them turned on all the time. They're mostly turned off by default for backward-compatibility. There are some other commands I use on a regular basis (etyoIA*m',jkP|0^$^V^Z^GVC{}~:s) and others I use more rarely (Uq@, ZZ, :help, :set paste and :set nopaste, ^T and ^], ^W stuff, modelines, backreferences in regexp replacements) but I'm not confident that all of these are actually even valuable; I think knowing some of them just slows me down! And of course there's lots more of vim I don't know at all (the jump list, quickfix, grep, spell-checking, cindent, cscope, abbreviations, editing files inside archives, the file explorer, folding, Arabic, Farsi, Hebrew, multiple buffers, key mapping beyond :map, and everything to do with plugins, to name a few areas).
- baby 14y agoCan't agree more. I've tried learning Emacs for a very long time. I've read the emacs tutorial (which wasn't that easy to read) and now I'm having a hard time using it. I don't really know how I can get better, I always hit the wrong keys, I always forget how to do one thing... In the end I just gave up and learned Sublime Text 2 (on the free tutorial on tutsplus). In one day I was amazingly efficient. I'm glad I learned emacs because I can use it in a terminal. But when I'm not in a terminal, I have no idea why a modern programmer would go through heaven and hell just to learn an IDE when Sublime Text 2 let you code directly and learn along the way.
- jaequery 14y agoi think a lot of people miss the whole point of emacs/vim. it sure ain't the best IDE out there, but when it comes to just pure raw editing fun-factor, it just can not be beat. i can not get the same enjoyment when i edit using anything else, there are emacs/vim plugins for sublimetext but still it doesn't have that same feel to it. it all comes down to the vim/emacs "experience". it hooks you in and won't let you go, i'm pretty sure most vim/emacs gets some sort of high when using it. but it's not all black and white here, there are time and place for everything. i love emacs and i can't live without it. for working on a few files at a time, i'll use emacs. but when i have a "project" to work on (10-15 files), i do use an IDE, in my case Aptana Studios (as it has the best emacs compatibility out there and has a very nice code formatter which is also top notch and you can easily customize it to how you want it to be formatted i.e; coding standards). so at the end of the day, they both have their place. sometimes i need the laser-guided efficiency of emacs, sometimes (especially beginning of a project), i just roll-up my sleeves and get it going on an IDE.
- namuol 14y agoThanks for articulating the thoughts I've been having for the last few months after switching to Sublime Text. I registered my copy the instant after I installed my first package with Package Control and it Just Worked. Yes. It has improved my quality of life as a developer, and my pride isn't even damaged that much after using Vim for the last 7 years.
- calhoun137 14y agoA lot of comments are saying that Vim will massively increase your productivity, but I think that is completely missing what being a productive programmer is all about. Just being able to type and edit things quickly isn't even half the battle, it's less than 1% in my opinion. Productivity in programming is measured from the time you start a project till the time you finish. So much time is often spent trying to find and fix bugs, and being productive is all about writing code in a way that minimizes the amount of bugs that show up, and being able to quickly find and fix them when they do. Writing code at the optimal level of generality is a major factor, No amount of editor tricks can make up for choosing the wrong level of generality to write your methods. Too much generality and you are wasting time, too little and you have to deal with a bunch of special cases, or else rewrite large portions of code at some point. It's important to be able to learn things very quickly on the spot when you have no other choice, but it's better to be able to immediately deal with situations without having to incur all of the productively losses that comes with doing that. So much time is saved by being able to get the algorithm's and the numbers right on the first try. It's also about a psychological battle of how hard you can push yourself without burning out, which is no trivial matter. Once you are good at all that, then basically it's nice to also be able to pick up an extra few seconds here and there with a keyboard shortcut, an editor trick, or some precision mouse mechanics.
- jiggy2011 14y agoI find it impossible to get anything bang on the first time around. I find that even the best plans and ideas can start to show problems once you get into the guts of the implementation. Being able to input and edit things quickly greatly reduces the friction involved in doing refactorings. If I can do it fast enough, why not just refactor 3 different ways and see which one makes the most sense? Also helps with prototyping, being able to from a conversation to a "did you mean like this?" in 30 mins is helpful.
- calhoun137 14y agoI don't disagree with anything you have said, but I also can't tell if you are disagreeing with anything I wrote in my comment either.
- stevewilhelm 14y agosome random reasons why I like vi(m): :'a,.s/, /^M/g :set no wrapscan ?def n n n (search hit TOP...) (see word nice down two lines) t t w w (till cursor is at the word 'nice') ct<space>awesome<esc> ma /end :'a,.y a $G "ap %s/\(^[0-9]\)\(.$\)/\2 \1/ :wq
- Spiritus 14y ago>Most novice programmers can click on a character on screen faster than an expert Vimmer can type 20jFp; or LkEEE or /word<cr> or any other nasty way Vimmers have to use because of our archaic, ingrained keystrokes. set mouse=a
- timtadh 14y agoSeriously. It is becomes super productive once you realize you can just use a mouse for things you have trouble remembering (resizing windows was one that I always look in the docs for). Then one day you realize you can use a mouse with vim IN THE CONSOLE. On that day you reach enlightenment.
- anarchotroll 14y agoI really don't understand what makes someone do something for 4 years that he or she clearly dislikes. He must hate his himself.
- anarchotroll 14y ago*hate himself
- ramigb 14y agoThen why not "port" sublime to the server environment.
- oelmekki 14y agoIn the next article : "Buy a lot of software and don't learn programming. It's hard, and after four years, I still can't write anything someone else didn't do better !" Not only I can confirm that after 7 years of vim, I feel really more productive than when I use any "intuitive" editor, but now I've remap all my window management (either X or tmux) to similar mapping. One point I can agree, though : vimscript is a real pain in the ass, which defeats what Bram Moolenaar say should be our process - detect repetition and automatize it seamlessly. [1] It will only be empowered when we'll have a full featured language to do so. [1] https://www.youtube.com/watch?v=p6K4iIMlouI https://www.youtube.com/watch?v=p6K4iIMlouI
- ajsharp 14y agoThis post probably should've been titled, "Don't use vim. Use something else. Sublime Text, if you like."
- tekniiq 14y agoHow would you surround selected text in gvim with parentheses? I've been using it a bit recently, with help of a touch pad I think it could be ok.
- wrboyce 14y ago> Most Vim plugins haven’t been converted to Github projects yet. Well that just isn't true: https://github.com/vim-scripts/repositories https://github.com/vim-scripts/repositories His issue with vimscripts being not being on github seems to be made up. Also, `:set format` isn't an option… `:set ft=html` I presume.
- combataircraft 14y agoJust Use Emacs. You have no idea what you are missing.
- pramodliv1 14y agoWhen it comes to remote typing, it's trivial to build a simple file syncing script using something like python watchdog. I use it to avoid typing remotely as much as possible.
- nicholassmith 14y agoThis sums up basically every problem I had with vim. It's great, but it took significantly less time to get up and running and productive with Sublime. I know people who are the exact opposite and took to vim like a duck to water. Upside is at least we have two great editors now.
- daGrevis 14y ago> For the first 1-2 years of your Vim usage you will be much less efficient than your current editor. I stopped to read right there. I was equally productive after two weeks and more productive after a month.
- kamaal 14y agoAlmost anybody who associates great programming with things like super keyboarding skills and muscle memory is unfortunately degrading the status of programming to mere typing. What is it that is so distracting and pulling you out of your zen when you use a mouse? Seriously you type so fast and code at the speed of thought that a little glitch here is like making a mistake with a Formula 1 car in the Monaco Grand Prix? Let me tell you how real work happens and how productive people work. I am currently working with a very senior electronics guy in the night for some side projects. Watching him work shows me the path on how we programmers should be working. He will first build the base PCB with all his reusable designs and additional ones reading the documentation I rarely saw him Google anything in the past 15 days. If he has to ever get down to googling its generally to find some data sheet. Once that is done, he gets the components and meticulously builds the entire circuit on the PCB module by module. Every time he builds the module he tests if the inputs and outputs to it are as he designed on the PCB. It took a well whole month with each sitting spanning hours to get the whole PCB working. When he was done, the entire PCB worked like magic. The manufactured one's too. And there wasn't a single problem/bug. It was so spotlessly done. It looked like art work. Yet the pace at which he solders, or used the CRO or multimeter hardly matters or is even relevant. And yes, he hardly rushes or goes in a rash break neck speed in doing anything. So here is what I learned. Firstly learn to define the problem correctly, break the problem and establish a clear understanding of inputs and outputs to each module. Read documentation get a clear idea as to what it is done. Spend long hours trying to build/test each module. If possible automate testing(if its software). Spend time integrating. Go slow, the biggest productivity leaks are not in going slow. Go slow but go steady. The biggest productivity problems are in problem definition, solution clarity, distraction and procrastination. For us programmers, let us be frank. Most of us don't RTFM. We jump to googling and then go down the time sink and end up reading all sorts of articles achieving nothing at the end of the day. If possible work things out on the paper. Do use stuff like Mind Map for test cases. Learn to work things on the paper and by reading documentation. Learn good debugging tools, sound programming practices etc. That is what counts guys. Not optimizing the 1 second delay needed to reach the mouse. That's not even relevant in the broad spectrum of things.
- richo 14y agoThat's all true, but I find when the heavens open and the True Path to implementation shines down upon me, being able to get thought onto disk at roughly the speed I think is important, as is knowing my editor well enough to let me manipulate my code in much the same way I'm manipulating the abstract representation I'm thinking about. In this instance I'm talking about vim, but it doesn't matter, being able to operate on code in a context that matches the way you're thinking about it is invaluable in my opinion. That said, I felt this was a bit over the top. While I totally think that this pays dividends, I don't think it enough to write a novella like he has.
- setrofim_ 14y ago> For the first 1-2 years of your Vim usage you will be much less efficient than your current editor because of the odd yet lovable key bindings. After about 2 years you will be proficient. Really? For me it was closer to 2 months rather than 2 years. 2 months is still a significant chunk of time to invest in learning a text editor, but given that it's one of the most used pieces of software, it's worth it. > followed by knowing some cool tricks that you use in 1% of your daily workflow. If that's the case, then you are not learning the right tricks. Vim has a tonne of different way of moving and editing text. Most people don't use the majority of those. Instead, they find the subset that is most useful to them and ignore the rest. > The argument that Vim is more efficient is dubious and untestable. It is most certainly testable. Whether or not it has been tested is another question. Is anyone aware of any serious usability studies for Vim? > but developers are commonly on machines where the trackpad is a micro-hand movement away. Maybe it's just me, but I find using a trackpad a lot slower than using a mouse. > The point of a mouse is to make arbitrary on screen jumps efficient, and it’s very good at doing that. Don’t you ever think you can beat a mouse. Only in very few edge cases will it even matter. I agree that mouse is the way to go when you want to move arbitrarily around the screen. But when programming that's rarely the case. Normally, you want to move to a specific place (a particular line, the definition of the class/function, a specific place in the document). Vim allows you to do these things efficiently. > Consider that Vim has been around since 1991. Pathogen, the first widely used, known, and celebrated path manager making plugin management possible, was released in 2008! This is irrelevant. The important thing that, right now, Vim has a decent way of managing plugins. Though I agree -- it's embarrassing how long it took to get there. > Vim out of the box is awful. I can’t stress how bad of an editor vanilla Vim is. Plugins are essential to make Vim usable. This is partly true. You definitely want to customize Vim before you use it for any serious development work. But it's not like vanilla Vim is completely unusable. I ssh into servers and edit config files and write short scripts all the time. I find that vanilla Vim is more than adequate for that. Besides it's not like setting up Vim on a new system needs to be a lot of effort -- once you have your perfect setup, just stick it on GitHub. Then configuring Vim on a new system is just a 'git clone'. > Most Vim plugins haven’t been converted to Github projects yet. Vim Scripts acts as a featureless host, which is fine, except that it doesn’t offer any benefits. It has a nasty interface, and encourages the use of the Vim Wiki for project management No argument here... > Ah, Vimscript. It’s bad. And yet we’re stuck with it. Yes, I agree. But most Vim users don't really need to deal with it, as you yourself point out: > Most experienced Vimmers I know don’t know any Vimscript > Finding the right Vim plugins is like being in an exclusive club. It gets better around year 2 of your journey, then worse around year 3, then… Yup, I have to agree with this one. Though there are number of resources that recommend good plugin sets; and there things like python-mode that integrate several plugins for a specific purpose. > Everyone remaps Leader from backslash to comma. I don't. > Do you know what the suggested way to work well with multiple files in Vim is? It’s the arglist. Never used it. Fuf works pretty well for me. > Vim Is Bad By Design™ 2: GUI I really don't get this entire section. Vim uses a fixed width font because it is a programmer's editor, and not using fixed with fonts when writing code or editing configs is madness. If you want fancy typesetting, you're using Vim for something it wasn't designed for. RE Vim being ugly. It kind of is out of the box. But powerline (which the post mentions) + a custom theme + a custom font solve that. RE Vim lacking GUI. Yes that's true and that is by design. If you want a rich GUI and would prefer to use the mouse to navigate between files, select menu options etc, Vim isn't for you. > Vim is Oddly Bad at Indenting Indentation preferences vary wildly, even within the same language; Vim provides the tools to set up the indentation you need. I agree that out-of-the-box support for some common languages could be improved. Vim is definitely not for every one, but for those willing to invest the effort (and it really isn't as much as this post makes it out to be), it can be a very powerful, flexible, and efficient editor. I have never used SubilmeText (though heard a lot of good things about it) so can't really comment to what it would be a better/worse alternative to Vim. This post doesn't seem to address to what extent SublimeText solves the issues outlined for Vim, and it specifically should be used instead of Vim (as opposed to Emacs, PSpad, UltraEdit, etc..)
- otikik 14y agoIt's funny, but I find myself pretty much on the same situation as this guy. I've spent a couple years with Vim but I still don't "feel it". Oh, and I touch type, and ijkl, and all that. It just took me a too much time and effort to get used to it. A colleage asked me some time ago and I found myself telling him "just use sublime". And he's doing just fine. After two weeks, he's able to "find and replace in files" in sublime more easily than me in Vim in two years. I'm seriously considering discarding my two years with Vim as a failed experiment and switching.
- jzelinskie 14y ago:set filetype=html gg=G Was I not supposed to get exactly what I wanted? http://i.imgur.com/P6YLdRA.png http://i.imgur.com/P6YLdRA.png I do use the mentioned javascript-vim plugin. However, majority of the plugins I install are because I'm simply one short "Bundle 'user/repo'" away from trying out something I may choose to use. If I was to purposely cut down my number plugins, I probably would only keep minibufexpl and language specfics. The most important vim plugins are those that are simply improvements of basic vim functionality that are more aware of language specifics (i.e. javascript-vim, erlvim). Plugins like NERDTree look nice, but do I actually use them in practice? Not really. I barely use even use ctrl+p: most of the time using :e and tabbing my way to victory is quick enough to be a moot point. There are costs and benefits to using any editor. I've spent a large amount of my life ssh'd into remote boxes from a Windows machine. It was pretty natural for me to pick up the most common and still powerful command line editor available. I was born into a generation of kids more comfortable using 'WASD' than walking around in real life; it wasn't difficult to get used to hjkl quickly. I don't really consider there to be a learning curve more than 'it isn't obvious how to do things unless you read documentation first' which is actually to be expected. Most of us won't work with a programming language until we've read a book on it and sufficiently experimented on our own. Programming languages are a tool. A text editor is a tool. A similar learning curve seems fair to me.
- dazzawazza 14y agoMy first boss taught me it's not how much you type but what you type. I was straight out of university and I knew my shit (as all graduates do but don't). He would spend ages looking at a piece of code, scrolling around, running the app, walking about and plonk down a few lines of code. After a year of bashing out code I realised. Most coding happens in the planning, not in the mundane exercise of typing.
- dbpatterson 14y agoI don't think anyone doubts that - but it is hard to get faster at planning (and usually a bad idea), while it is very possible to get faster at typing/editing (the latter benefits a lot more from knowing an editor than the former). So if you want to increase your productivity, you might as well go after what you can reasonably expect to speed up.
- obituary_latte 14y agoSometimes I wonder about all the useful stuff that could be created with the energy expelled by people arguing about which editor/language/process is better.
- kaiwen1 14y agoI've tried switching from Vim to Sublime Text. Can't do it. It's all frustration. Unless and until Sublime Text implements the majority of Vim-style movement and editing features, I'll be using Vim. Don't get me wrong. I think Sublime Text is great. I would even agree with the OP that it's probably the best editor for people who've never experienced Vim. Vim is like falling in love. If you've never experienced it, no big deal. But if you have...
- sigzero 14y agoCan I use it in a console? Is it installed by default in any OS? Has it stood the test of time as vi/Vim has? The answer to ALL of those is "no".
- smalltalk 14y agoIs the answer to any of those questions important? The answer to THAT question is "no."
- Aardwolf 14y agoDoes it support: -git (and other vcs) integration? -showing which lines you altered with colored bars on the sides? -jumping to any file in the whole directory structure of your project by just typing a partial filename? -easily having many files open, that means, no horizontal tab layout that stops working in a friendly way as soon as the screen size is reached? If so, I would LOVE to use it!
- lsiebert 14y agoIncidentally, a vim a day site, with a vim basic topic (movement/ action with example use cases) advanced topic (buffer use. Macro, .vimrc setting) and maybe a plugin review or integration tip would be bookmarked instantly, with my ad blocker off to support the site. For the plugin reviews, I'd settle for something that let's me know what the heck a particular plugin in vundle is from the search tab.
- nevinera 14y ago>700 hand written lines in my .vimrc, and 45 plugins You're not using vim.
- gnuvince 14y agoOK, give me $30 and I'll use it.
- kayoone 14y agoNever really got that anti-mouse sentiment anyway. There are alot of great programmers that use the mouse alot and why the heck not ? I like to use key-bindings wherever appropriate, but there are things which are just plain faster by just clicking. A good combination of both is optimal imo. Which is why i cringe when i see all these new "vim-mode" plugins for everything from IDEs to browsers to email clients.
- TheZenPsycho 14y agoThe important takeaway lesson from all this is that, because this guy says a tool you use is bad, it means you, yourself are bad. And as that is a personal insult to your integrity it is of vital importance that you vehemently argue against it regardless of its intrinsic merits.
- moneypenny 14y agoGod, there's a massive sense of humour failure from HN posters today. I really enjoyed the post, he hits a lot of nails square on the head. It's a well-written, poetic tribute. TLDR: Vim is great, but it's not always, but we're stuck with other, but I quite like it really. But don't do it, kid. i.e. they're married.
- js-coder 14y ago> Vim: The Editor You Need To Read (At Least) Two Books On To Use Well Seriously? I was one of the very early adopters of ST2 (befor net.tuts wrote about it), and configured pretty much everything. I switched to Vim maybe two months ago, and I was just as productive with Vim three weeks after switching. I still learn about Vim features, and it will me take ages to really know it well, but it's seriously not that hard to learn Vim. The first one or two weeks are hard, but once you got the basic concepts, it's really easy. Switching to Vim was completely worth it. I way prefer VimL over ST's JSON settings, and I'm generally faster at editing text. However, Sublime Text is a great editor, too. ST + Vintage mode is really fun, too.
- ollysb 14y agoThe area where sublime really wins for me is discoverability. Say I'm writing some markdown and I decide I want to preview it in the browser. A short key combo opens the command palette, I type install package, hit return, type markdown, see that there's a plugin called markdown preview, down arrow and return and it's installed in a couple of seconds. I open the command palette again, type markdown preview, hit return and it's open in my browser. Follow these steps and it will take you maybe 10 seconds or so. Everything's happened without leaving the keyboard and you haven't had to learn any key combos. If you find yourself using a command a lot then you can assign a key combo. That was just an example, pretty much everything happens this way in sublime. It can all be done by searching commands from the keyboard. The command matching is fuzzy so you can actually figure out the 2 or 3 letters that bring up the command you want and you've got yourself a key combo. It's this discoverability that makes sublime a joy to use. With vim I find I'm constantly googling how to do things. With sublime learning how to do something usually happens in the editor, thanks to the command bar.
- jasonm23 14y agoAs far as discoverability goes, I think it's hard to beat Emacs, once you figure out what's going on. The big step is to start using it like a terminal, and Alt-x (M-x) is the way to begin this... Everything is Tab completable, and fuzzy matched, granted the lexicon is a little different, but it's not very difficult if you're prepared to read a bit. The fact that you can type: M-x describe-function And the get docs for any function in Emacs is really amazing, and something that completely reveals its true nature, Emacs is a huge library of lisp functions... And after 30 years or so huge really does mean huge. So frankly, forget all about Sublime and learn Emacs, it doesn't demand a Vim modal operating mode (but it'll provide one if you want it) it doesn't berate you if you want to use the mouse. It has undergone a huge amount of recent development too, and new packages are being released every day, thanks to elpa / package.el
- fusiongyro 14y ago> As far as discoverability goes, I think it's hard to beat Emacs, once you figure out what's going on. This contradiction perfectly explains everything that's wrong with Emacs.
- Mahn 14y agoPersonally I guess I'll learn vim/emacs someday, but right now I'd rather spend my time building stuff than learning an editor.
- yongcat 14y agoIf this is an argument about the text editing software/GUI, I respect everyone's opinion, but vim keyboard shortcuts is one of the best things I learned as a programmer. I use vim when I ssh, have vintage enabled in ST2, and my Eclipse has Vrapper for the shortcuts. Too bad these shortcut plugins don't have visual blocks though. anyways, hjkl is very addictive.
- davesims 14y agoI've been meaning to learn vim for years now. I started a month ago knowing basically how to fudge my way around with arrow keys and save with :w, and that's it. A couple of peepcode screencasts, a bit of daily 5 minute practice on shortcutfoo.com, and a month of pretty disciplined day-to-day coding later and I'm basically back to where I was on TextMate. I'm even using a tmux/vim setup for most of my Android coding, occasionally tabbing back into IntelliJ IDEA if I have to do any heavy refactoring, and even then I have a vim plugin going there. Is it better? I dunno, hard to say. I like it. I like the tmux-vim combination and it's been a good challenge that's kept my brain engaged. Now, I have a ton to learn, and that's awesome. But I'm at the point where I'm really comfortable making all of my changes in a vim context, without constant finger stuttering and 3 second pauses like I was doing 3 weeks ago. And it certainly didn't take me 2 years. That's nuts. Maybe 5 years ago before there were so many screencasts, tutorials and practice sites, it may have taken that long. But even then I think any disciplined coder could get up to a moderate proficiency with some daily practice, in a few weeks or months, not years. This is an old warhorse of a debate that hardly seems worthy of HN, nevertheless here is the conventional wisdom restated: vim vs. idea vs. TM/ST is a question of taste and personal developer happiness, not proven productivity. I know great coders who swear by (EMacs/Vim/IntelliJ/Eclipse/SublimeText) to the exclusion of all others. None of it matters. Was it Knuth who said, "all editor wars lead to madness and early optimization", or something to that effect?
- sophistroll 14y agoSurprising that nobody has mentioned this, but Vim is free and Sublime is not.
- super_mario 14y agoI love it when self proclaimed vim expert users talk about hjkl as some pinnacle of vim enlightenment. And what's with the 45 plugins? People who do that usually don't know how to use UNIX either. VIM is a text editor, it's not meant to replace the shell. Yes Command+T is useful, but it's not essential. And trying to shoe horn VIM into some other editor's paradigms (multiple cursors?? why, vim has better ways to achieve the same thing) is going to be frustrating. Each and every time in posts like these I get the impression the person is CPU bound rather than I/O bound.
- sc0rb 14y agoFor Java Enterprise / Spring development (or even some of the more lightweight stuff), this editor does not match up to what Eclipse offer. I want / need to see when dependencies in the code are not resolve at dev time, not compile time. I need to see the call hierarchy on various methods too. Sublime doesn't come close. If you're using a more lightweight stack where you don't care about errors until you can see them in your browser then maybe this tool is for you (looking at you PHP and Javascript) but for any SERIOUS Java work Sublime is not ready. It is a beautiful tool though. I wish there were something like this for SERIOUS Java devs.
- rbanffy 14y agoI believe we all get the guy doesn't like vim. Sometimes a specific tool that helps you with a specific task will help you be more productive. You'd probably be insane to consider doing Java programming without NetBeans or Eclipse. If you are writing code for Windows, you will get better results if you use Visual Studio. I write a lot of Python code and I prefer Emacs for that. When I code, I prefer to keep anything that can distract me away.
- richardlblair 14y agoHonestly, who gives a fuck? Seriously, use vim, sublime, emacs.. if smearing shit on the walls can be transcribed into text do that. I do not care. And neither should you. It's about getting the job done. Use whatever tools you need to do that. I use vim, and sometimes I'll open sublime for browsing code... does any of that matter? No. I get shit done. That's what matters.
- calinet6 14y agoThe problem is that people will and do argue vehemently against your choice if you even mention what editor you use, as if it affects them personally. I thank you for being one of the people confident and secure enough to not care, but sadly, not everyone is like you. And at some point you have to say "Enough! This is why I made my choice. This is what I believe. Deal with it." Sometimes you have to defend yourself. Not against you, personally, richardlblair, but against people much more annoying and persistent than you. You are exactly and completely correct, but not everyone has the provenance to be so well balanced, particularly on the Greater Internet.
- bluesnowmonkey 14y agoI'd love to, but my organization basically mandates vim.
- ldh 14y agoI think it's a sure sign that some ham-fisted buffoonery is afoot when a company mandates what text editor or IDE a programmer should use. But I'm thankful for those big red flags that signal to me that I would not be happy at this company.
- richardlblair 14y agoTime for a new organization??
- Zelphyr 14y agoI disagree that you have "to read at least two books" about Vim to use it well. I learned it by co-workers, the web (pre-Google no less), and mostly through the Vim help itself.
- Rayne 14y agoI like Sublime Text, but I really can't use it for what I need a text editor for, which is Clojure. It is ridiculously bad at indenting/formatting Clojure and when I used it for any length of time I spent more time fixing the code it mutilated than I did actually working. I posted this bug report ages ago. If you're interested in doing Clojure in Sublime Text, upvote it! http://sublimetext.userecho.com/topic/98139-clojure-auto-indentation-is-almost-never-correct/ http://sublimetext.userecho.com/topic/98139-clojure-auto-ind...
- Shorel 14y agoThe only suitable editor for any flavor of Lisp is still Emacs.
- TianCaiBenBen 14y agoI have to say that this author is a VIM HATER. VIM or any other kind of editors are just tools. Tool are designed for specific jobs; And people choose tool to complete their job with personal preference; This is just like some soldiers are good at using sword and some prefers to ax; There is no good or bad tool; There is only proper tool for specific job; And there is only tool that user has preference; I am OK that the author do not like VIM; It is author's choice and taste; But the author give the user of VIM especially who want to learn VIM a WRONG impression that VIM is NOT GOOD and is HARD to learn and is HARD to customize which are totally the author's own opinion; Not the true fact about VIM; Writing this comments, just want to remind those who do not know what VIM really is, Please try it yourself; Do not just listen to this author's personal blah blah. Try VIM yourself.
- randy909 14y ago> Ok let’s get Command-T. Oh wait that’s incredibly slow and clunky and looks jenky Uh, what!? Command-T does much of its work in C to make it as fast as possible. I find it to be mind-numbingly fast. It is extremely well done. Did you open Vim from root or something? If it's ugly, it's because vim is ugly. Your complaints about plugin management, Vimscript, and poor error handling are fair. When someone creates a modernized modal editor, I'll consider switching. Until then I'll suffer. It's incredibly satisfying when I do something really powerful in vim. It makes it my programming job more fun. A lot of programming is mundane editing. Editing with vim can make most painful editing tasks a fun challenge rather than a boring repetition of mouse clicks. This more than anything is why I won't switch to Sublime, even if I love its pretty face. Vim (and unix tools) make you into, and feel like, a badass computer wizard. The more time you put into studying the spells, the more powerful spells you can cast. Newbs, do you want to be a Gandalf of computers (the answer is yes btw)? Then you need vim.
- jezclaremurugan 14y agoThe trick is to learn to use vim commands as a language, there was a wonderful SO reply long back which described this neatly... once you master that, then the all the text in the world is yours to command EDIT - got it http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim http://stackoverflow.com/questions/1218390/what-is-your-most... also http://stackoverflow.com/questions/726894/what-are-the-dark-corners-of-vim-your-mom-never-told-you-about http://stackoverflow.com/questions/726894/what-are-the-dark-...
- asselinpaul 14y agoFew students can buy Sublime, it's just a pain to pay for an editor. Uhm
- eikenberry 14y ago$ sudo apt-get install sublime-text Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package sublime-text Doesn't seem to be available.