Live data from Hacker News

Vim Creep (2011)

rudism.com

61–70 of 169 posts

Re: Vim Creep (2011)

#61
post #6

> 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.

For me Vim’s value is as a great programmer’s editor, not so much as an IDE. There are a few things I have made or installed that I just could not live without:

* CamelCaseMotion, allowing select/delete/change of just one or a number of segments of a camel case or snake case name

* surround.vim, allowing single commands to (for example) change the () surrounding a text to [] or “ to ‘

* a simple one-liner to change a literal Python string to a f-string and back without losing the current edit position

And in general the power of the motion + action vocabulary that lets you compose edits on the fly once you have the motions and actions under your fingers. You don’t even have to think to type ysiw” to put “ around the current word, for example, or vt)~ to change the case of everything up to the next ).

Re: Vim Creep (2011)

#62
post #42

If 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.

Yeah 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.

Re: Vim Creep (2011)

#63
post #16

I'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.

I highly recommend trying out VSCodeVim. Use it for Go, JS, C, Rust and more - it's really enjoyable, and even stuff like C - W works just fine.

Unfortunately that plug-in is a horrible performance hit to an editor that already is on the slow side of typing responsiveness.

Re: Vim Creep (2011)

#64
post #50

Earlier quoted context omitted.

All these points are also natively handled by vim. Except for 5 which needs an external cli calculator.

But are those functionality available natively without plugins? All these are in the default emacs distribution possibly since more than 20 years, and are in a very usable, stable state of functionality.

Some of them do take plugins (the netrw plugin I think) but this plugin is included and active in a default install.

Re: Vim Creep (2011)

#65
post #12

Earlier quoted context omitted.

There 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).

Close 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 emul…

:ALEHover

Re: Vim Creep (2011)

#66
post #50

Earlier quoted context omitted.

All these points are also natively handled by vim. Except for 5 which needs an external cli calculator.

But are those functionality available natively without plugins? All these are in the default emacs distribution possibly since more than 20 years, and are in a very usable, stable state of functionality.

Aren't these technically plugins for emacs that are shipped with the editor? Org-mode is a plugin for emacs too right?

Re: Vim Creep (2011)

#67
post #27
post #8

Earlier quoted context omitted.

IMO 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…

Without plugins Visual Studio Code in principle is just an editor. Yet even without any plugins or language-specific support it still a better tool for development out-of-the-box than Vim or Emacs. It can quick open and search across a development tree with thousands of files with no configuration. So as an editor for config files and small projects Vim without plugins is OK. But that basic Vim experience just does n…

> Yet even without any plugins or language-specific support it still a better tool for development out-of-the-box than Vim or Emacs.

ⓘ This claim is disputed.

> It can quick open and search across a development tree with thousands of files with no configuration.

M-x find-grep would like a word.

Before you say anything, Visual Studio Code depends on (and bundles) ripgrep to do its fast searches. (Emacs defaults to using your system's grep.)

Re: Vim Creep (2011)

#68

Earlier quoted context omitted.

Close 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 emul…

:ALEHover

Can that issue be closed? I can visually select an arbitrary expression and :ALEHover?

Re: Vim Creep (2011)

#69
post #62
post #42

If 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.

Yeah 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.

Just 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.

Re: Vim Creep (2011)

#70
post #45

Probably 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. The…

Not to be too pedantic but shouldn't that be ddGp?

Also, have you tried the Vim plugin for VSCode?

Post reply on HN