4 ms·
4k loc in a single file must be brutal
by aleksjess 2y ago
4k loc in a single file must be brutal
- diggan 2y agoCan be, can also be just like using multiple files, especially since OP seems to be using neovim. Open a buffer per area and work away, just like using tabs/panes with multiple files. Personally I wouldn't do it either.
- lukaesch 2y agoThanks! I was inspired by levelsio's meme about having MVPs in a single index.php file. Traditionally, I've organized codebases into folders, but I started questioning its necessity. Folders often just add an extra layer to search through. It's basically a search param. With Neovim and strict naming conventions, I've found managing everything in one file works quite well. Keyboard navigation can make folders feel like a hassle in the vi context. This setup has been effective so far, though potential downsides might appear later on.
- samatman 2y agoMight want to check out Harpoon: https://github.com/ThePrimeagen/harpoon/tree/harpoon2 https://github.com/ThePrimeagen/harpoon/tree/harpoon2 No comment on your one-file approach one way or the other, but like all of us, you will need to deal with tree-shaped projects, I've found Harpoon to be a good solution for this. Global marks can only get you so far. Good luck with Audioscape btw.
- roland35 2y agoI like to use lazyvim - <space> s S does a global symbol search which is super handy and works great with any cargo project thanks to rust analyzer.