Hacker News new | ask | show | jobs
by gen220 2048 days ago
Sure! One example is vim-dispatch, which provides a convenient interface for executing arbitrary shell commands asynchronously.

It works wonderfully with make, so you can run “make $file” in a couple strokes. I use this when writing markdown (to generate html with pandoc), editing test files, etc.

Another example is when I’m “cleaning” a large csv file. Most times, I can record my movements cleaning a single line, and then replay those actions N times. You could do the same thing with a regex sometimes, but for really complicated files this is easier.

A final, simpler one: I have <Leader>f mapped to fd piped into fzf piped into open. Other editors probably have fuzzy file finders. Some of them maybe even use fzf internally.

But I think this example demonstrates how vim embodies UNIX ideas, as a modal text editor that depends on other binaries for complex behavior. People levy this as a complaint, that it doesn’t come feature complete, but it’s in reality a strength. Because while other editors wax and wane in terms of features and performance, vim only ever gets faster, as the binaries you depend on are swall out for better replacements every couple years.

1 comments

Unfortunately I'm not understanding what makes vim special here

> It works wonderfully with make, so you can run “make $file” in a couple strokes

I can do this in any editor I've ever used

> Another example is when I’m “cleaning” a large csv file. Most times, I can record my movements cleaning a single line, and then replay those actions N times.

I can do this in most editors I used (VSC being an exception). I use recordable macros all the time to clean up lines in emas or slickedit or any other editor that has recordable macros

> A final, simpler one: I have <Leader>f mapped to fd piped into fzf piped into open. Other editors probably have fuzzy file finders. Some of them maybe even use fzf internally.

Can do this in every editor I've ever used too.

Any actual vim only examples?

To clarify, I don't think these (or any) features are "vim-only".

I was intending to say that it's the meta-feature of vim that vim-users find so sticky, that you can trivially write your own features: composing arbitrary executables and modal editing.

I think most editors nowadays are taking a page out of vim's book, by exposing increasingly lower-level interfaces to extension authors and users.

In these ways, I think editors are converging with vim, over time. Vim (and emacs) has been this way forever.

You don't have to wait for the editor-making company to accept that your strange request is valid, you can just hack it on yourself.

I've had all those features in every editor I've used since the late 80s so no, no one is taking a page from vim or emacs.