On 05/01/09 12:01, 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.
>
> 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.
>
> Thanks!
> -Per Thulin

There are several methods depending on your exact needs and procedures.

For the kind of use-case described above, I think that I would use 
split-windows in one Vim instance (probably gvim but YMMV), with 
different local directories in different windows thanks to the ":lcd" 
command.

Another possibility would be several bash sessions in an X terminal (for 
instance, a konsole window with several tabs, one bash instance in each 
tab), and one (or more) gvim session(s), possibly with split-windows as 
above, pasting from one (bash or gvim) X window to another by means of 
the clipboard.

If you don't have KDE or maybe even X11 installed, you might check the 
manual for the "screen" command to open several simulaneous bash 
instances in a single console. I don't use it myself but I've heard much 
praise of it by those who use it. (If you have X and Gnome but not KDE, 
check the capabilities of the gnome-terminal program: I know the name 
but not the details. If you use the Gnome winmanager but have KDE also 
installed, you can run any KDE application, including konsole, under Gnome.)


Best regards,
Tony.
-- 
"The Army is a place where you get up early in the morning to be yelled
at by people with short haircuts and tiny brains."
                -- Dave Barry

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to