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.

Vim: Takeaways from One Year of Typing

81 pointsby sankhoalmost 10 years ago

20 comments

DarkTreealmost 10 years ago
The thing about Vim is that I cannot imagine creating it and thinking, "This will be much faster and easier than a mouse eventually". But, I also wouldn't think that I could learn how to type fast without looking at the keys if I just stumbled across a keyboard, but both are undoubtedly true. Like anything physical, it requires practice and muscle memory. Would you rather go back to looking at every single key to type? That's how vim users feel about regular text editors. Try it out.
评论 #9997103 未加载
评论 #9997217 未加载
farresitoalmost 10 years ago
vim overhyped as an editor? It might be overhyped as a programming tool (you won&#x27;t write 2x the same amount of lines in a day; you will not be 5x more productive), but as an editor, it deserves every single bit of hype that it has.<p>No other editor stands next to vim. A lot of people dislike editors. It&#x27;s fine. There are a million tools out there that help people become more productive programmers. You might enjoy IntelliJ or you might not. You might like cscope or hate it. Tt doesn&#x27;t matter. One needs to find the tools that helps him in their day to day job. But if you need an editor, vim is no doubt the single best out there.
评论 #9998055 未加载
评论 #9997638 未加载
评论 #9997053 未加载
评论 #10000534 未加载
评论 #9996858 未加载
overgardalmost 10 years ago
Here&#x27;s the thing: when you&#x27;re coding, how much time is spent on reading vs writing? For me it&#x27;s probably 90&#x2F;10. Since most my time is spent concentrating on understanding code, the last thing I want is an editor that forces me to consciously think about text operations. &quot;d[downkey]4&quot; might be theoretically more efficient, but I spend way less cognitive energy holding down the shift key and pressing the down arrow 4 times.<p>The other thing is efficient navigation within one file isn&#x27;t super useful to me. I spend most my time doing find-in-files or jump-to-definition or rename-across-this-project. Vim kind of sucks for all those use cases. There are plugins of course, but that just brings it up to par with popular IDE&#x27;s, except with a clunkier interface.<p>I say this as a person that knows vim well. If I&#x27;m SSH&#x27;d into a server and I need to edit a config file, vim is the first thing I&#x27;ll reach for, but for coding, I&#x27;m pretty much only using it if I&#x27;m using a language that doesn&#x27;t have a nice IDE already.
评论 #9997720 未加载
评论 #9997836 未加载
评论 #9997788 未加载
评论 #9998189 未加载
评论 #9998151 未加载
mixedmathalmost 10 years ago
For what it&#x27;s worth, the author (sankho) mentions that he uses other editors for project-wide find and replace. This <i>can</i> be done in vim too (although I do not --- I&#x27;ll return to this). You can check out the typically great vimcasts post on this: <a href="http:&#x2F;&#x2F;vimcasts.org&#x2F;episodes&#x2F;project-wide-find-and-replace&#x2F;" rel="nofollow">http:&#x2F;&#x2F;vimcasts.org&#x2F;episodes&#x2F;project-wide-find-and-replace&#x2F;</a><p>For whatever reason, I find it easier to use commandline tools to do large search and replaces. I do embrace the vim-as-text-editor within the larger Linux-program-composability philosophy, but I understand that not everyone else does. So I use ack and perl, as mentioned in this StackOverflow post: <a href="http:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;8744108&#x2F;1141805" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;8744108&#x2F;1141805</a><p>(Actually, sometimes I distinctly do things the <i>wrong</i> way. I open a scratch buffer, `:r! ls` to get my file names, restrict to those that I want, create a macro that does what I want on the file under the cursor, and then repeat the macro. I am not proud.)
评论 #9997182 未加载
评论 #9997584 未加载
towbalmost 10 years ago
The key to learning vim for me was to create my own vimrc from the ground up. I decided to not add anything to that file that I didn&#x27;t understand what it was for. That and time. As long as you can open a file in vim, add a couple of lines of code and save it, you&#x27;re good to go. Just keep using it and that vim magic will come to you ;)
JD557almost 10 years ago
&gt; Relax! No other text editor has as many developers working on plugins than VIM.<p>What about emacs?
评论 #9997095 未加载
评论 #9997762 未加载
评论 #9997199 未加载
viebelalmost 10 years ago
The great advantage of vim is that it forces you to use only the keyboard. No mouse at all! Mouse is slow. Keyboard is fast (once you get used to it).
评论 #9997196 未加载
评论 #9997029 未加载
评论 #9997118 未加载
tachionalmost 10 years ago
I&#x27;ve tried switching to VIM (from few years of using Sublime) few times already, but failed every single time: bare VIM is too dysfunctional to my taste and ways of working with text editor (missing tabs, file&#x2F;folder treee view, easy switching documents, easy visual copy&#x2F;paste and so on, missing code expanding&#x2F;completion...).<p>Last time I tried spf-vim[0] but while it looked &#x27;cool&#x27; (it has colors, it does code completion, it somwhere have the folder&#x2F;file tree view and maybe eve tabs&#x2F;panels...) yet it is overly complicated, quite badly documented (there is no intro like tutorial on getting you up to speed with what you may want from a text editor, just some strange sounding plugin list with few shortcuts here and there) and overloaded with plugins I am not interested in (PHP related ones) not to mention having few strange issues requiring googling and writing additional configuration just to make VIM behave...<p>So, while I&#x27;d love to use VIM for its speed, the fact its easily portable with the configuration and is available on almost every OS (BSD, Mac, Windows, Linux, you name it) I still write 99% of my code in Sublime, and only use VIM on servers to change this and that. Perhaps another time ;)<p>[0] <a href="http:&#x2F;&#x2F;vim.spf13.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;vim.spf13.com&#x2F;</a>
评论 #9997416 未加载
评论 #9997407 未加载
评论 #9997613 未加载
评论 #9997520 未加载
评论 #9997682 未加载
homulillyalmost 10 years ago
I use vim on a daily basis and think it&#x27;s a great editor, but it&#x27;s definitely overhyped. Plugins in particularly are pretty disappointing if you&#x27;re coming from an editor like sublime. Off the top of my head, syntax checking, fuzzy searching and multicursor options are all perfectly usable but very limited compared to sublime&#x27;s offerings.
kev6168almost 10 years ago
There is another element in using Vim that&#x27;s not mentioned -- it&#x27;s a super fun journey, full of surprising discoveries, handsome rewards for a little effort, and generally the happy experience in continuous getting nice things from a seemingly inexhaustible source.<p>As an example, having used Vim for ten years, just within the last few weeks I started to seriously learn and use Ultisnips, SkyBison, Vim-swoop, etc. It has been pure fun and rewarding.<p>To be clear, I don&#x27;t use that many plugins. Often time I discover something already built into Vim proper which can replace a plugin (after some light scripting&#x2F;configurations), then I usually uninstall that plugin. This has happened more frequently in recent years, possibly because of my improved Vim-fu (still a mediocre user I am sure). So both productivity and portability get improved while I am having fun learning new things.
jastantonalmost 10 years ago
Does anyone know if Vim has the power of multi line editing &#x2F; multiple cursors like w&#x2F; Sublime Text? The large majority of my productivity involved copying and pasting with multi line select, and jumping words and different boundaries on multiple lines at once. Anything that matches ST for Vim?
评论 #9997616 未加载
评论 #9997679 未加载
评论 #9997606 未加载
评论 #9997641 未加载
chousukealmost 10 years ago
I don&#x27;t actually program all that much, but I find that for text editing, vim (or even vi) is hard to beat.<p>As a sysadmin, I appreciate the fact that some form of vi exists on <i>any</i> vaguely unix-like machine I log into. Even without a .vimrc, the basic commands for line editing and searching work and they match with tools like less (or does less match vi?) and using vi has become second nature over time because it&#x27;s everywhere and it tends to be the default (I hate it when someone makes nano the default $EDITOR so that eg. sudoedit doesn&#x27;t do the right thing)<p>I wish Windows servers shipped with vi, too. A decent text editor is the one thing I consistently find myself missing. Notepad most definitely does not count.
lewisl9029almost 10 years ago
Eventually, I&#x27;m hoping for some keyboard&#x2F;mouse hybrid like this to catch on:<p><a href="https:&#x2F;&#x2F;www.kickstarter.com&#x2F;projects&#x2F;1666150716&#x2F;keymousetm-the-keyboard-and-mouse-re-invented&#x2F;description" rel="nofollow">https:&#x2F;&#x2F;www.kickstarter.com&#x2F;projects&#x2F;1666150716&#x2F;keymousetm-t...</a><p>I didn&#x27;t end up backing it though because I didn&#x27;t want to dump $250 on a v1 product would likely have many issues to sort out. That and the ergonomics of the typing didn&#x27;t look that great.
评论 #10006661 未加载
ixtlialmost 10 years ago
I agree with everything here except the idea that you shouldn&#x27;t start with MacVIM. The main issue with new users getting into modal editors is the learning curve. If you can reduce the upfront difficulty by accepting OS-specific hotkeys and mouse events, why not?<p>Using VIM saves you time and a smart user will search out the ways the editor can help her, but there&#x27;s no value in making the user go cold turkey.
评论 #9997325 未加载
chrisguilbeaualmost 10 years ago
If anyone is looking for a good book on using vim effectively, this one is great:<p><a href="https:&#x2F;&#x2F;pragprog.com&#x2F;book&#x2F;dnvim&#x2F;practical-vim" rel="nofollow">https:&#x2F;&#x2F;pragprog.com&#x2F;book&#x2F;dnvim&#x2F;practical-vim</a>
ameliusalmost 10 years ago
Any tips on learning the internal configuration&#x2F;control language? I&#x27;ve been using vim for quit some time now (I like it a lot), but never have been able to grok anything about it besides entering code :)
tygoriusalmost 10 years ago
<p><pre><code> No other text editor has as many developers working on plugins than VIM. Virtually anything that exists in another text editor which isn’t mouse driven has some very popular, very supported, very documented plugin you can use. </code></pre> And the Vim equivalent of org mode is what again? I&#x27;m a Steve Litt fan, but Vim Outliner isn&#x27;t even in the same league as org mode.<p>As a Vim user of many years I still believe it to be superior to emacs when it comes to editing text. That said, emacs is a vastly superior programming environment. And like many people I find org mode to be indispensible.<p>Happily, these things aren&#x27;t either&#x2F;or situations. I still use Vim for quick text editing tasks, but for other matters evil+org mode lets me have the best of both worlds.<p>Edit: typos
评论 #9998783 未加载
imakesnowflakesalmost 10 years ago
One year? That is like &quot;Takeaways from riding a Superbike in first gear, for one minute - Verdict. Super bikes are way overhyped!&quot;
评论 #9996976 未加载
gernerzalmost 10 years ago
SublimeText has a vim mode called &quot;vintage&quot; that allows vim commands to work.
评论 #9998036 未加载
iLemmingalmost 10 years ago
now you should try Spacemacs
评论 #9997277 未加载
评论 #9997398 未加载
评论 #9998810 未加载
评论 #9997667 未加载