10 ms·
My biggest problem with Vim
- hboon 14y agoIt's a problem all vi users have, don't we?
- dchest 14y agoI don't have this problem, just like I don't have a problem with typing both English and Russian on a single keyboard: my brain have learned to switch contexts. I don't use vim-like plugins for anything. :wq
- mediocregopher 14y agoSlightly related: There were a couple days way back that I really wanted to learn to type on a dvorak keyboard (later lost interest). One of my friends was doing the same (he also later lost interest) and gave me the tip that I should figure out which thumb I generally press spacebar with when typing on a qwerty board (my right thumb) and use my opposite thumb when typing dvorak. I found this worked really well, I was able to seemlessly switch between my mostly-incompetent dvorak typing and my good qwerty typing without any mental effort.
- batista 14y agoDvorak superiority is actually a urban legend.
- kingmanaz 14y agoI've heard this in regards to typing speed and it's probably true, though I've never been a fast typist. As a full time dvorak typist I can tell you that it has definitely helped with my RSI (as has using vi). Dvorak is comfortable. It's hard to explain, but it feels like one's fingers are "rolling" over the home row when typing.
- andreasvc 14y agoOh come on, you have all your vowels and other frequent letters right there on the home row. There might have been some issues with the studies that were supposed to show Dvorak's superiority, but if you take a cursory glance at the layout it should be immediately obvious that your fingers will need to travel less because the layout conforms much better to the observed frequencies in most languages.
- batista 14y agoVowels and frequent letters? For one I am a programmer, not a writer --my frequent keys are widely different than a typist's. Second, who said having the all on the home row is better? Studies --nit Dvorak's own-- have shown marginal or no improvement compared to qwerty, ven for typists.
- andreasvc 14y agoIdentifiers in source code are typically base on words, so will share the same distribution of English text to some degree. It should be easy to make a program that takes any text file, and for each character notes how far your fingers would have to move from the home row on a certain layout. This could then quantify the distance on qwerty vs. dvorak. That would provide an interesting empirical verification of this issue. About the having keys on the home row, I certainly claim it is better, and you should try it for yourself. I will concede that it may not give a speed increase for a seasoned typist, I suspect that at a certain point when everything is in muscle memory it doesn't matter anymore. However, having to move your fingers less is simply less straining, so it will be more comfortable. This was not measured in those studies, so that's why I think they are not relevant.
- hboon 14y agoWhile we are on the topic of keyboards and editors, the FingerWorks TouchStream LP [1] keyboard had various modes including QWERTY and Dvorak, as well as Emacs (!) chording. It's a really cool keyboard. I wish Apple brings it's thumb+index finger twist [2] to do Ctrl-W to their laptop's touchpad. You can see the roots of their pinch to zoom gestures all in the keyboard, and it had much, much more. Apple acquired the company and it's IP in 2005. [1] http://en.wikipedia.org/wiki/FingerWorks http://en.wikipedia.org/wiki/FingerWorks [2] Actually, it might have been 4 fingers (minus pinky) twist. It's been a long while. I'm sure I'll remember how to do it once I have the keyboard in front of me. Just like vi keys.
- kingmanaz 14y agoThat's a neat trick. Thanks for sharing.
- ehamberg 14y agoSince you specifically said “vi users”: The problem is most often – in my experience – that the plugins support only vi functionality, while Vim additions such as text objects are not supported. I love using Vim, but find vi really lacking.
- hboon 14y agoOh yes, you are right. I'm fortunate enough that in most systems I use, vi is just a symlink to vim that I don't know the difference anymore.
- bcrescimanno 14y agoIt's definitely a problem All Vi/Vim users know well; and, it's precisely why I don't install these "vim mode" plugins / extensions / whatever for other software. Simply put: no matter what they do, it's still not actually Vim. And honestly, I'd rather be forced to do a complete mental shift into a "plain editor" mode rather than have to wrestle with "will this particular combination of Vim commands work in this pseudo-Vim world?" I've found that if I completely break the expectation that I'll get anything even remotely "Vim-like" outside of Vim, I'm better able to deal. ...though I still wish I could make every editor I have to interact with a Vim window. :)
- dllthomas 14y ago* select all: ctrl-a * copy: ctrl-c * spawn vim: ctrl-f ! vim enter (varies by desktop environment) * paste contents into vim: :.!xsel -o * edit text in vim * copy contents from vim: :%!xsel -ib * close vim: :q! * paste contents into original window: ctrl-a ctrl-v
- patrickod 14y ago8 steps is hardly efficient. That's not a nice flow to edit every text field where you want a more powerful editor.
- dllthomas 14y agoEh, most of the time what I write in a text field is short enough I'm not really going to be editing it. When I find myself writing paragraphs, I do something like the above. I agree that it's not ideal, but it suffices.
- patrickod 14y agoThe biggest pain point I have with the constant copying back and forth is when I'm editing something that live previews in the text field or that needs to be executed. There are times when I just want to embed vim when editing code in a browser.
- xyzzyb 14y agoSwitching to vim made me switch to Firefox from Chrome so I could install Vimperator.
- yogsototh 14y agoI also came from vimperator, and now I use pentadactyl. You should give it a try if you don't already know it.
- xyzzyb 14y agoI actually used pentadactyl first, but the bugs grew too much for me so I switched. http://www.wikivs.com/wiki/Pentadactyl_vs_Vimperator http://www.wikivs.com/wiki/Pentadactyl_vs_Vimperator
- osener 14y agoI've been using Pentadactyl with bleeding edge Firefox since its first days and I definitely agree with you. Pentadactyl doesn't support Firefox 15+ so I had to downgrade to a more stable channel with every major Firefox release. After I ended up in the stable release with no Firefox 15+ support in sight I began looking for alternatives and to my surprise Vimperator is still alive and kicking (3.5 got released six days ago)! I don't get runtime errors anymore, it looks and performs much better (not sure if I should attribute the performance increase to newer Firefox) and has way better UX choices (like how minibuffer overlays the page instead of resizing it with every keypress which has a performance impact with heavy webpages) I suggest every Pentadactyl user who doesn't need the better vim compatibility or extended configuration options to check Vimperator out, its still in development and certainly didn't get abandoned or superseded by Pentadactyl despite what people are suggesting.
- thehigherlife 14y agoWhat are the major benefits of switching from vimperator to pentadactyl?
- derwiki 14y agoYou should check out Vimium for Chrome.
- stuffihavemade 14y agoThe only vim plugin that I've used that's an acceptable vim substitute is viemu (http://www.viemu.com/ http://www.viemu.com/).
- adam_freidin 14y agoSounds like "your biggest problem without vim." Like many others, I've been happy using Sublime, recently. But not quite completely satisfied (For instance, I couldn't figure out a working regular expression to remove all extra whitespace from the end of a line, in sublime, so I did that task in vim where it works.)
- kingmanaz 14y agoVimperator/Pentadactyl's numbered links are doing the same thing for me. Hit the "f" key and anything "clickable" on the screen is overlaid with a number. Type the number and enter and you've "clicked" it. It's ingenious. I dream of an entire OS supporting this. Regarding Vim fluency spoiling IDEs, I could not bear writing C# code in VS without purchasing the $99 ViEmu ...and that's coming from someone that drives a 1987 F-150.
- woodchuck64 14y agoDespite decades of vi use, I'm ashamed to say I didn't know what cf" was. cf" : change(c) forward(f) to double-quote(")
- dhimes 14y agoand ct" will change everything up to the double quote. Great stuff.
- ehamberg 14y agoLook up text objects such as i" and a". They're great. E.g: - ci" (change inner double quote) will change (delete and put you in insert mode) the text between to double quotes. - ca" (change _a_ double quote) will change the text and the surrounding double quotes. There are text objects for quotes, brackets, sentences, blocks, etc. There are also plugins that create text objects such as arguments (to functions) in programming languages.
- selectnull 14y agoI remember the time I learned that one, it was great. To save you the time, I will tell you even mightier incantation: ct" Changes Till "
- sea6ear 14y agoI wish Emacs this ability by default. I know it has zap-to-char but that works like cf" not ct". Of course that can be modified with a bit of elisp, but I wish it provided it out of the box.
- msl 14y agoThis is obviously a problem with getting used to anything you can't always rely on. Vim addiction made me try Pentadactyl and now I find it incredibly painful to use a browser without similiar functionality. It's also unpleasant to use a keyboard whose Caps Lock hasn't been mapped to act as an Esc. By building your workflow around Vim (or anything else) you can gain a lot but you also become a prisoner to it. I suppose it's about trading flexibility for power. Thus far it seems to have been net win. It also seems that you can't see this from outside, which leads to people recommending their own tools for everyone else.
- selectnull 14y agoYup. Ctrl W kills me while I write something inside a browser and want to delete a word I've... oh, there goes a tab.
- sp332 14y agoI realize it's still annoying but you can Ctrl-Shift-T to get a tab back, usually with the partially-filled form intact.
- dredmorbius 14y agoOr use vimperator (or its replacement whose name escapes me). 'd' deletes a tab (as will C-w), 'u' "undeletes" it. History made marvelously easy. This alone sold me on the extension.
- npongratz 14y agoAre you perhaps referring to Pentadactyl[1]? I'm a huge fan of it. [1] http://5digits.org/help/pentadactyl/ http://5digits.org/help/pentadactyl/
- dredmorbius 14y agoThanks, yes. I'd seen it referenced here, haven't used it. Vimperator still works on my somewhat age'd 14.0 FF.
- npongratz 14y agoI've used Lazarus (for Firefox) to good effect for recovering lost forms: https://addons.mozilla.org/en-us/firefox/addon/lazarus-form-recovery/ https://addons.mozilla.org/en-us/firefox/addon/lazarus-form-...
- sequoia 14y agoWhen you see me half ask a question on IRC then quit, or quit repeatedly. ^^^ Switching context between vim & xchat & killing tabs. See also: jjjkkjkkgg
- tomrod 14y agoMaybe I just don't code enough. I see little advantage to vim or emacs over, say, gedit or kate. What am I missing (besides a need for esoteric hotkeys)?
- weaksauce 14y agoIt's just faster to edit anything. Read this for an overview of what makes vim vim: http://stackoverflow.com/a/1220118 http://stackoverflow.com/a/1220118 I wrote about some of my favorite commands here: http://news.ycombinator.com/item?id=4142875 http://news.ycombinator.com/item?id=4142875
- bcrescimanno 14y agoThis question can be answered by just a bit of research using your friend Google. I like sum-it-up by saying that it's all about making your editor work for you as opposed to simply being a blank slate on which you can type. Simply thinking that the hotkeys are esoteric is missing the entire point of the command structure which is effectively a language for text manipulation. Google for "vim nouns verbs" for some great descriptions.
- mdonahoe 14y ago"work for you" might not be the right message, as that is what IDEs are known for. I'd say that vim makes you faster. It's like talking with your close friend vs talking with a stranger. You understand each other better and can speak very quickly. High bandwidth communication maybe?
- bcrescimanno 14y agoI agree; it's tough to write out the semantic difference between an IDE "doing work for you" and Vim "working for you," where the former is tools doing tasks you don't want to do and the latter is the editor providing a language for you to give it instructions in far more evolved way than the primitive text-editing concepts of many other editors. Maybe its "working with you"
- 14y ago
- munchor 14y agoI have this problem with Emacs.
- AYBABTME 14y agoI've been trying to switch my programming to vim, I don't know why (in fact I know, because everybody everywhere promises it's the single greatest thing ever made). I got to learn a couple of commands, enough to feel quite comfortable with it. But my major problem, what refrains me from using it for everything, is its lack of support for refactoring. In fact, if I could find a plugin that can properly handle 'renaming' in a couple of common languages, I'd be sold. But I searched, many times, and didn't find. Same for 'intellisense', which is somewhat emulated with 'omnicompletion' that I have all set up, but it's not context-sensitive... I'm honestly wondering how people do to use vim for their projects. Are they giving up on refactoring althogether, or they are doing them the slow-way, step by step. Same for intellisense, I find it's so convenient to have documentation and in-context pop-up right in the middle of my thoughts; it makes me doubt of the productivity advantages that vim-evangelist claims. I really try hard to learn more, to tweak vim more, to tame it more, hoping to reach the top of that learning-curve and to see just how ignorant I was before. But I'm in doubt. Is it real, or is it just some cultural dogma that vim is the ultimate tool?
- praxulus 14y agoIf Eclipse can handle your language, then the eclim plugin will provide renaming, real autocomplete, etc. within vim. It just runs eclipse in the background and exposes functionality to vim.
- e12e 14y agoThanks for this! This should help out when I finally start hacking something for Android. I've been using vim for simple java projects before, and while NERDTree helps a bit with the forced split over too many files -- it always felt a bit painful. I did try a few literate programming variants -- but it required a lot of discipline to keep the abstractions in the right place -- literate programming makes procedual/classical programming really efficient and easy -- but all that magic "transclusion" makes it easy to write something that is readable and structured in it's "natural" literate source form, but is pretty bad object oriented code.
- revscat 14y ago
- bstar77 14y agoMy biggest problem with Vim is the muscle memory I have developed where I hit [esc] after writing text. The problem is that in most programs outside of vim, [esc] means to cancel the operation. Try renaming a file and set it with [esc].
- thiderman 14y agoThis is avoidable if you use Ctrl-C instead of escape. It works identical to [esc] in all ways except one (the InsertLeave autocommand will not be triggered). If you remap Caps lock to Ctrl, you even get a more ergonomic way of escape, since you don't need to move your hand the way you would to press [esc].
- SkyMarshal 14y agoAnother common remaping is <ESC> -> jj: " remap Esc to jj in Insert mode: inoremap jj <ESC> I've been using this for a while, much better.
- thiderman 14y agoAs a big fan of vim and the hjkl paradigm, I've tried many of the plugins that try to make other software more vim-like. While I can fully understand the feelings of haldean, I've never felt it myself. I'm pretty sure this is due to my expectations. I've never expected anything other than vim to have vim-like editor capabilities. Just having hjkl navigation is a major plus for me, and anything else is mostly gravy. Another thing I've found is that most of the plugins (at least the browser ones) are quite configurable, and if I'm not happy with or missing a keybinding, I'm free to modify or add it. I never liked gt and gT for tab switching, so I use zh and zl in vim and in my browsers, and AFAIK all of them (vimperator, pentadactyl, vimium, vim-chrome) allowed me to use them. btw, an honorable mention should probably go to tmux, since it's copy buffers in vi-mode have pretty flawless vim-likeness.
- __alexs 14y agoI have this in my .vimrc imap <C-a> <Esc>^I imap <C-e> <Esc>A imap <C-k> <Esc>d$A imap <C-y> <Esc>pA Yes I am a heathen.
- bcrescimanno 14y agoYes, yes you are. :P In all honesty, a lot of Vim users set up some of these same shortcuts for editing their commands since chording is really the only way to get to some of that functionality--and as long as you're going to use chords, why not use Emacs-style?
- osa1 14y agoquick tip: d$ is same as D
- graywh 14y ago^I is the same as I (because I is short for ^i). But really, you should just map to <Home> and <End>. Also, d$A is the same as C.
- drkevorkian 14y agoIn terms of Vi(m!) emulation, emacs' evil-mode (http://emacswiki.org/emacs/Evil http://emacswiki.org/emacs/Evil) is pretty damn complete. The only real issue is properly integrating it with the rest of your Emacs environment.
- Symmetry 14y agoYeah, the only things I _really_ miss on that are ctrl-i and ctrl-o.
- na85 14y agoSo, his biggest problem with vim is that he's not used to vim and used to another editor. Got it.
- rmk2 14y agoNo. His problem is that not every editor is vim. Or at least like vim.
- shootthemoon 14y agoMy biggest problem with vim is the fanboy base. You all are worse then mac users. (typed from my mbp) Get over it, its an editor, a tool, not the end product.
- tree_of_item 14y agoVim _is_ an end product, just like Photoshop is an end product: a better environment for creators to create things. It's not wrong to talk about it.
- slurgfest 14y agoYes, it is a tool. And sometimes tools differ in boring ways that make no difference, like they have different colors. But how would you feel if you worked as a carpenter 8+ hr/day for 10 years and then realized you had been using a dull saw the whole time? Or that you were doing things in a slightly wrong way which gave you blisters or split the wood? You might even want to tell other people about it... I don't think using an Apple brand computer vs. another brand really makes that much of a difference to anything except taste.
- beothorn 14y agoThe site don't show without javascript. Why do I need it just to read text?
- padobson 14y agoThe only thing I use Vim for is coding. I use gedit for taking notes and logging my hours. I use OpenOffice/LibreOffice for documents, spreadsheets, invoices, etc. I use the web for most every type of communication from blogging to email to HN comments. But when I'm coding, I'm in Vim mode. Moving between the two is much easier because I'm so used to it. Almost everything is about mobility to me. I want to be able to sit down at any computer and accomplish my workflow the same way I do at any computer I own. Thus, the web and plain text are my friends. This was also the reason I started using Vim in the first place - I know it'll be on any linux box I ever use.
- moe 14y agoI have a much more interesting problem (I think!). I wish Vim could read its configuration from a HTTP-URL passed in an environment-variable: REMOTE_DOTVIM=https://foobar.com/dotvim I'm dealing with many dozens of hosts and getting my precious dotvim onto all of them is outright impossible. Especially on accounts shared with other people. There are hacks around it, but they are nasty (pasting a script, aliasing stunts). I realize the chances for actually getting this feature are rather slim. But gosh would it make my day...
- bcrescimanno 14y agowould something like this not work? curl http://url.to/vimrc http://url.to/vimrc | vim -u -
- moe 14y agoPlain curl unfortunately doesn't cut it because that misses .vim, which contains all the goods (plugins etc.). But yes, in essence that's what I'm doing right now, just instead of curl I rsync the entire dotvim and then run 'vim -u' (plus a few other vars). It gets the job done (usually), but it's an extra-hoop that I wish I wouldn't have to take. More than once I've had the alias that I setup with the pastie fail for one reason or another, which then sets me back a couple minutes, torn between fixing it yet again or just moving on with plain vim.
- bcrescimanno 14y agoI use a dotfiles repository on Github to easily get my Vim environment set up on a new machine. You mentioned the notion of shared machines; I'm resisting the urge to go on a rant about the inherent "badness" of sharing a single login across multiple people in what is a multi-user environment. The whole point of a user account is to be able to set things up the way you want them.
- moe 14y ago"badness" of sharing a single login That's the age-old discussion about to what degree one should sanction user-logins to production-hosts and whether permission/sudo-hell is preferable over the alternative. It doesn't quite belong here so let's just assume the classic case of "bootstrap gone awry" where you're left with root, vanilla vim, and a semi-rational desire to have your fancy syntax-highlighting while you fix up that partition table. ;)
- cfcluan 14y agoI knwo<Esc>xio<Esc>A exactly what you are talking about.<Esc>ogot iy?<Esc>hrt
- spudlyo 14y agoAs an emacs user, I'm pretty happy to mostly not have this problem. All of the command-line apps I depend on either use GNU readline (which has flawless emacs style editing) or can be hacked to do so with the rlwrap utility. Furthermore since many of the NeXTSTEP hackers were also emacs users, OSX text input widgets inherited very solid (although the kill ring is lacking) keyboard binding support which makes it possible for me to comfortably emacs-style edit in native OSX apps. Sometimes though stupid rich text input boxes used by wikis can annoyingly rebind emacs keys, and then I fly into a fit of rage like the author described. Luckily there is 'It's all text!' under Firefox or 'Edit with Emacs' on Chrome that lets you use an external editor to edit the contents of any web text widget, which I use to do all my wiki editing.
- lloeki 14y ago> As an emacs user, I'm pretty happy to mostly not have this problem. Wait till RSI kicks in. Vim was a real relief when chording became intolerable (even with remaps like ctrl->caps).
- spudlyo 14y agoI started to worry about this as I got older, so a few years ago I got a Kinesis Advantage keyboard at work and home with the control and meta keys mapped to the left thumb buttons backspace/delete. I was able to break the left-pinky control habit by mapping my CAPSLOCK key to a noop. The Kinesis took a few weeks to get used to, I sped up my progress by competing in typing races on typeracer.com until my speed got back up, and eventually surpassed my speed on a conventional keyboard. The square, curly, and angle bracket keys took a lot longer to get used to, and it was months before I got comfortable with them. http://kizzx2.com/blog/wp-content/uploads/2012/06/layoutcontour-win-usb.gif http://kizzx2.com/blog/wp-content/uploads/2012/06/layoutcont...
- tincholio 14y agoThen you just install evil-mode, and have happy wrists :)
- slurgfest 14y ago
- chrisdone 14y ago> Two years ago, a heavy bout of coding gave me some wicked wrist problems, and an ergo expert recommended I switch to vim. That is not an ergo expert. An ergo expert would tell you to stop typing with your wrists bent and resting them on your desk or keyboard “wrist pad” or whatever nonsense. Your hands should hover over the keyboard. I have never, ever had wrist pain and I type _a lot_. I'm not an ergo expert, I just type with proper form as recommended in any credible health & safety or posture guide.
- slurgfest 14y agoThere is more involved than typing words, e.g. http://en.wikipedia.org/wiki/GNU_Emacs#Emacs_Pinky http://en.wikipedia.org/wiki/GNU_Emacs#Emacs_Pinky
- tincholio 14y agoWhich can be trivially solved by moving CTRL to the CAPS LOCK position
- haldean 14y agoThey told me all of these things too, most of which I was already doing. Hover your wrists over your keyboard, elbows tucked in at your side, forearms should be parallel with the floor, eye level at the center of your screen, feet flat on the floor, lower legs perpendicular to the floor. But even after maintaining good typing posture for a while (and rearranging my workspace to be more ergo-friendly) the wrist pain didn't go away. It was gone in a week after I stopped using Emacs.
- mwfunk 14y agoI'm as guilty as anyone of going deep on various editors and really getting into the weeds of editor automation, configuration, and learning obscure hotkeys and commands. Vim and emacs in particular are great for this. But after many years of programming, I've become really skeptical of the value of this approach. The amount of time I spend actually typing in code is utterly dwarfed by the amount of time I spend thinking about what code should be typed in. Spending lots of time memorizing editor-specific key sequences to save a keystroke here and there is starting to look more and more like an illusion of efficiency, or possibly a net loss if it means constantly having to reach for refcards or struggling with an illusion of inefficiency when using other editors. It makes a lot more sense for people who really do spend more time typing code than thinking about code...I would be fascinated to see some sort of survey as to what that ratio is for programmers in general, and how it affects people's choice of tools.
- LargeWu 14y agoThank you. Programming is not an IO-bound problem, and if it is, you're not doing anything interesting. vim gives you ergonomic benefits? Sure, I can believe that. Allows you to manipulate text faster? Ok. But, at least in my reality, text manipulation is a rounding error when it comes to productivity. I simply do not buy the argument that using vim improves your code, or the speed at which you can write it.
- JoshTriplett 14y agoI actually do find that text manipulation can become the bottleneck in the right environment, at some points in a coding session. Vim won't make you faster while staring at a pair of empty braces thinking about the right algorithm. Vim can make you faster while rewriting a function, moving code around, or typing code that you've already thought through. And I often find that the faster I can get a thought out and stop holding as much state in my head, the faster the next idea comes.
- slurgfest 14y agoThere is a continuum, and there is an explore/exploit problem. Using notepad (on Windows) has 0 up-front cost. But you are going to be frequently frustrated, you are going to frequently produce files with errors in them that you have to fix, and you are going to be frequently doing things in a repetitive way. And then you are going to have to do things differently on another platform, etc. Using a highly configurable, plugin-rich, live-programmable editor like vim or emacs does have some up-front costs to configure and learn to use. But almost certainly not as much as you think. They LOOK absolutely terrifying, but the reality isn't so bad. (I haven't found it bad, anyway - I certainly don't keep around refcards or consciously memorize things, although that might mean I'm not taking 100% advantage of the tools or maxing out my geek score.. those just aren't my use cases). Feeling frustrated all the time breaks up your flow and just feels bad. And yes, if you are feeling frustrated with repetition, you probably ARE wasting real time... but it's up to you whether it matters. Some people have half the productivity of others and get by fine and get paid the same. The underlying philosophy here is: it's a programmable computer, you should be able to have it your own way. vim and emacs are the fruits of text editing being a really mature problem domain for software. But if your philosophy is rather: I don't want to take an extra week to learn a new tool... then you are not ready and might never be ready to leap to a really strong text editor. vim and emacs have warts. but if you know them and need their power, it will not matter much to you that (say) scribes is so much simpler and prettier, because the absence of warts doesn't make up for the massive loss of functionality. Each of these embodies about a lifetime of very poorly compensated work; there isn't anything else like them in the pipeline, so you might wait a lifetime for something with the same functionality and fewer warts. And the problem is that others will perceive warts in the new thing and it will be a religious war just like vim vs. emacs.
- jryan49 14y agoMy biggest problem with vim is that vim plugins are not nearly as extensive or well developed as Emacs's.
- bsphil 14y agoAs a dirty non-vim-using heathen trying to correct the error of my ways, I'm having trouble adjusting. Is there a good reason to use hjkl for moving the cursor that I'm not aware of by virtue of knowing nothing else? Why not jkl; or ijkl?
- mattkirman 14y agoThis may just be an urban myth but afaik Vim uses hjkl because the terminal[1] that it was originally used to write Vi had a keyboard where the arrows were on those same keys. Also, the escape key was in the place of the modern day tab key making switching modes much easier. [1]: http://en.wikipedia.org/wiki/ADM-3A http://en.wikipedia.org/wiki/ADM-3A
- ehsanu1 14y agoI use ijkl. My config (taken from the interwebs somewhere and adjusted over time): " remap h to i and use ijkl for inverse T cursor movement map k g<Down> map i g<Up> map j <Left> noremap h i The g makes it work more intuitively for wrapping lines. Use h to insert, or for "inner" selections, instead of i. One problem with doing this is that when you're on some random server without your .vimrc set up, you won't have these mappings. Just scp/wget over your dotfiles for those cases anyways. But you'll definitely find yourself slowed down without the mappings.
- notdan 14y agoOnce you get used to using vim properly, you'll find that you almost never need to move one character left or right (h or l). It is actually a nice setup that your index and middle fingers are responsible for moving up and down in the file since that is what you will be doing most often. There are much better ways of moving horizontally in the file than one character at a time. You can use w and b to move forward and backward via words which is much more efficient than single characters. You can also use f and F to 'find' a character forward or backward. I typically use that to navigate between method arguments or parentheses. So you can type f, and it will move your cursor FORWARD to the comma. Then just press ; to repeat the search (and go to the next comma). If you want to go backward, do F, and it works the same way, only backward. I'm sure there are better examples but the point is, if you are using h or l often, then there are probably better ways to navigate. Also, this sounds kind of confusing at first (having to remember fFwb; etc), but just learn one at a time and you won't have to think about it after a while. Soon you will find yourself typing an email and accidentally ending up with jjjjjj in random places... :)
- robfig 14y agoI can't help feeling sorry for all these poor people that use Emacs with their control key in the wrong spot (bottom left). Remap Control to Caps Lock and there are no ergo issues at all.
- dredmorbius 14y agoIt's far less the control key than the meta key for me. I don't use emacs except once in a blue moon, but do use readline / emacs-style bash commandline editing. The ctrl-mapped features (and yes, I swap capslock/ctrl) are easy. The meta ones ... not so much.
- koenigdavidmj 14y agoAs a random bit of trivia, tapping esc followed by another key counts as hitting meta for that key. It might be easier to simply slap 'esc x' than try to chord alt-x.
- haldean 14y agoI tried, but to no avail. Even if you move Control, you're still chording and that can twist your hands into funny shapes. Not to mention that I never found a good solution for where to remap Meta to; it got to the point where just hitting M-x was really painful.
- sigzero 14y agoWhen I had my documents (done in Word) in at work I also get the discrepancy report that says there are unneeded :w all over the place.
- priomsrb 14y agoI think it would be cool to have a vi/vim engine that can be added onto editors. The editor would only have to overload simple functions like keyPressed(key), getChar(pos), setChar(pos, c), etc, and the engine would take care of the rest of the vi/vim emulation. This approach would be better because there will be a single effort rather than each editor writing its own vi/vim mode. Also when a new feature is added to the engine it would be available on all editors.
- dredmorbius 14y agoIf you really want to experience frustration as a vim user, try working on a legacy proprietary Unix box with nothing but old-school vi on it. If you simply want the breadth of experience without access to such a system, the 'nvi' package (available on most Linux systems) promises to be bug-for-bug compatible with BSD vi.
- ibotty 14y agoit's not that bad either...
- supervacuo 14y agoSo your biggest problem with VIM is that pseudo-VIM plugins for other software aren't implemented very well? Right...
- tammer 14y agoI've still got faith that with enough patience the editor itself can be made ubiquitous. Pentadactyl is perfect because it creates it's own verbs. Once you grok that a tab is it's own buffer it works as supplement to vim, not as replacement. The rest is all zshell/vim.
- ansible 14y agoAs far as vim with Eclipse goes, I tried out eclim, but I didn't like it too much. You loose features like being able to click on source code lines to create a breakpoint. I've only used it lightly, but I've been pleased with vrapper so far: http://vrapper.sourceforge.net/home/ http://vrapper.sourceforge.net/home/ It is also conveniently installable from the Eclipse marketplace.
- kamaal 14y agoLearning an editor is not like learning typing. You should learn an editor but not be addicted to it. This is just like learning a language. The reason is software tools evolve really fast. And you will always get somethings better than what was available in the past. And you will always have to move on. Why get so addicted and get into the editor religion? If you look at the way people program in verbose languages these days, they heavily depend on a lot of goodies like auto complete and intellisense. The tooling area is always evolving with time. And not moving with the trend will keep you locked in ancient practices. The way I see, Editor religion works very similar to version control religion. People really take tools too seriously. When I look at vi/emacs vs something else debate. To me it looks like git/mercurial vs svn etc debates. There is not reason to take that personally, they are just tools after all. I look at a version control system as something that keeps track of my change history. An editor as something that helps me be productive. Those things keep changing with time. Don't take them so personally that you have to tear your hair out in frustration when they are not available. They are a means to achieve your goal. Using them is not your goal.
- haldean 14y agoThis is exactly my point, though; being efficient at Vim is unlike using any other editor, and you've invested so much into gaining that muscle memory it's very, very hard to convince yourself that other tools are better. In some way, I am addicted to the efficiency and succinctness of Vim.