TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The problem with vim

132 pointsby zjgreenover 11 years ago

32 comments

terhechteover 11 years ago
Most of these vim emulators are open source, so there&#x27;s always the chance to just fix it and do a pull request. The main two vim emulators that I am using are:<p>- XVim for XCode<p>- Evil for Emacs<p>And both do a really good job. Evil beats XVim hands down, but XVim is a lot better than the others I tried: IdeaVim (for Intellij), Vrapper (Vim for Eclipse), and Vintage (Vim for Sublime). Out of these, vintage is by far the worst. I think it does more harm than good because the missing and wrongly implemented keys confuse me so much that I get worse at vimming. IdeaVim lacked a lot of the keys that I use regularly important (vi&quot;, va&quot;, vit, vat, etc), and Vrapper was kinda good but I think I couldn&#x27;t map jj to &lt;ESC&gt;, but it&#x27;s been some time since I had to use Eclipse.<p>I tried to fix IdeaVim, but I browsed the source for some time and couldn&#x27;t really figure out what to do. However, I also enhanced my local XVim and Evil setups a bit by extending the code and it was a lot easier than with IdeaVim.<p>I&#x27;ve said this before, but with all these implementations, somebody should have written a &quot;libVim&quot; in lua, that can be embedded in almost any project, and can be hooked into the input stream, and then you&#x27;d just need to define a set of methods in your delegate textfield (or what it is) and the libVim will call these methods based on input (i.e. move cursor, insert text at position, change text at position, scroll up, scroll down). I don&#x27;t think you&#x27;d need that many delegate methods since mostly it is writing to a text buffer.
评论 #6249864 未加载
评论 #6252186 未加载
评论 #6253219 未加载
评论 #6248723 未加载
评论 #6248774 未加载
评论 #6249275 未加载
评论 #6249488 未加载
评论 #6250393 未加载
john2xover 11 years ago
It takes a considerable amount of effort to learn vim. It takes twice as much to unlearn it.
评论 #6308213 未加载
erezover 11 years ago
This isn&#x27;t a problem with vi(m) but with application implementing vi keyboard navigation. Neither vi nor emacs are just their navigation keys and I have a similar problem with anything that is like emacs in that there&#x27;s always a shortcut missing.
agumonkeyover 11 years ago
Emacs can have this issue too, often people wanna redesign keybindings, the community tries to explain that it&#x27;s not worth it and won&#x27;t catch.<p>Does readline defaults to emacs keybindings ? It surely benefits to Emacs, but the same can be said for Vim since he reuses a regexp syntax found in sed&#x2F;grep, and even apply it on navigation<p><pre><code> `d$` : delete until EOL (aka $). ^ for BOL .. </code></pre> The composability of vim commands is a beautiful thing.<p><pre><code> cw cf&quot; d&#x2F;\. </code></pre> Cute little finger DSL
tsahytover 11 years ago
I always put it the other way. The problem with other text editors is that they are <i>not</i> vim.
评论 #6250109 未加载
cardamomoover 11 years ago
I remarked to a friend a couple months ago--right when I started to feel about the same way as the author of this article--that I love vim.<p>As I said these words, I realized that the truth in them is sort of startling. I <i>love</i> vim.<p>No, it&#x27;s not like loving a person, but it&#x27;s at least as strong an emotional connection as loving my favorite coffee mug or loving a particularly thoughtful gift from a friend.<p>As an aside, I often find vim verbs and commands sprinkled throughout things I write in other text editors. :wq
评论 #6250659 未加载
评论 #6251549 未加载
lukes386over 11 years ago
I&#x27;ve always wondered how difficult it would be to extract the vim &quot;engine&quot; into a library that could easily be reused by other programs. I can only assume the answer is &quot;very difficult&quot;.<p>Another idea would be some kind of VimSpec that emulators could be run against to see how well they cover the whole range of vim actions. Again, probably not very feasible.
评论 #6248864 未加载
Qantouriscover 11 years ago
If you swap around the pedals of your car, I suspect you will have similar problems. Another way is to swap back and forth, this will get you used to a new editor with less frustrations. But cold turkey is faster :)
gnurover 11 years ago
Vim has ruined me as well. Nearly every other editor that has a vi mode really just has a vi mode, not vim. This means that you cannot use 3 letter commands, but the 3 letter commands really are the most powerful. I cannot count the times that I have used ct( or ci&quot;, now after adding the surround plugin it becomes even easier with cs&#x27;&quot;
fixnum42over 11 years ago
Recently I was studying Programming Languages Theory with Racket (using this book - <a href="http://cs.brown.edu/courses/cs173/2012/book/" rel="nofollow">http:&#x2F;&#x2F;cs.brown.edu&#x2F;courses&#x2F;cs173&#x2F;2012&#x2F;book&#x2F;</a>) and I didn&#x27;t like DrRacket. So I decided to use Racket with Vim, but the only way could do it was through GNU Screen and Slime plugin for Vim. It works, but it takes several seconds for expressions to travel from Vim to GNU Screen and it is quite inconvenient. Furthermore, I don&#x27;t have invocation history in the REPL, so if I mistype function name, I&#x27;d have to type it all over again. Does anyone know of a better option for Racket with Vim? How do you use interpreted languages with Vim?
评论 #6250855 未加载
评论 #6259849 未加载
cieplokover 11 years ago
On the other hand VsVim for Visual Studio (<a href="https://github.com/jaredpar/VsVim/" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jaredpar&#x2F;VsVim&#x2F;</a>) is pretty good done and have many of the full Vim functionalities. I use it on daily basis and it feels almost as full Vim.<p>It lacks in support for plugins and many fancy settings but provides all the movements and register operations I use regularly in full Vim.<p>What is important it is fully open sourced and its maintainer makes pretty good job by implementing most of issues and accepting many pull requests. It is still updated and getting constantly better.<p>Many thanks to Jared Parsons for developing this plugin.
评论 #6255324 未加载
yogoover 11 years ago
Maybe there could be a Vim Users Anonymous or something.
评论 #6263701 未加载
catnaroekover 11 years ago
For me, it was the other way around: I started as a vim user, but, once I started using Emacs, I could never look back. Proof General (<a href="http://proofgeneral.inf.ed.ac.uk/" rel="nofollow">http:&#x2F;&#x2F;proofgeneral.inf.ed.ac.uk&#x2F;</a>) is, put it simply, the best environment for certified software development with theorem provers. And, even when using more mundane languages like Haskell, having the REPL (ghci) running within the text editor if very useful when one is lost in type land.
joeboover 11 years ago
My situation is the opposite. I spent 2 years with vim and switched to emacs. I used evil mode with emacs for about six months and then decided to go back to emacs bindings*. I use key chord mode and ace jump mode to quickly jump around. I find that workflow better and even easier on the wrists&#x2F;fingers. Ultimately, whichever editor I use I end up getting hand pain on different fingers so I will sometimes toggle back and forth to balance it out.
yesimahumanover 11 years ago
Though I&#x27;m a long-time vim user, I&#x27;ve never even used cf&quot; nor do I know what it means. However, I find most vi emulators work very well with the standard movement, yanking and inserting commands, and some basic visual modes.<p>I used ViEmu quite successfully a few years ago when I was doing C#, and I use vi mode on bash every day without many problems. If you keep it simple, you should be able to work across emulators pretty well.
评论 #6248716 未加载
评论 #6248964 未加载
评论 #6248619 未加载
daGrevisover 11 years ago
This is a repost. <a href="https://news.ycombinator.com/item?id=4366283" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4366283</a>
moreentropyover 11 years ago
I also feared I&#x27;d have a problem switching between vi(m) and other editors, but if you use both regularly, It&#x27;s not a problem at all, at least for me. I&#x27;m heavily using Sublime Text for software development. Sublime has a &quot;vintage&quot; vi mode which I don&#x27;t use, just to train my muscle memory on modeless editors.<p>It&#x27;s the same with keyboard layouts. I&#x27;ve been using german keyboards all my life and just decided to switch to us layout a few years ago, because basically the keyboard layout had a huge influence on programming languages, stuff like []{}&#x2F;&lt;&gt; is way easier to type on us layout. I feared i will never be able to use a german keyboard again after switching layouts, but this is not the case. I can now use both layouts blind. The only problem are the () parentheses which are offset by one key on the german keyboard, i&#x27;ll always press the wrong key for them.
评论 #6249023 未加载
anotherevanover 11 years ago
A little anecdote from a project I worked on in the mid-90s (hence terms like &quot;4GL&quot;.) The project had a lot of back-end programming (C and PL&#x2F;SQL) that we mostly wrote in Vi, but the front end UI was this weird 4GL thing which I can&#x27;t remember the name of.<p>One particular quirk of this 4GL was that pressing the escape key while in the editor would close the editor, do not save, do not prompt, do not pass go and collect $200. Very bad feature, especially when switching between editing in this and in Vi a dozen times a day.<p>In the end, everybody on the team had a bottle cap on their desk that they could put over the escape key when firing up the 4GL editor to stop accidentally hitting the damn key out of sheer muscle memory all the time.
apinsteinover 11 years ago
After I learned vim, I got very frustrated going back and forth between vim and Mac apps (Mail, MS&#x2F;Word, etc) because I had to switch between the vim and Mac style of keyboard-based cursor movements&#x2F;selection patterns. So I sat down for a few hours and figured out how to exactly replicate all Mac cursor&#x2F;selection shortcuts in vim.<p><a href="https://github.com/apinstein/dotfiles/blob/master/vimrc#L57" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;apinstein&#x2F;dotfiles&#x2F;blob&#x2F;master&#x2F;vimrc#L57</a><p>Fortunately they don&#x27;t really conflict with too many existing vim patterns, and it&#x27;s pretty nice to be able to use the cursor&#x2F;select patterns across vim and all Mac apps.
snarfyover 11 years ago
If you are using vim with C# I highly recommend OmniSharp - <a href="https://github.com/nosami/Omnisharp" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;nosami&#x2F;Omnisharp</a><p>It provides real intellisense, find usages, etc. It&#x27;s based on NRefactory.
评论 #6267955 未加载
评论 #6255321 未加载
erikbover 11 years ago
I assume the author means to say that you should use Vim instead of plugins in other tools?
niuzetaover 11 years ago
Personally, this is why I limit my usage with vim with the core vim(to me it means vim-as-out-of-package-or-gvim-package), my customimzed .vimrc, and highlighting plugin.<p>The original vim alone is more than enough to satisfy my needs, and it&#x27;s compatible with virtually every machine that I&#x27;ll be using after all.<p>I can venture on plugins for more convenience, but I already have an ample satisfaction and I would rather keep it that way.<p>I wrote this in vim, and copied here.
评论 #6250594 未加载
MetaCosmover 11 years ago
A lot of Vimmers have this exact problem. Vim has thousands of features, but each person ends up using &#x2F; loving a couple dozen. The problem is, it isn&#x27;t the SAME couple dozen so for an emulator to make any significant subset of Vimmers happy requires implementing thousands of features.<p>This is why all attempts to clone Vim end up failing, and why even amazing implementations (like Evil) fall short when that ONE muscle memory you depend on is missing.
PaulHouleover 11 years ago
I switched from emacs to vim a few years ago.<p>One of them is that vim is actually closer to a windows&#x2F;mac style editor than emacs is. You can navigate with the arrow keys, you just need keep track of being in insert mode or not. The things that are different are sufficiently different that you won&#x27;t cross them up. Back in the emacs days I was always typing ^X^S into word or typing ^S in emacs when I want to save.
评论 #6250636 未加载
exprover 11 years ago
The problem with his website is the lack of functionality (even text) with active scripting disabled. The scripts don&#x27;t even animate anything! ;-)
6renover 11 years ago
I&#x27;ve found I switch fairly easily between browser-style editing (like here) and vim. Sometimes I forget, and have a few moments of perplexity, and then I&#x27;m OK. Maybe it&#x27;s different for other <i>programming</i> editors (as opposed to browser editing).<p>BTW: one thing that helps is adding standard browser key-strokes to vim, so if I forget, it doesn&#x27;t matter.
kzahelover 11 years ago
I never considered using vim because the navigation is based on a query layout, which I don&#x27;t use. It didn&#x27;t seem worth the effort to try and re-bind the keys to make more sense.<p>With emacs, the key bindings sort of make sense (f-orward, b-ack) (n-ext p-revious) for the right-left-down-up. Not sure why v is for page down&#x2F;up, but it seems to have stuck.
评论 #6249486 未加载
评论 #6252277 未加载
评论 #6249078 未加载
评论 #6249327 未加载
nimrodyover 11 years ago
At least with VIM the standard commands are good enough to make one productive on any VIM installation.<p>With emacs, you have to do so much customization before it becomes useful that you find yourself completely lost when using another installation. Try helping a friend only to find out all your commands do not work...
评论 #6250098 未加载
ludicastover 11 years ago
Agree almost 100%. I do use vim mode for bash and it works great because lateral motion is most of what I&#x27;m doing there.<p>But Sublime&#x27;s vintage mode actually was the breaking point for me, and made me go whole hog back to vim. Close enough to cause problems when it fails, like faux amis in a foreign language.
gexlaover 11 years ago
I have found Evil to be the best emulator that I have tried. But even then, I wonder, why try to emulate Vim? Why not just use Vim? And Vim is more than they keys. It&#x27;s the whole ecosystem of plugins which come together to be the Vim way. There really is no replacement.
评论 #6250492 未加载
NAFV_Pover 11 years ago
I used vim on windows, but only started to like it after I installed ubuntu. I also installed JOE, which has a word-star emulator, a pico emulator and an emacs emulator.... but no vi emulator. Does that mean JOE has a &#x27;vile&#x27; hatred of vi?
thezilchover 11 years ago
For Eclipse, you might prefer <a href="http://eclim.org" rel="nofollow">http:&#x2F;&#x2F;eclim.org</a>.