How do vim people quickly navigate their code without going "what was the name of that file with that function"?
How do vim people quickly navigate their code without going "what was the name of that file with that function"?
These days people generally use some kind of fuzzy finder plugin thats basically the same as the vscode experience. Exactly which one you use depends on various factors, but Telescope and Fzf are two big names and both allow searching through a bunch of other stuff, setting names, edit history etc. (You can also save the fuzzy search results to the quicklist so you've basically got a reusable index).
And neovim is heavily embracing the LSP paradigm, where you'd use something like gd to jump to definition when on top of a function and a language specific LSP server will tell Neovim where to jump to.
This x100. I switched to neovim+pylsp a few months ago, and it's been an absolute delight. I use lspconfig [1] and pyslp [2] since most of my time is spent developing Python code. Not only can I navigate more quickly and easily, I also find myself catching more silly errors before run-time due to better linting from the lsp.
It used to be that I wouldn't use vim beyond quick edits on single files. Although I still prefer to use vim style bindings in IDEs, I can go much further before I feel the need to fire up an IDE in the first place.
I tend to use FZF[1] which has functions for leveraging ripgrep and silver surfer for searches. It can also use find. FZF also has dialogues for paring down results in real time (i.e., as you type)
There are also plugins that are much more nuanced and more involved for searching symbols and providing autocomplete. Duoplete, vimcomplete, youcompleteme spring to mind.
[0]: https://ctags.io/
I also keep vinegar around for when I want to poke around at the contents of a directory.
The other alternative is to set up a Language Server (LSP) for navigation and you can use the same ones as VSCode uses.
It lets you do pretty much what you say allowing me to type <leader>-f and partially type things to remember where I am with a preview pane. Seems moderately fast most of the time for the monolith I work on.
You can combine this with grep and the location list to find symbol usage across multiple files.
nnoremap <leader>g :grep <cword><CR>
You can then use :cnext and :cprev (or focusing the window and selecting an entry) to navigate between them.As others have stated, you can also use ctags (plugins like https://github.com/ludovicchabant/vim-gutentags are useful for refreshing tags in a project), but for some languages you may need to add a tag definition (e.g. for something like rust or zig). For older languages like C you should be fine.