Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I do all of this from vim. I have \a bound to repeat my last / search using ripgrep in the current directory, and open the matches in a panel below. I have \gd bound to go to the definition/declaration of a symbol.


Searches in a directory.. do you mean files or file contents? What do you do for his example of navigating to a file from the rust tool output?


I have Ctrl-p bound to use `fzf` to fuzzy find files by name, just like in VSCode or Sublime. \a uses `rg` to search file contents. I don't use rust much, but if I wanted to go to a specific line in a file, I would probably just use C-p to open it with fuzzy find, then :(lineno) to navigate to the correct line.

I do tend to just run tools in another terminal, rather than keep my terminal in vim. If I'm on a remote machine, I sometimes use tmux to run multiple panels, but I'm more likely to just open two instances of alacritty and ssh in twice. With ControlMaster set up, the second ssh session gets multiplexed over the first connection, so there's very little additional latency to open a terminal with C-<return> and then ssh in with `C-r ssh <return>`, which uses fzf to search my history in most-recent-first mode.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: