Using Internal Text Editor from x2? - Awaken the sleeping Genie!

Chitchat about x² / 2X products

Moderators: fgagnon, nikos, Site Mods

narayan
Platinum Member
Platinum Member
Posts: 1430
Joined: 2002 Jun 04, 07:01

Post by narayan »

Nikos,

The built-in text editor pops up for viewing all help files and also when the view as text (F3) button is activated for a file.

However, this editor is not available for general purpose use:

1. The "File>open" and "File>New" menus are not available.
2. "File>Save" and "File>Save as.." menu options are disabled (grayed out)
3. The text editor also does not figure in the context menu.


Since the internal Text Editor has extra features over the M$ Notepad, I would like to use it in place of Notepad.

How can we have full use of the Text Editor? Also, what is a easy way to associate text files with the internal Text Editor?

(If not in 2x, then in x2) :)
User avatar
nikos
Site Admin
Site Admin
Posts: 16341
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

you can't associate the internal editor with text files
it's not a standalone application, just a "thread" within 2x's process

why don't you download editor2 instead? I have it associated with text files and also as the external editor in 2x (View | options) since it's so much better in dealing with unicode/unix etc

x2 probably won't have an internal viewer/editor at all, it will just provide recommended links to editor2 or other viewers of your choice. The good thing about ed2 is that it will be able to pick up your current search options in 2x (e.g. in the grep [Ctrl+G] command) via a behind-the-scenes mechanizm. There won't be a need for an internal editor in x2

what you're going to have there is a pane like the thumbnail that except for grafix it will automatically preview whatever file is selected, text, grafix, m$ office document -- a generic activeX viewer
BRX
Silver Member
Silver Member
Posts: 308
Joined: 2002 Feb 08, 12:12

Post by BRX »

Whoa, actually I like having the viewer-only option and use it frequently. Dito the internal editor since I use it for quick tasks, but still use a more refined editor like TextPad as external one for more complicated matters (Mind you, I'd still prefer a slightly different use of the keyboard shortcuts).

I really got used to the internal viewer/editor and think they have their own benefits. I'd sure miss them. Maybe any users else?

BRX
User avatar
nikos
Site Admin
Site Admin
Posts: 16341
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

clarification: F3/F4 will still be there but they will offload the request to something external like notepad/textpad/whathaveyou. If you use something small and nimble you wouldn't notice any delays in loading
BRX
Silver Member
Silver Member
Posts: 308
Joined: 2002 Feb 08, 12:12

Post by BRX »

clarification: I expected F3/F4 to stay. Statement stays the same. I like the inbuilt versions. :-)

BRX
User avatar
nikos
Site Admin
Site Admin
Posts: 16341
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

you fussy customer you!  :)
what's wrong with an external linkage to the much more powerful editor2 ?
narayan
Platinum Member
Platinum Member
Posts: 1430
Joined: 2002 Jun 04, 07:01

Post by narayan »

Thinking aloud :sarcasm: :

Here is one possible (and extremely stretched, if at all this premise is correct-) benefit of using only the internal editor:

According to M$ documentation, launch of each application requires 8MB of RAM (apart from the 64MB~128MB required by different flavours of Windoze).

So, will launching the internal editor save on this extra 8 MB (thereby allowing the user to launch one more application-- an important factor in PCs with low RAM)?

BTW, why does F4 not have the "Save" option? (There is only the "Save as.." option. )
User avatar
nikos
Site Admin
Site Admin
Posts: 16341
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

last night it was sticky and muggy and i couldn't get no sleep so i had a good thought about this issue. The memory and resource consumption by multiple instances of an external viewer was a big concern that kept me awake

but if i turn ed2 into a multi-threaded SDI (like xplorer2) then many instances of it can be open while taking up space just for an extra process. They can all communicate search options and everything will be fast, nimble and efficient on resources. I think I can sleep easier tonight :)

>why does F4 not have the "Save" option?

this is only active when you have made some changes that need to be saved
narayan
Platinum Member
Platinum Member
Posts: 1430
Joined: 2002 Jun 04, 07:01

Post by narayan »

:beer:  :party:
BRX
Silver Member
Silver Member
Posts: 308
Joined: 2002 Feb 08, 12:12

Post by BRX »

Forgot to mention some more fuzz. :-)

I dislike losing features (at least those not being bugs).

Right now I can use the internal viewer to view RTF-files in a readable format with no fuzz which I use more often than I expected. I guess I'm right to assume this is lost in your editor-only-I-hope-it-doesn't-come solution.

BRX
User avatar
nikos
Site Admin
Site Admin
Posts: 16341
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

tsk-tsk! always the angel of apocalypse!

this has been sorted already
x2 has separate registry entries for viewer & editor (checkout szExternalViewer for example) so you can have "editor2 /V" for the one and "editor2 /E" for the other -- or an altogether different program

ergo, it will still be usable for viewing RTF

it's quite a pain in the @rse managing both an internal & external editor and keeping them updated. But since i haven't made up my mind yet, your relentless harassment tactics may get you somewhere after all   :D
BRX
Silver Member
Silver Member
Posts: 308
Joined: 2002 Feb 08, 12:12

Post by BRX »

Well, try to see me as an angel of Genesis instead! :-)

Actually I have to admit I haven't checked the abilities of editor2 sufficiently so my first statement has lost some of its value.

I didn't realise the "read-only" option (F6) of editor2 which essentially is still the viewer I'd like (including the eye-friendly grey colour).

Now please hint out how I get editor to display rtf without the format codes? The /v switch? I didn't get that to work.

Would be nice if you could automatically (or optionally) switch to readable/raw code when you switch between viewer and editor mode.

Also I mentioned twice already something similar would be nice for html as well, although I bet it's a pain to implement.

Just some more fuzzy-logic from me! ;-)

BRX
User avatar
nikos
Site Admin
Site Admin
Posts: 16341
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

>The /v switch? I didn't get that to work

this option is case sensitive, you need to use capital /V
(i regret the inconvenience caused :) )
basically it forces ed2 to read only mode from the command line, where it will read .rtf as rich text and not the "code"

HTML is not possible, but in a future incarnation of ed-209 there'll be a "preview" button for launching a browser on the contents. Although you can do that already semi-manually by opening the file in the browser and every now & then hit F5 key to pick up the most recent changes in the editing session
BRX
Silver Member
Silver Member
Posts: 308
Joined: 2002 Feb 08, 12:12

Post by BRX »

A little payback for all the inconvenience I'm causing is well-deserved :-)

Still I'm encountering problems. When I start it in /V mode and try to open a rtf file I get the warning

I/O accessing "path\filename"

and the German message

Der Vorgang wurde ausgeführt

(meaning something like "action performed")

OS Win98SE. Any ideas? Also it shouldn't ask for saving when you close the Editor from read-only mode.

Any thoughts about the switching?

BRX
User avatar
nikos
Site Admin
Site Admin
Posts: 16341
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

how are you trying to use it? As default association or from the command line?

i don't know, did you enclose path+file in quotes, for avoiding space problems?

> it shouldn't ask for saving when you close the Editor from read-only mode

it is only trying to help you avoid disasters stemming from absent-mindedness! If you made changes and switched to read-only, it probably thinks you are either too young or too old or a bit dim :) (or combinations thereof) and hence need extra protection