You are not logged in.
I've been trying out vim for a couple of weeks now, and I must say that I like it. I use it mostly for programming at work (a couple of hours per day).
One thing I haven't settled on is how to use a single vim instance to edit multiple files. I've tried tabs and have been reading about vim+screen (how does yank + paste work between vim instances under screen, btw?).
Which method would you recommend?
Offline
A combination of tabnew, split and vsplit
Offline
A combination of tabnew, split and vsplit
That's also my case. I also prefer gvim over vim because of better font rendering and major amount of colors. I don't use screen proficiently but suppose you can use "+y for copying and "+gp for pasting.
You could map these combination to some keyboard shortcut.
By the way...sorry if offtopic.
I can see why many of users use screen. I use it only if I have to keep active a job over a ssh session. Locally I prefer tabs or multiple terminal windows instead.
Last edited by ArchArael (2009-04-30 08:20:17)
Offline
Ramses de Norre wrote:A combination of tabnew, split and vsplit
That's also my case. I also prefer gvim over vim because of better font rendering and major amount of colors. I don't use screen proficiently but suppose you can use "+y for copying and "+gp for pasting.
You could map these combination to some keyboard shortcut.By the way...sorry if offtopic.
I can see why many of users use screen. I use it only if I have to keep active a job over a ssh session. Locally I prefer tabs or multiple terminal windows instead.
when you're connected to a remote computer, you don't want to reconnect for each terminal tab. so you use screen and get used to the shortcuts and use it at your local pc too.
☃ Snowman ☃
Offline
when you're connected to a remote computer, you don't want to reconnect for each terminal tab. so you use screen and get used to the shortcuts and use it at your local pc too.
Right. I know that in these cases screen is a must. Maybe because I usually can do all job in the login shell, when I login remotely, I don't use screen. Locally, IMHO, tabs are much more simpler.
By the way, halhen, did you checked vim-minibufexpl extension? It is in the extra repository and could be useful.
Last edited by ArchArael (2009-04-30 09:17:32)
Offline
vsplit and plain old e and ls for me. Tabs seem silly in vim to me but, if it works for you, why not! Usually I have one screen open for each section I am working on (Model/View style code) each with 10-15 files open vsplitting when needed.
Offline
I didn't even know about tabbing in VIM... I had just been using urxvt's tabs. Not gonna lie, the vim tabs are a lot better, imo.
As for how yanking and putting works between Vim instances, the answer is using the tabnew or sp commands, you can just put stuff between tabs with no effort.
If you want to go between two distinct windows (or copy/paste from stuff in X) then you can use the "+" register, which is mapped to the X clipboard. When in normal (not command, visual or insert) mode, type a double quote and a number key, -, or +, to select registers 1 through +. + is the X clipboard.
Edit: I guess someone already said this, so consider this a more detailed explanation?
Last edited by alexandrite (2009-05-01 23:25:37)
Offline
Thanks all.
Obivousy, these decisions are rarely best made upfront, but often needs a bit of experimentation. Based on my preferences (98% local work, prefer full y/p - powers between files, tiling window manager) I'll try running a single vim instance "full screen" with tabs and add the sp's.
Offline
Buffers (with set hidden) works best for me.
Offline
If you want to go between two distinct windows (or copy/paste from stuff in X) then you can use the "+" register, which is mapped to the X clipboard. When in normal (not command, visual or insert) mode, type a double quote and a number key, -, or +, to select registers 1 through +. + is the X clipboard.
+ gives the clipboard in which you explicitly copy stuff in X. The * register contains the last selected text (_the_ way to copy!).
Offline