←back to thread

538 points todsacerdoti | 1 comments | | HN request time: 0.471s | source
Show context
robenkleene ◴[] No.44358285[source]
I love this, I've been iterating on workflows like this for something like a decade now. Over time I've tried to peel back as many of my custom layers as possible, because all of those layers have a maintenance cost.

Stock Vim (without `tmux`) can actually do most of what's shared in this post with `rg --vimgrep restore_tool | vim -c cb -` (`vim -c cb -` is my favorite feature in Vim; I find it strange that it's so rarely used or talked about).

(Since re-running the `rg` search can be undesirable, and I often like to analyze results in a terminal before opening them in Vim. I use a custom `tmux` command to copy the output of the last command [using this trick that involves adding a Unicode character to your prompt https://ianthehenry.com/posts/tmux-copy-last-command/], then I send that into Vim with e.g., `tmux saveb - | vim -c cb -`.)

replies(7): >>44358653 #>>44358736 #>>44360925 #>>44362611 #>>44363893 #>>44364510 #>>44403351 #
1. jez ◴[] No.44362611[source]
This is cool, I learned about `:cb` today (populate quickfix from current buffer)

I find that if I’m already piping into a buffer, I just leave it as a buffer. Vim’s gf and gf keybindings let me jump to the filename under the cursor, and it being a buffer makes it easier for me to edit (reorganize, group, further filter, etc).

I do think people undervalue the quickfix buffer though!