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.

Why, oh why, do those nutheads use vi? (2007)

86 pointsby chdirabout 10 years ago

21 comments

pinkunicornabout 10 years ago
I basically started learning Vim because.. well it was a hipster thing. The first two years, I really did not know how to actually learn it. All I would do is enter insert mode, move around with arrows and &quot;:wq&quot;. But then after 6 months, I started with basic commands, like &quot;55gg&quot; to move to the 55th line etc, &quot;G&quot; to the last line and &quot;gg&quot; to the first line. Then came buffers, I started opening multiple files and started using minibufexplorer(my entry point into plugins). This went on for another 6 months. Next came actions and boy oh boy, I became the hipster vim user in college. While editing CSV files(like deleting all instances of a particular row having text &quot;abc&quot;), I used Vim instead of awk&#x2F;sed just because I wanted to learn more. Fast forward a year, I call myself a basic vimmer and superior to others at my workplace by just knowing search, moving around, actions, buffers, a cool autocomplete plugin and other plugins here and there.<p>Throughout the learning process one thing I observed was that, its just not enough to read about a cool article about Vim and leave it there. I would keep repeating the sequence of actions mentioned in the article atleast ten times every day and would find some usage for it during programming. I would intentionally force myself to use it, until at some point, the action I just learnt magically comes in as a replacement for a dumb action I was about to do. At that point I would know I&#x27;ve mastered it.
评论 #9363228 未加载
Illniyarabout 10 years ago
Frankly I find vim an hindrance to the type of projects I work on.<p>One of the most common things I use an IDE for is navigation (between files) and vim is not very good at it compared to IDEs, here&#x27;s why:<p>* no tabs<p>* no project structure<p>* in my IDE (eclipse based or intellij based) I can ctrl-click a class&#x2F;object&#x2F;other to navigate into that object&#x27;s definition<p>* in my IDE I can search for classnames, I can press ctrl-T to find who inherits from something, ctrl-alt-H to find who uses something etc...<p>when I find myself actually writing code, it&#x27;s usually a line or two in each of several files (because modern programming paradigms tell us we should split code as much as possible), or modifying some copy pasted snippet I found on google - so navigation is extremely important even when editing.<p>beyond that, there are simply some things that help writing code that a text editor cannot do:<p>* auto-complete(with annotation to tell you what the function variables are)<p>* debug inside your IDE<p>* run code-lint, auto-build on typing to detect errors, etc...<p>* auto refactor (I.E. extract method, move variable, extract class etc...)<p>* format all your files according to your pre-specified project guideline.<p>* sharing you IDE configuration with other contributors<p>* showing when files are&#x2F;aren&#x27;t in version control and integrating version control so that you view history in your IDE.<p>There are probably projects out there where a full-featured text editor is a real game-changer and is worth the days&#x2F;weeks it&#x27;ll take to use it intuitively, but I never worked or know anyone who worked on such a project (even when I started projects from scratch);
评论 #9363346 未加载
评论 #9363074 未加载
评论 #9363318 未加载
评论 #9364336 未加载
评论 #9364062 未加载
评论 #9363170 未加载
评论 #9363111 未加载
评论 #9363440 未加载
评论 #9363137 未加载
评论 #9363212 未加载
评论 #9363076 未加载
评论 #9364743 未加载
weegoabout 10 years ago
<i>Yes, there are definite reasons why the vi&#x2F;vim editing model is just superior to any other out there</i><p>Zealots trying to convert unbelievers is plain obnoxious. Your choice of editor isn&#x27;t a religion so use what you use and I&#x27;ll use what I use and you don&#x27;t have to worry that what I&#x27;m using isn&#x27;t what you are.
评论 #9363281 未加载
评论 #9362897 未加载
评论 #9362938 未加载
评论 #9364374 未加载
评论 #9362989 未加载
pinzlertabout 10 years ago
I&#x27;ve been using Vim for about 2 years now, mostly because I can&#x27;t figure out how to exit it. ;)
评论 #9362867 未加载
评论 #9362932 未加载
评论 #9363000 未加载
评论 #9362901 未加载
xixixaoabout 10 years ago
For the article: If you try to argue for superiority, you should probably check the alternatives first and give an example where your preferred choice is obviously superior - the example of adding an empty body to each method is a great example where Sublime with multiple cursors beats vim (sure you can get them in vim to, but it doesn&#x27;t show vim being superior).<p>For vim itself: I have seen friends trying to learn it. I have seen PhDs and postdocs use it. I have seen coworkers use it. The only people who I could see were editing text as fast as friends&#x2F;PhDs&#x2F;coworkers using Sublime were my tech leads. The smartest most proficient and effective programmers I have ever met. Everyone else was slower, at times wrestled with the editor (by this I mean that they executed commands and had to redo them because they didn&#x27;t do what they wanted). I guess the conclusion is that people can learn to use vim as proficiently as Sublime, but most will fail or it will take them years (and I mean 5 or 10 years).<p>Actually, two of my tech leads, when I showed them some trick in Sublime were like: I should look into this. Maybe I&#x27;ll just boldly argue that vim is inferior after all :).
评论 #9363012 未加载
fit2ruleabout 10 years ago
I&#x27;ve been a vi user for 25 or so years, and I really only know a few commands - how to search&#x2F;replace, repeat last operation, search for the thing under the cursor, yank&#x2F;paste, #[cmd], block mode, set mouse=a, and so on. In that capacity I have supported myself as a software developer, productively, with much satisfaction in my selection of editing tool.<p>So I&#x27;m often quite delighted at learning new things with it, even still! And to be frank, I think this is one of the things I most like about vim - even though I&#x27;ve been using it for years, there are still undiscovered treats yet to be revealed to me, over and over. When I discovered cscope integration, some 10 years ago, it was like getting an OS upgrade .. in my editor! :)
wz1000about 10 years ago
The vim commandline together with the power of regexs make it very convenient to convert text from one format to another. It works something like this(<a href="https:&#x2F;&#x2F;vimeo.com&#x2F;15443936" rel="nofollow">https:&#x2F;&#x2F;vimeo.com&#x2F;15443936</a>). I don&#x27;t know how many hours I&#x27;ve saved on things like this due to vim.
评论 #9362885 未加载
评论 #9362893 未加载
bsaulabout 10 years ago
funny how people pay attention to how fast it is to change a piece of text in a editor. Most of my time programming is spent on a piece of paper or a whiteboard designing my data structures and algorithms. Actual typing , especially with an ide providing auto completion, is the thing that takes me the least amount of time, by far.
评论 #9363035 未加载
评论 #9363020 未加载
评论 #9363806 未加载
评论 #9363101 未加载
评论 #9363219 未加载
Anthony-Gabout 10 years ago
As a long-time vi&#x2F;Vim user, I thought this article provides an excellent explanation for non-vi&#x2F;Vim users for the reasons why enthusiasts choose to use such an old and unusual (for those coming from a GUI background) editor.<p>In particular, the author emphasises that you leave Insert mode as soon as you&#x27;ve stopped typing. When I first started using Vim, I used to spend too much time in Insert mode while moving around using the arrow keys.<p><i></i>What I learned from the article:<i></i> If you&#x27;re not positioned on a parenthesis, the `%` command will “scan character by character to the right, until the first one is found, and then moving to the character matching that one”. Until now, I’d always been using one of the `f`, `;`, `T` family of commands to move to a parenthesis or equivalent character. This will be a real time saver.
father_of_twoabout 10 years ago
I started using vi in the 90s and got very used to it. It&#x27;s still my standard text editor (the nvi implementation, that is).<p>I&#x27;ve never grasped vim. It was too slow at the time and the extended command set consumed all the free keys I use to have available to do my own macros (eg: &#x27;q&#x27; &#x27;g&#x27;).<p>I reckon vim grew to be much more than an editor, it is now an editing plataform, capable of so many things, and contains lots of shortcuts &#x2F; builtins for common text-editing situations.<p>The article above contains many vim-only commands. For example &#x27;di&gt;&#x27; (&quot;delete inner angle-block&quot;) doesn&#x27;t exist on standard vi, neither the &#x27;&gt;aB&#x27; (&quot;indent a Block&quot;).
评论 #9362936 未加载
rekorosabout 10 years ago
I once worked at a company where I had to use Visual Studio. Now I can&#x27;t believe I cared that much about it, but I basically refused to write code without vi. ViEmu saved the day, it was absolute magic.<p>I also really wanted vi bindings for navigation in team chat (isn&#x27;t it the most obvious thing ever?), so that&#x27;s how we made it work in Kato (<a href="https:&#x2F;&#x2F;kato.im&#x2F;articles&#x2F;en&#x2F;power-users&#x2F;keyboard-control" rel="nofollow">https:&#x2F;&#x2F;kato.im&#x2F;articles&#x2F;en&#x2F;power-users&#x2F;keyboard-control</a>)
bootloadabout 10 years ago
Vi vs Emacs again?<p><i>&quot;No, they are not dinosaurs who don&#x27;t want to catch up with the times - the community of vi users just keeps growing: myself, I only got started 2 years ago&quot;</i><p>Using batch to write FORTRAN, the editor was a card punch. On the Deck-writers (teletype) and VT100 terminals, I used to write Pascal, Ed was the only choice. Early Linux use forced your hand, Ed (again? NO) or Vi. This is because Emacs is a 30Mb download and where space was a premium. [0] Try using anything but Vi or Ed with Busybox. [1]<p>So I stick to Vi(m). I <i>can</i> use any cli editor but with much time and effort in Vi usage why change? I can but why?<p>[0] esr, <i>&quot;A Tale of Five Editors&quot;</i>, <a href="http:&#x2F;&#x2F;catb.org&#x2F;~esr&#x2F;writings&#x2F;taoup&#x2F;html&#x2F;ch13s02.html" rel="nofollow">http:&#x2F;&#x2F;catb.org&#x2F;~esr&#x2F;writings&#x2F;taoup&#x2F;html&#x2F;ch13s02.html</a><p>[1] grep &quot;emacs&quot; here ~ <a href="http:&#x2F;&#x2F;www.busybox.net&#x2F;downloads&#x2F;BusyBox.html" rel="nofollow">http:&#x2F;&#x2F;www.busybox.net&#x2F;downloads&#x2F;BusyBox.html</a>
thomasahleabout 10 years ago
Admittedly I haven&#x27;t been using vim more than a few months, but I wonder why all the move commands are based on text structures, such as lines, spaces etc.<p>Wouldn&#x27;t it be more useful to have commands for going to expressions, blocks, scopes and other code level structures?<p>I see vim people suggesting always leaving blank lines around functions, so you may use paragraph shortcuts to move them around. Why?
评论 #9363897 未加载
评论 #9363201 未加载
joezydecoabout 10 years ago
Embedded developer here. A lot of times I need to edit a file on the target and I can easily put vi on the target system through busybox. Having the same editor on both sides is a nice thing.
daemonkabout 10 years ago
I mainly use vi for working remotely on a server. It&#x27;s just easier than using X or something.<p>But I use sublime or some other graphical editor when I am on my own computer.
评论 #9363082 未加载
TazeTSchnitzelabout 10 years ago
For me, vim didn&#x27;t have a steep learning curve. I&#x27;ve barely scratched the surface of its command set and basically know very little of it, but I didn&#x27;t need it to be incredible, just better than TextMate.
lqdc13about 10 years ago
I love vim. vimscript on the other hand...<p>Also it&#x27;s gimped without addons which you very much miss when using someone else&#x27;s machine.<p>And if they happened to not have compiled with clipboard support, you&#x27;re in a world of hurt.
评论 #9362869 未加载
erokarabout 10 years ago
&lt;esc&gt;:q!
gargarplexabout 10 years ago
I was exposed to vi 15 years ago but not until recently have I decided to get better at it. This article was great and helped a lot. It&#x27;s a fun skill to improve.
scotty79about 10 years ago
I wonder if you could bind mouse gestures to vim normal mode commands and use left hand for typing stuff and right hand to do magic.
Theodoresabout 10 years ago
&gt; Correct-conception #1: steep learning curve<p>I was fortunate to learn vi by rote, in a series of lectures where there was no computer in the room. Yep, copying the likes of &#x27;:wq&#x27; from the hand-written blackboard to A4 paper, along with all of the other &#x27;handy&#x27; commands, some of which such as &#x27;yank&#x27; I do not use to this day. This was a whole different way of learning with the notes referred to rather than things getting &#x27;Googled&#x27;. Was this a better way to learn vi?<p>I don&#x27;t meet so many &#x27;vi&#x27; experts these days, if anything I feel embarrassed to be using &#x27;vi&#x27; and associated command line tools like &#x27;grep&#x27; when everyone else has some auto-completing high-speed IDE instead. I have to &#x27;psr-fix&#x27; my code to make it sufficiently elegant. The problem for me is that I can do most things in &#x27;vi&#x27; without having to hunt around for menus etc. Therefore, moving to the new is hard for me. In some ways I am like a secretary knowing &#x27;Wordperfect&#x27; 25 years ago and unable to adapt to &#x27;MS Word 2.0c&#x27; due to the same UI problem and convenience of known tools (Wordperfect, Vim).<p>I also do not feel that &#x27;vi&#x27; works well in a team, people with Mac-gui-loveliness computers just can&#x27;t edit things on your computer on an ad-hoc basis, some visual editor has to be found just for them.<p>If you are a vim person then these funny new-fangled &#x27;gui&#x27; editors are really dangerous. It is far to easy for the document to end up with mystery &#x27;j&#x27; characters added to the first line, &#x27;:wq!&#x27; added somewhere at the end, maybe with some randon &#x27;ijk&#x27;s&#x27; in the middle. If you are a vim person then every editor should have an &#x27;insert&#x27; and &#x27;normal&#x27; mode, not just &#x27;insert&#x27;. The rest of the world doesn&#x27;t see that though.<p>With people that do use &#x27;vim&#x27; I have noticed that everyone does things differently. Some people will regularly use a feature that you never use, to make you wonder why you don&#x27;t know that trick. Life without the correct, personalised &#x27;.vimrc&#x27; file is also quite hard, however, I have found some of these that others use to be overly &#x27;souped up&#x27;, for instance the search, I really do not like the search-as-you-type option, old-school is better, where you need to press enter.<p>So everyone finds their own dialect of &#x27;vim&#x27;. Like car drivers, everyone thinks they are a good &#x27;vim driver&#x27; apart from those that haven&#x27;t learnt to drive. And they shouldn&#x27;t. Amazing that vim is, it is a relic of former times, there are better tools with better &#x27;UX paradigms&#x27;. In my field none of the &#x27;programming gods&#x27; use &#x27;vim&#x27; as they can&#x27;t get to their productivity levels with it, so they use modern IDE&#x27;s for their work, retaining enough &#x27;vim&#x27; for any server side config file editing.
评论 #9363024 未加载