Discussion:
Opening files in new windows
(too old to reply)
Matt Borkowski
2002-11-20 12:51:11 UTC
Permalink
In general, I'm not a big fan of buffers (at least not
how they're used in Scite) because I often want to
have some files visible to refer to while I work on a
totally separate one (e.g., having foo.h visible while
I edit foo.c). Instead, I like having my editors open
files in new windows. I can do this easily enough
myself by just starting another scite, but it would
nice and more convenient if there was an option to
open files in a new scite automatically. Looking over
the documentation, I didn't see any options like this,
but it can't be too hard to implement, right? Plenty
of other editors do this...

Thanks,
- Matt

__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com
Philippe Lhoste
2002-11-20 13:37:38 UTC
Permalink
Post by Matt Borkowski
In general, I'm not a big fan of buffers (at least not
how they're used in Scite) because I often want to
have some files visible to refer to while I work on a
totally separate one (e.g., having foo.h visible while
I edit foo.c). Instead, I like having my editors open
files in new windows. I can do this easily enough
myself by just starting another scite, but it would
nice and more convenient if there was an option to
open files in a new scite automatically. Looking over
the documentation, I didn't see any options like this,
but it can't be too hard to implement, right? Plenty
of other editors do this...
Uh? I am not sure to follow you, because it seems to be the default
behaviour of SciTE...

The check.if.already.open property may be the one to verify. If set to 1,
it will reuse the SciTE window. If commented out or set to 0 (default in
standard distribution), all files will be opened in a new window, the way
Neil likes :-)

If I answer the wrong stuff, shout!
--
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/
Ryan Christianson
2002-11-20 15:27:51 UTC
Permalink
I think Matt was asking if there was a way to have multiple files open
in one instance of scite, and then be able to make one of the currently
open files open in a new instance of scite.
Post by Philippe Lhoste
Post by Matt Borkowski
In general, I'm not a big fan of buffers (at least not
how they're used in Scite) because I often want to
have some files visible to refer to while I work on a
totally separate one (e.g., having foo.h visible while
I edit foo.c). Instead, I like having my editors open
files in new windows. I can do this easily enough
myself by just starting another scite, but it would
nice and more convenient if there was an option to
open files in a new scite automatically. Looking over
the documentation, I didn't see any options like this,
but it can't be too hard to implement, right? Plenty
of other editors do this...
Uh? I am not sure to follow you, because it seems to be the default
behaviour of SciTE...
The check.if.already.open property may be the one to verify. If set to 1,
it will reuse the SciTE window. If commented out or set to 0 (default in
standard distribution), all files will be opened in a new window, the way
Neil likes :-)
If I answer the wrong stuff, shout!
Philippe Lhoste
2002-11-20 16:53:53 UTC
Permalink
Post by Ryan Christianson
I think Matt was asking if there was a way to have multiple files open
in one instance of scite, and then be able to make one of the
currently open files open in a new instance of scite.
Oh, even re-reading the message, I didn't got it :-(
Well, currently you can do it by unchecking the Check if already open
option, and re-opening the file. It will be opened in a new
window/instance.
--
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/
Matt Borkowski
2002-11-20 22:41:51 UTC
Permalink
Sorry for the confusion; I worded that pretty poorly.
What I wanted was to have scite automatically start
new, separate instances of scite every time I open a
file unless the current instance has no files open
(like nedit does by default). For example, I start
scite and file->open foo.c. I realize that I need to
refer to foo.h (for a struct definition or something),
so I file->open foo.h. For me, scite just opens the
file in the same instance, in a new buffer, even if I
set buffers to 0 or 1 in the global options file (this
just disables the buffer menu but still lets me
navigate buffers with the two arrows on the toolbar).
I, however, want scite to start a new instance with
foo.h opened, without touching my current instance
(that has foo.c open).

I tried setting and then unsetting
check.if.already.open (which I missed before) in both
the user and the global options, but neither seems to
do anything towards what I'd like...

Also, if this is supposed to be the default behavior,
it might have been changed by whoever manages the
Debian package?

Thanks,
- Matt
Post by Philippe Lhoste
Oh, even re-reading the message, I didn't got it :-(
Well, currently you can do it by unchecking the
Check if already open
option, and re-opening the file. It will be opened
in a new
window/instance.
__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com
Neil Hodgson
2002-11-21 09:20:11 UTC
Permalink
Hi Matt,
Post by Matt Borkowski
Sorry for the confusion; I worded that pretty poorly.
What I wanted was to have scite automatically start
new, separate instances of scite every time I open a
file unless the current instance has no files open
(like nedit does by default).
I worked on a commercial editor that did this and also searched all other
open instances for the file being opened and switched if this was the case.
It was more complex than I expected with quite a few special cases such as
using Save As to change the name to that of another instance. I'd be willing
to accept a patch that allowed, as an option, to start up a new instance
whenever a file is opened.

Neil
Philippe Lhoste
2002-11-21 12:39:16 UTC
Permalink
Post by Matt Borkowski
Sorry for the confusion; I worded that pretty poorly.
What I wanted was to have scite automatically start
new, separate instances of scite every time I open a
file unless the current instance has no files open
(like nedit does by default). For example, I start
scite and file->open foo.c. I realize that I need to
refer to foo.h (for a struct definition or something),
so I file->open foo.h. For me, scite just opens the
file in the same instance, in a new buffer, even if I
set buffers to 0 or 1 in the global options file (this
just disables the buffer menu but still lets me
navigate buffers with the two arrows on the toolbar).
I, however, want scite to start a new instance with
foo.h opened, without touching my current instance
(that has foo.c open).
I tried setting and then unsetting
check.if.already.open (which I missed before) in both
the user and the global options, but neither seems to
do anything towards what I'd like...
OK, since I never use File -> Open, I didn't saw this...
I always open files from Explorer, either by double-clicking on them (or
right-click on them) or by drag'n'dropping them in a SciTE window.

Side note (resolving nothing): if your .h files are in the same directory
than your .c* files, you can quickly open them by clicking on the filename
(in the #include for example) and hitting Ctrl+Shift+O (or File -> Open
selected).

Other note: if I recall correctly, and if the behaviour didn't change (I
never use this mode...), if buffers is 0 or 1, SciTE don't use multi-
buffers, but instead closes the current file and opens the requested one.
But it has features allowing to recall quickly the previous/next file (in
MRU). AFAIK, the difference with buffers is that current
position/selection/bookmarks, etc. are not saved when switching.

In short, if you have check.if.already.open disabled or set to 0, you can
get a workaround (until somebody implement what you want) by opening
explicitely a separate instance of SciTE, using the methods given in the
first sentence...

Another workaround: on Windows, I have set SciTE to edit all files:

REGEDIT4

[HKEY_CLASSES_ROOT\*\shell\edit]
@="Edit with &SciTE"

[HKEY_CLASSES_ROOT\*\shell\edit\command]
@="\"C:\\Program Files\\Utilities\\SciTE\\SciTE.exe\" \"%1\""

but the workaround works also with individual files registered with SciTE.
You go to File -> Open, see your .h file, right-click on it, and select
"Edit with SciTE"... If check.if.already.open is unset, it will open in a
new window...

HTH.
--
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/
Bruce Dodson
2002-11-22 03:51:45 UTC
Permalink
Hey, I like that! It works almost as well as Andre's shell extension.
Here's a quick improvement: change the registry key name from shell\edit to
shell\scite. Otherwise you won't see the Edit with SciTE on specific
file-types that already have a shell\edit key defined.

The only down-side to this (compared to a shell extension) is that if the
file doesn't have any other associations, SciTE will run when you
double-click the file. e.g. double click a DLL and you get SciTE instead of
the "Open With..." dialog.

Unfortunately, though, Matt is using Debian GNU/Linux. My friends at
Microsoft tell me Debian isn't nearly as configurable as Windows, so I'm
afraid he's probably out of luck. (Heh!)

Regards,
Bruce


----- Original Message -----
From: "Philippe Lhoste" <***@GMX.net>
To: <scite-***@lyra.org>
Sent: Thursday, November 21, 2002 8:39 AM
Subject: [scite] Re: Re: Re: Opening files in new windows
Post by Philippe Lhoste
Post by Matt Borkowski
Sorry for the confusion; I worded that pretty poorly.
What I wanted was to have scite automatically start
new, separate instances of scite every time I open a
file unless the current instance has no files open
(like nedit does by default). For example, I start
scite and file->open foo.c. I realize that I need to
refer to foo.h (for a struct definition or something),
so I file->open foo.h. For me, scite just opens the
file in the same instance, in a new buffer, even if I
set buffers to 0 or 1 in the global options file (this
just disables the buffer menu but still lets me
navigate buffers with the two arrows on the toolbar).
I, however, want scite to start a new instance with
foo.h opened, without touching my current instance
(that has foo.c open).
I tried setting and then unsetting
check.if.already.open (which I missed before) in both
the user and the global options, but neither seems to
do anything towards what I'd like...
OK, since I never use File -> Open, I didn't saw this...
I always open files from Explorer, either by double-clicking on them (or
right-click on them) or by drag'n'dropping them in a SciTE window.
Side note (resolving nothing): if your .h files are in the same directory
than your .c* files, you can quickly open them by clicking on the filename
(in the #include for example) and hitting Ctrl+Shift+O (or File -> Open
selected).
Other note: if I recall correctly, and if the behaviour didn't change (I
never use this mode...), if buffers is 0 or 1, SciTE don't use multi-
buffers, but instead closes the current file and opens the requested one.
But it has features allowing to recall quickly the previous/next file (in
MRU). AFAIK, the difference with buffers is that current
position/selection/bookmarks, etc. are not saved when switching.
In short, if you have check.if.already.open disabled or set to 0, you can
get a workaround (until somebody implement what you want) by opening
explicitely a separate instance of SciTE, using the methods given in the
first sentence...
REGEDIT4
[HKEY_CLASSES_ROOT\*\shell\edit]
@="Edit with &SciTE"
[HKEY_CLASSES_ROOT\*\shell\edit\command]
@="\"C:\\Program Files\\Utilities\\SciTE\\SciTE.exe\" \"%1\""
but the workaround works also with individual files registered with SciTE.
You go to File -> Open, see your .h file, right-click on it, and select
"Edit with SciTE"... If check.if.already.open is unset, it will open in a
new window...
HTH.
--
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/
_______________________________________________
Scite-interest mailing list
http://mailman.lyra.org/mailman/listinfo/scite-interest
Philippe Lhoste
2002-11-22 09:35:40 UTC
Permalink
Post by Bruce Dodson
Hey, I like that! It works almost as well as Andre's shell extension.
Here's a quick improvement: change the registry key name from
shell\edit to shell\scite. Otherwise you won't see the Edit with
SciTE on specific file-types that already have a shell\edit key
defined.
? On WinNT at least, I have both entries, the SciTE one on top, the others
below. Can you try on other Windows?
Note that I would change it to shell/Edit with SciTE, the way MS does with
DevStudio (Open with MSDev).
I omitted, for simplicity, another key:

[HKEY_CLASSES_ROOT\*\shell\print\command]
@="\"C:\\Program Files\\Utilities\\SciTE\\SciTE.exe\" /p \"%1\""

And yes, on my WinNT4, I can have 2 print menues.
And since print is a known verb, it is displayed localized on your
Windows.
Post by Bruce Dodson
The only down-side to this (compared to a shell extension) is that if
the file doesn't have any other associations, SciTE will run when you
double-click the file. e.g. double click a DLL and you get SciTE
instead of the "Open With..." dialog.
Hey, for me, that's an advantage! :-)
I have a lot of text files with strange extensions, or no extension at all
(README, CHANGELOG, etc.). So it is fast to open them in SciTE. If I know
it is binary, I can use the Send To menu to send it to an hexa editor, or
Shift-right-click on it to get the Open with menu item.
Post by Bruce Dodson
Unfortunately, though, Matt is using Debian GNU/Linux. My friends at
Microsoft tell me Debian isn't nearly as configurable as Windows, so
I'm afraid he's probably out of luck. (Heh!)
Oh, he didn't said which platform he is using. It is unknown territory for
me, here.
--
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/
Bruce Dodson
2002-11-23 03:34:11 UTC
Permalink
I only tested the HKCR/*/shell/edit thing on WinXP. I can check at work on
Monday, to see what Win2K does with it.
Post by Philippe Lhoste
? On WinNT at least, I have both entries, the SciTE one on top, the others
below. Can you try on other Windows?
Continue reading on narkive:
Loading...