9 ms·
Vim Creep (2011)
- ensiferum 6y agoYeah I went from notepad to visual studio to emacs to sublime text2 to vscode and finally gave up all that nonsense and got back on good IDE and got Clion. Simply the utility of the code refactoring tools completely blows any text editor out of the water. For example when I want to do a simple refactoring such as rename a function or a class I can do this trivially in seconds. I could never find anything like this for any of the editors I tried before. OK, I mean there's some clang based plugin for vscode for example but the the functions it has (such as code completion) basically almost never works and it has very little to offer in terms of refactoring. That being said I adopted emacs style key bindings which I use continuously for the most common editing things. I find this is really the best bang for the buck and best of "both" worlds!
- jacknews 6y agoNice story, but :wq ? I've mapped ZZ to :w, ZX to :x, and QQ to ZQ / :q! to quit.
- lunchladydoris 6y agoIn case anyone else hasn't heard of or used :x > Like “:wq”, but write only when changes have been made. https://til.hashrocket.com/posts/2fdb6afb66-difference-between-wq-and-x https://til.hashrocket.com/posts/2fdb6afb66-difference-betwe...
- arendtio 6y agoSome time ago, I read, that the usage of :x is discouraged, as the typo :X is easy to make and leads to encrypting the file accidentally.
- lucb1e 6y agoTIL vim has encryption. If you're annoyed by typoing stuff, like I'm annoyed by typing :Wq or :WQ, you can just alias it of course. Since you (and, presumably, nobody) ever use(s) vim encryption it doesn't matter to override it. vimrc: command Wq wq command WQ wq command W w command Q q
- seszett 6y agoMy problem is writing :x instead of :w (on an AZERTY keyboard) and accidentally exiting when I just wanted to save.
- hiq 6y agoUse neovim instead to solve this problem, :X has been removed (and you shouldn't use it in vim either anyway).
- mkl 6y agoYes. By default, ZZ is the same as :x (write if changed, then exit). Quicker and better than :wq.
- unkulunkulu 6y agoKind of expected a darker end to the story, feels good to hear such a vim optimist, thanks!
- ur-whale 6y agoPreviously discussed: https://news.ycombinator.com/item?id=4235876 https://news.ycombinator.com/item?id=4235876
- stfwn 6y agoI studied piano full-time for a short while. My favorite thing about it was how working on my technique or a particularly tricky rhythmic pattern tickled my brain. I often found that I went through a few phases: “ahrg, this is impossible!”, “getting there but sloppy” and finally, often suddenly (after a good night’s sleep) “this is easy! I don’t know how I was ever not able to do this”. Using vim and learning new features tickles my brain in kinda the same way. I don’t care much for the hacker credits. It’s a fun variety in my work day to practice some little feature that I read about, and it doesn’t look like I’ll run out of new stuff to check out anytime soon.
- tylerscott 6y agoI never had the words to express that feeling. Tickling the brain is exactly the experience. I also love learning a new trick in Vim even after all these years.
- philipswood 6y agoI love the related "I know kung fu" feeling (from the Matrix) when you realize what was very difficult, or almost impossible is doable now. Great feeling.
- phonethrowaway 6y agoendorphin tickles
- dontTango 6y agoI'm interested in using vim, but I'm not thrilled about trying to set up debuggers when an IDE has it for you. Maybe I'm over complicating it, anyone have a python based suggestion? As a note, I do not have local admin but Vim is installed already.
- dfee 6y agotmux + ipdb would be my alternative. I even use that approach within vscode.
- huseyinkeles 6y agoIf you want to have it the other way around (having Vim inside your IDE instead of turning your Vim to an IDE) I’d suggest you to try IdeaVim [0] with PyCharm. Works very well, you can even use your own .vimrc file. [0] - https://github.com/JetBrains/ideavim https://github.com/JetBrains/ideavim
- Plastikdusche 6y agoYes, that's what I'd recommend too. Had a few days off and dived into my vim setup /plug-ins for python, but ended up with pycharm again. I could emulate most of pycharm (pros) features, but what made me end up going back to pycharm was the refactoring capabilities. Rope just didn't come close, while pycharm makes it trivial and rarely misses anything. Well that and having to manage all of these plug-ins on different OS/ python versions can become a time sink too. E.g. started out with vundle, but it did not support some of the features I needed to get an older commit of a plugin that was barely maintained anymore, so ended up rewriting the.vimrc with a different plugin manager... Etc etc
- simias 6y agoIMO if you want an IDE use an IDE. There are a wealth of plugins that attempt more or less successfully to bring IDE-like features to VIM, but I'm not sure I see the point personally, it'll never be as seamless as an IDE built and maintained from the ground up to do these things. I hear that many IDEs have semi-competent Vim-style editing support, so maybe that would be more to your taste. If you want to try the Vim experience I suggest doing it the Vim way, use a minimal config when starting, only add plugins after careful consideration, prefer simple generic tools like grep/rg, FZF, dumb completion and ctags over complicated tight integration with language servers and debuggers. But maybe you prefer more integrated environments and that's perfectly fine, but in this case I wouldn't recommend a switch to Vim unless you have a very good reason to want it.
- dmitriid 6y ago> You recorded macros, you moved entire blocks of code with the flick of a finger, you filled dozens of registers, and you rewrote and refactored entire components without even glancing at your mouse. You mean: spend untold hours scripting and recording interactions that give you about 10% of capabilities of a modern IDE. I've personally seen long-time vim users switch to Idea after looking over my shoulder.
- lawn 6y agoThere are language servers for Vim that take you much closer to IDEs than you give it credit for. Goto definitions, intelligent autocomplete, inline diagnostics, smart renamers, type hints and more are all available. All with very little configuration and it works the same no matter the language (as long as it as SLP support).
- dmitryminkovsky 6y agoClose but not close enough. For example: in VSCode you can select/hover over any expression and it’ll tell you the computed TypeScript type. None of the current language server tools for Vim (eg ALE) give you that information [0]. Why would I live without this useful feature just to use Vim? I love Vim, but I love knowing the type the TS compiler thinks an expression is even more, especially when good enough Vim emulation is available. [0] https://github.com/dense-analysis/ale/issues/3206 https://github.com/dense-analysis/ale/issues/3206
- andreypopp 6y ago:ALEHover
- dmitryminkovsky 6y agoCan that issue be closed? I can visually select an arbitrary expression and :ALEHover?
- sweeneyrod 6y ago
- YesThatTom2 6y agoTruly a great story! Reminds me of this story... Two years ago I was collaborating with a coworker. Most of our time was in his office. I would look over his shoulder as he typed. He had recently adopted a new IDE and spent considerable time configuring it and learning its features. He was very proud of how productive it made him. Then one day we collaborated in my office instead. I use plain Unix tools, all independent. He watched as I did everything he did but with point-tools instead of a huge IDE. Rather than switching between files, I started a new terminal window and ran Vim. Other windows were for the build-run-crash loop, analyzers, note-taking, etc. Often I would do Vim tricks like doing a calculation by writing a formula on a line in Vim and piping the line to "bc" (`!!bc RETURN`). In fact, many of his IDE features I would access by calling out to external programs. I had to hold back a laugh when he said: "Oh my God! Linux IS your IDE!" Well, duh. Isn't that's what Ken and Dennis created in the 1970s? Unix started out as the ultimate development environment! It just also happens to run everything else now.
- FeepingCreature 6y agoMy .bashrc is on a quest to turn my yakuake into the better half of vscode. "The shell is my IDE" is definitely true. Though Google takes up a worryingly large fraction of it. Wonder if there could be a shell tool to just dump the first stackoverflow hit for a search. bashrc highlights: https://gist.github.com/FeepingCreature/649588a2f6fa27c717bdde02a2b92eb4 https://gist.github.com/FeepingCreature/649588a2f6fa27c717bd... - ctrl-G for "directory up" - ctrl-E for "find and open in editor" (using fzf, substitute 'edit' with your editor of choice; the history gymnastics is to basically pretend that you typed it in manually for purposes of bash history) - and of course, for german keyboard layout devs, rebinding capslock to alt-gr.
- boogies 6y ago> Wonder if there could be a shell tool to just dump the first stackoverflow hit for a search. There should be. I think `curl cheat.sh/programming+question` does that. There might also be a way to do that with surfraw. I just use DuckDuckGo, it almost always pops up an Stack Exchange answer in the sidebar when I search for something relevant to an SE.
- welix92 6y agoThis resonated massively with me. I'm very glad that at some point in my university days I started to play around with Vim and today I can benefit from the muscle memory in almost every application I use, even if I hardly ever use Vim directly anymore.
- appleflaxen 6y ago2012 discussion is interesting https://news.ycombinator.com/item?id=4235876 https://news.ycombinator.com/item?id=4235876
- bgribble 6y agoI’m a Vim user and proponent so don’t get me wrong here, but is “creep” in the title intended to be a description of what Vim does, or of the Vim user/protagonist? :)
- arendtio 6y agoAnother option is 'the way in which vim spreads'
- codetrotter 6y agoI thought it was going to be about installing too many plugins in Vim.
- himujjal 6y agoMan. This is honestly every Vim user story. How I despised Vim/Nvim in the early days of me using Vim. Now, its all past and Vim is my workflow. Browser, TUIs, etc etc you name it. Once nvim-dap starts working well. I am not going to even install VS Code. For now, debugging is a real pain in the ass.
- nishparadox 6y agoI see a reflection of myself in this story...
- graderjs 6y agoThis is good. It reminded me that "vim" is actually a word: "with vim and vigor." It's an appropriate word. Sort of like a retroactive nominal determinism, because it's "vi-improved", so the Mooleanaar probably didn't name it because vim means energy, but, basically that's what it means for a lot of programmers (including me). All these years, I never recalled the connection between the word and the name of the tool, until reading this story! Great!
- markus_zhang 6y agoI'll stick to an IDE. Modern IDEs are sophiscated enough that a Vim/Emacs newbie user probably needs years of practice and tons of plugins to match and go over its capabilities. I think Vim makes a lot of sense when 1) the machine doesn't have a proper IDE, and 2) you really do a lot of programming every day and you are young, like in 20s, so you can amortize the cost for longer time.
- ragona 6y agoI’m also an IDE fan, but I love vim plugins for text navigation. For editing a bunch of files like text, I’m likely using vim. But for doing proper application work, refactoring, debugging — I’m with you. I might be good at vim but gdb is a whole different beast.
- Omnus 6y agoI am making a game. I use Vim (infinitely faster and more product than other text editors) and write a single command in my terminal to compile. Vim makes a lot of sense when you want to work fast and don't want bloated development toolchains to slow you down. There's nothing in modern IDEs that would increase my productivity that I can't add to Vim in about 5-20 minutes.
- markus_zhang 6y agoJust curious do you plan to open source or sell it? WOuld love to see other's game.
- Omnus 6y agoI think I'll have an alpha/beta testing period with interested volunteers. Then hopefully sell it. Then after some years and waning interest, probably open source it.
- markus_zhang 6y agoThanks it's good to know.
- seamyb88 6y agoVim very much parallels a user's story with linux. Experiment just enough that you catch a glimpse of its true power and you become a snob. Your workflow is amazing and anybody who uses Windows/IDEs is a lesser mortal. I will say that, while vim has a great, great many advantages, I'm often honest with those I'm trying to convert. Like the article said, there is a learning curve and you probably shouldn't try to gain the efficiency offered at peak work times, for e.g. with a deadline looming. Also, you accidentally hit a letter key and you can do something far less obviously wrong than inserting that letter into your text. But these are like getting a runny nose from a medicine that saves your life.
- grecht 6y agoIf your editor makes you significantly more productive, maybe you're just writing boilerplate code, or something someone already implemented in a library. Touch typing is similar - it's useful because it removes some unnecessary barriers and thus makes the job more enjoyable, but it won't magically make you a better a programmer.
- brobdingnagians 6y agoI agree, but I think it is also like learning Lisp. I don't program in Lisp, but I think differently about some things because of it. Like code as a list that can be manipulated. Code as data, which is similar to Vim. Vim encourages thinking about things in terms of a language that represents structural units. I think more about how to code is structured rather than thinking about it as just freeform text with semantic meaning. Whether that structural mindset helps with programming.... Dunno.
- cma 6y agoLots of times you could write something more succinctly with less boilerplate using, say, C preprocessor macros, but then end up losing out on debuggability, and sometimes searchability. Complex block based editing etc. is useful in those situations. It's a limitation of the tools.
- 0x008 6y agoYeah I always wonder who these people are for which the editor is a bottleneck and how they work or what they work on. 90% of my time is spent debugging, understanding legacy code and drawing trees or writing pseudo code on my notepad. The actual time I type stuff into an editor is like 10minutes per day.
- enriquto 6y agoJust a single data point, but as a matter of principle I never use a debugger. Any time spend inside the debugger is 100% lost and useless to other people. To study a code, it is best to copy it, run it, and keep adding assertions, comments, and logging infrastructure. Besides helping you to understand what the code does, all these changes are useful for other people who may need to understand the code in the future.
- jjice 6y agoProbably the best second person POV story I've ever read. Very funny and I got a kick out of it. As a relatively new part time vim user (about a year), I felt portions of this. I still use VSCode for a handful of tasks, but Vim has taken over more and more. This past semester I had to SSH into our CS servers for my OS class, and the way my group would work was usually me sharing my screen and us peer programming. There were multiple occasions my group partners would stop me and ask how dude something like remove a full line, put it in a register, and pasted it at the bottom of the file so fast. ddgp I love the reactions to it, because people get excited and I encourage them to try him themselves. I'm also very much an amateur when it comes to vim. I love seeing vim masters in action, it's so interesting. I think I'll forever remain the right eyed character who asks "how did you do that?", and it's that sense of wonder that makes me love vim.
- barbs 6y agoNot to be too pedantic but shouldn't that be ddGp? Also, have you tried the Vim plugin for VSCode?
- IggleSniggle 6y agoI've tried the Vim plugin for VSCode a few times personally, but I don't trust it. It's incomplete, and it has its own secondary understanding of history that can get you into trouble when it interacts poorly with VSCode's own history. Anyway, that was my experience for my short time using it. I'm curious if there are any longtime vim users using VSCode with the Vim plugin, and if so, what are their experiences, and why do they use VSCode with a Vim plugin instead of just using vim itself?
- BadInformatics 6y agoI used to, but switched to https://github.com/asvetliakov/vscode-neovim https://github.com/asvetliakov/vscode-neovim. It's much faster, doesn't lag the editor at all and has less of an impedance mismatch because it uses Neovim under the hood instead of trying to emulate functionality from scratch. There are a few reasons why I use a vim plugin instead of vim proper for most day-day work: 1. I do plenty of data science-y stuff that requires support for good visuals. Vim's support here is pretty lackluster and Jupyter's Vim mode sucks. VS Code has a great interactive mode with full autocomplete and a dedicated window that records plots/output history. 2. Language servers and LSP plugins are so much easier to manage. I rarely if ever have to babysit updates and I don't have to install a bunch of system-wide dependencies to get certain ones to build. 3. Making the above (and all other fancy VS Code functionality) work on multiple remote machines is a breeze. The normal Vim workflow would require cloning dotfiles (not a big deal), running setup with something like GNU Stow (almost never installed) and then futzing around with LSP plugins as in 2). 4. Built-in rendering of rich docstrings/doc pages (think Markdown, Sphinx RST). I want to say certain extensions/languages support LaTeX as well, which would be a bear to read in Vim.
- b0rsuk 6y agoCan you recommend some resources about using Vim effectively without turning it into an IDE? I'm a self-learned Vim user and I'm sure I could learn a lot by observing experienced vim users. Kakoune has ambitions to be the true "unix way" editor, but it makes some very questionable design decisions like plugins made in shell scripts. For the sake of compatibility. Neovim's decision to fully support Lua appeals to me much more, I mean it is a compromise but a good one. It's a good and fairly popular language.
- Hahhaa 6y agoI'm a self-learned vim user too. I been using vim the wrong way till i watch this video, https://www.youtube.com/watch?v=l8iXMgk2nnY https://www.youtube.com/watch?v=l8iXMgk2nnY VIM tutorial: linux terminal tools for bug bounty pentest and redteams with @tomnomnom Now I keep my vimrc simple and use neovim for more complex stuff.
- LiamHz 6y agoThis was a great video, thanks for sharing! It made me realize that I haven't been using unix commands enough in Vim
- htor 6y agovi vi vi $ucks the li∫e outt∆ ü it iZ th3 edi‡0R of the devifl vi vi vi
- mokha 6y agoThis is my story.
- multidim 6y agoWhat's the biggest appeal of ViEmu over VsVim?
- todd8 6y agoI've programmed for a long time, since before the days of personal computers and graphical terminals (unless you count oscilloscope like vector graphics output devices). So, I'm quite comfortable at the command line and use it all the time. I think it's interesting that there are nevertheless a few tools that I find indispensable which don't run in a terminal: obviously, the "big" graphical apps (like those from Adobe) and web browsers, but even my apple track pad for scrolling works so well that there is nothing quite like it.
- ropeladder 6y agoDoes anyone have any good recommendations for screencasts of advanced Vim usage? I'm pretty comfortable with the basics (I'd say my level is "try to use macros sometimes and find them too clunky"), but in these days of remote work I don't get to look over my co-workers shoulders too often, so I don't feel like I have a good idea for what I'm missing. Less "here is the way to do this thing" and more "watch this wizard at work and get inspired, maybe with a bit of commentary."
- JNRowe 6y agoDrew Neil's awesome vimcasts¹ are available, while no longer getting updates they'll still be pretty useful. Also a /big/ fan of his Modern Vim book², even after literal years of vim use I still found a bunch of new-to-me information inside it. ¹ http://vimcasts.org/episodes http://vimcasts.org/episodes ² http://vimcasts.org/blog/2018/05/modern-vim-now-shipping/ http://vimcasts.org/blog/2018/05/modern-vim-now-shipping/
- rendall 6y agoI had this experience a few weeks ago. I was showing a colleague something, using vim as normal, and he started shouting "Whoa whoa! What are you doing? You don't use a mouse?" "Vim!"
- vram22 6y agoA spur-of-the-moment experiment in literary elision and allusion, based on reading the OP: https://mobile.twitter.com/vasudevram/status/1337813286163628032 https://mobile.twitter.com/vasudevram/status/133781328616362...