Per Thulin wrote: > Hello fellow vim users! > > I use vim for all my coding and text editing needs. Until now I've > only used it for small projects with all files in a single folder, > nothing complicated. However, my current job involves a lot of jumping > around between files in very different file hierarchies, copying > pasting etc. I've tried a few different strategies: > > 1. Use bash to jump around in the system and open/close new Vim > instances when I need to edit something. This makes it easy to > navigate the file system but doesn't work when I need to copy/paste > content from e.g. /foo/b/c/d.txt to /bar/a/b/c/d.txt, as I need both > these files open in the same vim instance, and to open those files as > absolute paths is a PITA. > > 2. Have one Vim instance and use :Ex to navigate the file system. The > biggest problem with this setup though is that when I've navigated to > a different folder, I can't use :e to open a new file in this same > folder because the working directory that :e looks at isn't affected. >
This "feature" is something netrw has to emulate the previous file explorer's behavior. I don't like it myself, and caught grief about it when netrw didn't have that behavior as its default. Anyway, the fix is simple; put let g:netrw_keepdir= 0 into your .vimrc. > I think the best solution for me would be if there was a way to have > multiple terminals where I can use bash and vim however I choose, but > copy/paste content freely between them. I have no problems with > multiple windows, just need to be able to copy/paste. > > So my question is: how do you manage long file hierarchies in vim? I > know it's possible because I've heard about very skilled developers > doing the same work as I do entirely in vim. > You can have multiple windows with netrw running in several. You can use the marked-file-(copy|move) capability to copy/move the file(s). See :help netrw-mf :help netrw-mc :help netrw-mm Regards, Chip Campbell --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---