possible RFE - open existing window w/file already being edited

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

possible RFE - open existing window w/file already being edited

L. A. Walsh
Very often I have many gvim windows open -- sometimes for unrelated
projects because I hit a snag in 1 project that sends me off to another.

Add that to breaks, and I forget which windows are minimized over in the
the tray.

Just like now, I wanted to open a file that has a list I wanted
browse to find the right error code for a program I was working
in.  I tried to open errnos.shh but got the message it found a
.swp file, I scan for the process info to see if it says it is
still active.  It is.  So then 'abort' that and then go
to taskbar and only see 1 icon for vim with 5 files hiding
under it.

I move my mouse over the taskbar icon and it displays the names
each of them is editing, then I click on it to open and continue work.

What would really speed up my work flow is if it would behave like
some apps (like web browsers), where if I already have the file
open in a gvim instance, if my 'invocation' of a new gvim on the
same file could send the other one a command to restore itself to the
desktop and pop-to-the top.

Then I can just skip all the reading on the duplicate scanning for pid,
scanning for 'still running', then going to find the current one.

Is that possible or is it something that might be added?

Currently running gvim via 'X' from a linux machine but
displaying on a windows machine, but we're really talking about
an 'X' window being bumped to the top, though the same situation
could arise if I was using the Windows GUI version (just that most
of my editing is of files on the linux machine).

Might this be possible?

Thanks!

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: possible RFE - open existing window w/file already being edited

Christian Brabandt

On So, 24 Feb 2019, L A Walsh wrote:

> Very often I have many gvim windows open -- sometimes for unrelated
> projects because I hit a snag in 1 project that sends me off to another.
>
> Add that to breaks, and I forget which windows are minimized over in the
> the tray.
>
> Just like now, I wanted to open a file that has a list I wanted
> browse to find the right error code for a program I was working
> in.  I tried to open errnos.shh but got the message it found a
> .swp file, I scan for the process info to see if it says it is
> still active.  It is.  So then 'abort' that and then go
> to taskbar and only see 1 icon for vim with 5 files hiding
> under it.
>
> I move my mouse over the taskbar icon and it displays the names
> each of them is editing, then I click on it to open and continue work.
>
> What would really speed up my work flow is if it would behave like
> some apps (like web browsers), where if I already have the file
> open in a gvim instance, if my 'invocation' of a new gvim on the
> same file could send the other one a command to restore itself to the
> desktop and pop-to-the top.
>
> Then I can just skip all the reading on the duplicate scanning for pid,
> scanning for 'still running', then going to find the current one.
>
> Is that possible or is it something that might be added?
>
> Currently running gvim via 'X' from a linux machine but
> displaying on a windows machine, but we're really talking about
> an 'X' window being bumped to the top, though the same situation
> could arise if I was using the Windows GUI version (just that most
> of my editing is of files on the linux machine).
>
> Might this be possible?

Have you tried the editexisting vim script, that comes distributed with
Vim and lives below /usr/share/vim/vim80/pack/dist/opt/editexisting/

Best,
Christian
--
Vati, was heißt "FORMATIERE LAUFWERK C:?"

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: possible RFE - open existing window w/file already being edited

Efraim Yawitz
In reply to this post by L. A. Walsh
Have you tried tabs instead of separate windows?

Everyone has the way they like to work, so maybe this isn't appropriate for you, but right now I have 77 tabs open for maybe 15 projects, and I can find whatever I want with a simple :tabs command (and I'm sure there must be some plugin to make it even easier.)

All the best,

Ephraim Yawitz

On Mon, Feb 25, 2019 at 3:00 AM L A Walsh <[hidden email]> wrote:
Very often I have many gvim windows open -- sometimes for unrelated
projects because I hit a snag in 1 project that sends me off to another.

Add that to breaks, and I forget which windows are minimized over in the
the tray.

Just like now, I wanted to open a file that has a list I wanted
browse to find the right error code for a program I was working
in.  I tried to open errnos.shh but got the message it found a
.swp file, I scan for the process info to see if it says it is
still active.  It is.  So then 'abort' that and then go
to taskbar and only see 1 icon for vim with 5 files hiding
under it.

I move my mouse over the taskbar icon and it displays the names
each of them is editing, then I click on it to open and continue work.

What would really speed up my work flow is if it would behave like
some apps (like web browsers), where if I already have the file
open in a gvim instance, if my 'invocation' of a new gvim on the
same file could send the other one a command to restore itself to the
desktop and pop-to-the top.

Then I can just skip all the reading on the duplicate scanning for pid,
scanning for 'still running', then going to find the current one.

Is that possible or is it something that might be added?

Currently running gvim via 'X' from a linux machine but
displaying on a windows machine, but we're really talking about
an 'X' window being bumped to the top, though the same situation
could arise if I was using the Windows GUI version (just that most
of my editing is of files on the linux machine).

Might this be possible?

Thanks!

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: possible RFE - open existing window w/file already being edited

Tony Mechelynck
On Mon, Feb 25, 2019 at 3:34 PM Efraim Yawitz <[hidden email]> wrote:
>
> Have you tried tabs instead of separate windows?
>
> Everyone has the way they like to work, so maybe this isn't appropriate for you, but right now I have 77 tabs open for maybe 15 projects, and I can find whatever I want with a simple :tabs command (and I'm sure there must be some plugin to make it even easier.)

There is also the "usetab" setting of the 'switchbuf' option: after
":set swb+=usetab", the command ":sbuffer /path/to/filename.ext" will
bring you to the window for filename.ext if there is one in any tab.
If there isn't, I'm not sure, maybe it will give an error, but even if
it does, you know that that file isn't yet loaded so you can open a
new window (and possibly a new tab) for it.

Best regards,
Tony.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.