Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » What's with the text editor?
What's with the text editor? [message #3572] Wed, 12 December 2001 13:30 Go to next message
Eclipse UserFriend
Originally posted by: johan.nosp.m.appeal.se

I'd like to use something that works a lot like the standard java text
editor.

As an Emacs user since a couple of years, the Emacs emulation is rather
useless to me :-(. It emulates the things I've overridden in my .emacs
(like home/end going to the start/end of the document) but not the
things I use all the time (like ^s for isearch, and TAB for indenting
the current line).

IMO, a better way to go than trying to emulate all other editors is
probably to make your own, adding the features people ask for.

Cheers //Johan
Re: What's with the text editor? [message #4122 is a reply to message #3572] Wed, 12 December 2001 18:01 Go to previous messageGo to next message
Peter Manahan is currently offline Peter ManahanFriend
Messages: 131
Registered: July 2009
Senior Member
This is the LPEX :) editor my favorite. I jumped for joy when it made its
to open source. Its way better than both emacs and the eclipse java text
editor. IMO of course :) I can't wait to try and hook it into the java
part of the IDE :) You can set the colors you want. The shortcuts you want
(where eclipse 1.0 currently allows ). Add new commands etc.

The simple emacs emulation was added a couple of years ago because people
asked for it. I use the default LPEX key bindings but they don't all work
in eclipse because of the current implementation of the eclipse key binding
handling.

Peter

Johan Walles wrote:

> I'd like to use something that works a lot like the standard java text
> editor.
>
> As an Emacs user since a couple of years, the Emacs emulation is rather
> useless to me :-(. It emulates the things I've overridden in my .emacs
> (like home/end going to the start/end of the document) but not the
> things I use all the time (like ^s for isearch, and TAB for indenting
> the current line).
>
> IMO, a better way to go than trying to emulate all other editors is
> probably to make your own, adding the features people ask for.
>
> Cheers //Johan
Re: What's with the text editor? [message #4263 is a reply to message #4122] Thu, 13 December 2001 07:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: johan.nosp.m.appeal.se

Glad you like it.

What I want from a code editor (Emacs or not) is:
* TAB indents current line
* Return indents the newly created line
* Arrow keys, PgUp, PgDown move the cursor
* SHIFT-cursor keys mark a region
* Some key for interactive search (^s in Emacs, what key doesn't matter
to me)
* Syntax highlighting
* Something else I've probably forgotten about...

Can you tell me how to configure LPEX to be as much as possible like this?

Regards //Johan

Peter Manahan wrote:

> This is the LPEX :) editor my favorite. I jumped for joy when it made its
> to open source. Its way better than both emacs and the eclipse java text
> editor. IMO of course :) I can't wait to try and hook it into the java
> part of the IDE :) You can set the colors you want. The shortcuts you want
> (where eclipse 1.0 currently allows ). Add new commands etc.
>
> The simple emacs emulation was added a couple of years ago because people
> asked for it. I use the default LPEX key bindings but they don't all work
> in eclipse because of the current implementation of the eclipse key binding
> handling.
>
> Peter
>
> Johan Walles wrote:
>
>
>>I'd like to use something that works a lot like the standard java text
>>editor.
>>
>>As an Emacs user since a couple of years, the Emacs emulation is rather
>>useless to me :-(. It emulates the things I've overridden in my .emacs
>>(like home/end going to the start/end of the document) but not the
>>things I use all the time (like ^s for isearch, and TAB for indenting
>>the current line).
>>
>>IMO, a better way to go than trying to emulate all other editors is
>>probably to make your own, adding the features people ask for.
>>
>> Cheers //Johan
>>
>
Re: What's with the text editor? [message #4542 is a reply to message #4122] Thu, 13 December 2001 15:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dominic.nospam.com

Where is LPEX source code & web site ? ... i looked everywhere in google
with no success !


"Peter Manahan" <manahan@ca.ibm.com> wrote in message
news:3C179B8E.7E4E5A9B@ca.ibm.com...
> This is the LPEX :) editor my favorite. I jumped for joy when it made its
> to open source. Its way better than both emacs and the eclipse java text
> editor. IMO of course :) I can't wait to try and hook it into the java
> part of the IDE :) You can set the colors you want. The shortcuts you want
> (where eclipse 1.0 currently allows ). Add new commands etc.
>
> The simple emacs emulation was added a couple of years ago because people
> asked for it. I use the default LPEX key bindings but they don't all work
> in eclipse because of the current implementation of the eclipse key
binding
> handling.
>
> Peter
>
> Johan Walles wrote:
>
> > I'd like to use something that works a lot like the standard java text
> > editor.
> >
> > As an Emacs user since a couple of years, the Emacs emulation is rather
> > useless to me :-(. It emulates the things I've overridden in my .emacs
> > (like home/end going to the start/end of the document) but not the
> > things I use all the time (like ^s for isearch, and TAB for indenting
> > the current line).
> >
> > IMO, a better way to go than trying to emulate all other editors is
> > probably to make your own, adding the features people ask for.
> >
> > Cheers //Johan
>
Re: What's with the text editor? [message #4612 is a reply to message #4542] Thu, 13 December 2001 16:19 Go to previous messageGo to next message
adrian is currently offline adrianFriend
Messages: 26
Registered: July 2009
Junior Member
You can find the LPEX source code in eclipse/plugins/com.ibm.lpex/lpexsrc.zip.

dominic wrote:

> Where is LPEX source code & web site ? ... i looked everywhere in google
> with no success !
Re: What's with the text editor? [message #4750 is a reply to message #4263] Thu, 13 December 2001 17:05 Go to previous messageGo to next message
Peter Manahan is currently offline Peter ManahanFriend
Messages: 131
Registered: July 2009
Senior Member
There must be something wonky with your setup. Or there is something we are doing
different.

Everything you ask for is turned on by default. (except for those things you've
forgotten about :) ) So i can't really tell you how to configure it as it is
already configured.

For the interactive search "Ctrl+F" brings up the search window. Start typing
its in interactive search mode. I am currently
running on windows though I'll try it on linux and see if i get a similar results
to yours. If so I'll eat crow (ugh hope not :)

BTW am editing a file called main.cpp in a c++ project. What were you trying to
edit? Perhaps the file type association isn't setup?

I typed in this, comments are where what you asked for happened.
-------------------
#include <stdio.h>
// LPEX syntax highlights after moving the cursor from a line.

void main(int argc,char *argv[]) {
printf("Hello"); // tab indent set to 8 initially. change in
Windows->preferences->lpex, hit enter an
// this line is autoindented.
}
------------------------------------------------

If you could describe what you were doing maybe we can figure this out. It is
puzzling.

Peter

Johan Walles wrote:

> Glad you like it.
>
> What I want from a code editor (Emacs or not) is:
> * TAB indents current line
> * Return indents the newly created line
> * Arrow keys, PgUp, PgDown move the cursor
> * SHIFT-cursor keys mark a region
> * Some key for interactive search (^s in Emacs, what key doesn't matter
> to me)
> * Syntax highlighting
> * Something else I've probably forgotten about...
>
> Can you tell me how to configure LPEX to be as much as possible like this?
>
> Regards //Johan
>
> Peter Manahan wrote:
>
> > This is the LPEX :) editor my favorite. I jumped for joy when it made its
> > to open source. Its way better than both emacs and the eclipse java text
> > editor. IMO of course :) I can't wait to try and hook it into the java
> > part of the IDE :) You can set the colors you want. The shortcuts you want
> > (where eclipse 1.0 currently allows ). Add new commands etc.
> >
> > The simple emacs emulation was added a couple of years ago because people
> > asked for it. I use the default LPEX key bindings but they don't all work
> > in eclipse because of the current implementation of the eclipse key binding
> > handling.
> >
> > Peter
> >
> > Johan Walles wrote:
> >
> >
> >>I'd like to use something that works a lot like the standard java text
> >>editor.
> >>
> >>As an Emacs user since a couple of years, the Emacs emulation is rather
> >>useless to me :-(. It emulates the things I've overridden in my .emacs
> >>(like home/end going to the start/end of the document) but not the
> >>things I use all the time (like ^s for isearch, and TAB for indenting
> >>the current line).
> >>
> >>IMO, a better way to go than trying to emulate all other editors is
> >>probably to make your own, adding the features people ask for.
> >>
> >> Cheers //Johan
> >>
> >
Re: What's with the text editor? [message #5231 is a reply to message #4750] Fri, 14 December 2001 02:29 Go to previous messageGo to next message
Peter Manahan is currently offline Peter ManahanFriend
Messages: 131
Registered: July 2009
Senior Member
Works correctly on linux as well. It must be something with your setup. Any thoughts
on how it may differ?
I basically unzipped the cdt into the plugins directory and everything worked. As
well you must be using Eclipse V1.0.

Peter

Peter Manahan wrote:

> There must be something wonky with your setup. Or there is something we are doing
> different.
>
> Everything you ask for is turned on by default. (except for those things you've
> forgotten about :) ) So i can't really tell you how to configure it as it is
> already configured.
>
> For the interactive search "Ctrl+F" brings up the search window. Start typing
> its in interactive search mode. I am currently
> running on windows though I'll try it on linux and see if i get a similar results
> to yours. If so I'll eat crow (ugh hope not :)
>
> BTW am editing a file called main.cpp in a c++ project. What were you trying to
> edit? Perhaps the file type association isn't setup?
>
> I typed in this, comments are where what you asked for happened.
> -------------------
> #include <stdio.h>
> // LPEX syntax highlights after moving the cursor from a line.
>
> void main(int argc,char *argv[]) {
> printf("Hello"); // tab indent set to 8 initially. change in
> Windows->preferences->lpex, hit enter an
> // this line is autoindented.
> }
> ------------------------------------------------
>
> If you could describe what you were doing maybe we can figure this out. It is
> puzzling.
>
> Peter
>
> Johan Walles wrote:
>
> > Glad you like it.
> >
> > What I want from a code editor (Emacs or not) is:
> > * TAB indents current line
> > * Return indents the newly created line
> > * Arrow keys, PgUp, PgDown move the cursor
> > * SHIFT-cursor keys mark a region
> > * Some key for interactive search (^s in Emacs, what key doesn't matter
> > to me)
> > * Syntax highlighting
> > * Something else I've probably forgotten about...
> >
> > Can you tell me how to configure LPEX to be as much as possible like this?
> >
> > Regards //Johan
> >
> > Peter Manahan wrote:
> >
> > > This is the LPEX :) editor my favorite. I jumped for joy when it made its
> > > to open source. Its way better than both emacs and the eclipse java text
> > > editor. IMO of course :) I can't wait to try and hook it into the java
> > > part of the IDE :) You can set the colors you want. The shortcuts you want
> > > (where eclipse 1.0 currently allows ). Add new commands etc.
> > >
> > > The simple emacs emulation was added a couple of years ago because people
> > > asked for it. I use the default LPEX key bindings but they don't all work
> > > in eclipse because of the current implementation of the eclipse key binding
> > > handling.
> > >
> > > Peter
> > >
> > > Johan Walles wrote:
> > >
> > >
> > >>I'd like to use something that works a lot like the standard java text
> > >>editor.
> > >>
> > >>As an Emacs user since a couple of years, the Emacs emulation is rather
> > >>useless to me :-(. It emulates the things I've overridden in my .emacs
> > >>(like home/end going to the start/end of the document) but not the
> > >>things I use all the time (like ^s for isearch, and TAB for indenting
> > >>the current line).
> > >>
> > >>IMO, a better way to go than trying to emulate all other editors is
> > >>probably to make your own, adding the features people ask for.
> > >>
> > >> Cheers //Johan
> > >>
> > >
Editor configuration clarifications [message #5297 is a reply to message #4750] Fri, 14 December 2001 07:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: johan.nosp.m.appeal.se

Nope. It's quite all right though, now that I've messed a bit more with
it. To complete my check list, here's what I found. Note that I've
freely mixed stuff I forgot about with stuff I can't get working. In
all honesty, it's almost exclusively stuff I forgot to tell you about
;-). The file I'm messing with is called "tabort6.c". To avoid any
hard feelings: Note that this is a wishlist, not a demands list. I'm
just telling you what *I* want, you'll have to judge yourself what parts
you want to implement.

* TAB doesn't indent the current line, TAB just inserts a TAB character.
Press TAB fourteen times and you get fourteen TAB characters. If
the cursor is at the middle of a line, the fourteen TAB characters end
up at the middle of the line. I realize my description of what I really
want TAB to do wasn't very clear, so I'll try to clarify: TAB should
correctly indent the current line according to the current indentation
settings. This should happen independent on where on the line the
cursor currently is. BTW, how do I tell the editor how I want my C code
indented?

* Return just adds the same amount of whitespace as is on the line you
were on previously. Typing for instance "for (;;) {RETURN" should
indent the next line more than the current line is indented (according
to the current C code indentation settings). In other words, pressing
RETURN should mean "newline and indent the new line".

* The interactive search is quite all right, I just didn't know what key
it was bound to. However, I'd like for it to find the next match every
time I press ^f again. I.e. to find the third instance of "bar", I'd
type "^fbar^f^f".

* I would prefer if I couldn't move the cursor past the line ends.
Download Emacs and check out its behaviour for exactly how I want this
implemented.

* ^a should move to the beginning of the line, not mark stuff. ^e
should move to the end of the line. ^d should delete the character to
the right of the cursor.

As we continue this discussion I'm bound to come up with lots of other
stuff too, hope you don't mind. Glad to have somebody listening ;-).

Cheers //Johan

PS: The reason I'd like to see you follow the 2.0 stream is that I
badly want to lose Motif for GTK+. It's not in there yet, but when it
is, I'm dying to use it.

Peter Manahan wrote:

> Everything you ask for is turned on by default. (except for those things you've
> forgotten about :) )

>
> [...]

>
> If you could describe what you were doing maybe we can figure this out. It is
> puzzling.
>
> Peter
>
> Johan Walles wrote:
>
>
>>Glad you like it.
>>
>>What I want from a code editor (Emacs or not) is:
>>* TAB indents current line
>>* Return indents the newly created line
>>* Arrow keys, PgUp, PgDown move the cursor
>>* SHIFT-cursor keys mark a region
>>* Some key for interactive search (^s in Emacs, what key doesn't matter
>>to me)
>>* Syntax highlighting
>>* Something else I've probably forgotten about...
>>
>>Can you tell me how to configure LPEX to be as much as possible like this?
>>
>> Regards //Johan
>>
>>Peter Manahan wrote:
>>
>>
>>>This is the LPEX :) editor my favorite. I jumped for joy when it made its
>>>to open source. Its way better than both emacs and the eclipse java text
>>>editor. IMO of course :) I can't wait to try and hook it into the java
>>>part of the IDE :) You can set the colors you want. The shortcuts you want
>>>(where eclipse 1.0 currently allows ). Add new commands etc.
>>>
>>>The simple emacs emulation was added a couple of years ago because people
>>>asked for it. I use the default LPEX key bindings but they don't all work
>>>in eclipse because of the current implementation of the eclipse key binding
>>>handling.
>>>
>>>Peter
>>>
>>>Johan Walles wrote:
>>>
>>>
>>>
>>>>I'd like to use something that works a lot like the standard java text
>>>>editor.
>>>>
>>>>As an Emacs user since a couple of years, the Emacs emulation is rather
>>>>useless to me :-(. It emulates the things I've overridden in my .emacs
>>>>(like home/end going to the start/end of the document) but not the
>>>>things I use all the time (like ^s for isearch, and TAB for indenting
>>>>the current line).
>>>>
>>>>IMO, a better way to go than trying to emulate all other editors is
>>>>probably to make your own, adding the features people ask for.
>>>>
>>>> Cheers //Johan
>>>>
>>>>
>
Re: Editor configuration clarifications [message #6698 is a reply to message #5297] Fri, 14 December 2001 13:38 Go to previous messageGo to next message
adrian is currently offline adrianFriend
Messages: 26
Registered: July 2009
Junior Member
1.- Eclipse currently takes over the handling of accelerators (for its global actions
/ those defined in the menus), and they don't even reach the active view (to give it
a chance to interpret them and 'consume' them if processed). This is being addressed
- see "RFC: Key Bindings Proposal" in the platform-ui-dev mailing list. LPEX base
editor profiles, and key binding definition in general, are affected.

2.- Given the above restrictions, one can redefine its keys in LPEX - "Window" ->
"Preferences" -> "LPEX Editor" -> "User Key Actions". There you can Set the key
"c-d" (Ctrl+D) to the action "delete" (delete character at cursor). See
http://64.38.235.23/tools/cdt/downloads/0.5.0/com.ibm.cpp.do cs.user/Lpex/ref/rlpkeyac.htm
for the key definitions,
http://64.38.235.23/tools/cdt/downloads/0.5.0/com.ibm.cpp.do cs.user/Lpex/ref/rlpmousa.htm
for the mouse event definitions, and
http://64.38.235.23/tools/cdt/downloads/0.5.0/com.ibm.cpp.do cs.user/Lpex/ref/rlsdfact.htm
for the default editor actions.

3.- Some of the things you forgot to tell we 'forgot' to implement (yet)... These
are (now) on the to-do list:
- the current indentation 'scheme' is limited to following the line above
- there is no 'indentLine' action (what you'd like to bind to the Tab key)
- once in Ctrl+F (live find), Enter key does a find next, but another Ctrl+F
doesn't (NB when not in live find, Ctrl+N in the default base profile does a find
next)
- the cursor cannot be restricted to line ends (this is more difficult to implement
- as an editing mode!? - LPEX is line oriented, and prides itself in allowing you to
set the cursor wherever you feel like).

Johan Walles wrote:

> Nope. It's quite all right though, now that I've messed a bit more with
> it. To complete my check list, here's what I found. Note that I've
> freely mixed stuff I forgot about with stuff I can't get working. In
> all honesty, it's almost exclusively stuff I forgot to tell you about
> ;-). The file I'm messing with is called "tabort6.c". To avoid any
> hard feelings: Note that this is a wishlist, not a demands list. I'm
> just telling you what *I* want, you'll have to judge yourself what parts
> you want to implement.
>
> * TAB doesn't indent the current line, TAB just inserts a TAB character.
> Press TAB fourteen times and you get fourteen TAB characters. If
> the cursor is at the middle of a line, the fourteen TAB characters end
> up at the middle of the line. I realize my description of what I really
> want TAB to do wasn't very clear, so I'll try to clarify: TAB should
> correctly indent the current line according to the current indentation
> settings. This should happen independent on where on the line the
> cursor currently is. BTW, how do I tell the editor how I want my C code
> indented?
>
> * Return just adds the same amount of whitespace as is on the line you
> were on previously. Typing for instance "for (;;) {RETURN" should
> indent the next line more than the current line is indented (according
> to the current C code indentation settings). In other words, pressing
> RETURN should mean "newline and indent the new line".
>
> * The interactive search is quite all right, I just didn't know what key
> it was bound to. However, I'd like for it to find the next match every
> time I press ^f again. I.e. to find the third instance of "bar", I'd
> type "^fbar^f^f".
>
> * I would prefer if I couldn't move the cursor past the line ends.
> Download Emacs and check out its behaviour for exactly how I want this
> implemented.
>
> * ^a should move to the beginning of the line, not mark stuff. ^e
> should move to the end of the line. ^d should delete the character to
> the right of the cursor.
>
> As we continue this discussion I'm bound to come up with lots of other
> stuff too, hope you don't mind. Glad to have somebody listening ;-).
>
> Cheers //Johan
>
> PS: The reason I'd like to see you follow the 2.0 stream is that I
> badly want to lose Motif for GTK+. It's not in there yet, but when it
> is, I'm dying to use it.
Re: Editor configuration clarifications [message #6705 is a reply to message #6698] Fri, 14 December 2001 14:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: johan.nosp.m.appeal.se

Thanks!

I have now been able to map c-e to end and c-d to delete. C-a still
marks the whole buffer :-(. As LPEX reacts to C-a (by marking the
entire buffer), shouldn't that mean that LPEX receives the c-a key
event? And if that case, shouldn't it be configurable? This could be a
bug in LPEX (or I'm missing something? I tend to do that from time to
time...).

Anyway, I'm delighted to hear that you are listening (and reacting) to
my whining!

Cheers //Johan

adrian wrote:

> 1.- Eclipse currently takes over the handling of accelerators (for its global actions
> / those defined in the menus), and they don't even reach the active view (to give it
> a chance to interpret them and 'consume' them if processed). This is being addressed
> - see "RFC: Key Bindings Proposal" in the platform-ui-dev mailing list. LPEX base
> editor profiles, and key binding definition in general, are affected.
>
> 2.- Given the above restrictions, one can redefine its keys in LPEX - "Window" ->
> "Preferences" -> "LPEX Editor" -> "User Key Actions". There you can Set the key
> "c-d" (Ctrl+D) to the action "delete" (delete character at cursor). See
> http://64.38.235.23/tools/cdt/downloads/0.5.0/com.ibm.cpp.do cs.user/Lpex/ref/rlpkeyac.htm
> for the key definitions,
> http://64.38.235.23/tools/cdt/downloads/0.5.0/com.ibm.cpp.do cs.user/Lpex/ref/rlpmousa.htm
> for the mouse event definitions, and
> http://64.38.235.23/tools/cdt/downloads/0.5.0/com.ibm.cpp.do cs.user/Lpex/ref/rlsdfact.htm
> for the default editor actions.
>
> 3.- Some of the things you forgot to tell we 'forgot' to implement (yet)... These
> are (now) on the to-do list:
> - the current indentation 'scheme' is limited to following the line above
> - there is no 'indentLine' action (what you'd like to bind to the Tab key)
> - once in Ctrl+F (live find), Enter key does a find next, but another Ctrl+F
> doesn't (NB when not in live find, Ctrl+N in the default base profile does a find
> next)
> - the cursor cannot be restricted to line ends (this is more difficult to implement
> - as an editing mode!? - LPEX is line oriented, and prides itself in allowing you to
> set the cursor wherever you feel like).
>
> Johan Walles wrote:
>
>
>>Nope. It's quite all right though, now that I've messed a bit more with
>>it. To complete my check list, here's what I found. Note that I've
>>freely mixed stuff I forgot about with stuff I can't get working. In
>>all honesty, it's almost exclusively stuff I forgot to tell you about
>>;-). The file I'm messing with is called "tabort6.c". To avoid any
>>hard feelings: Note that this is a wishlist, not a demands list. I'm
>>just telling you what *I* want, you'll have to judge yourself what parts
>>you want to implement.
>>
>>* TAB doesn't indent the current line, TAB just inserts a TAB character.
>> Press TAB fourteen times and you get fourteen TAB characters. If
>>the cursor is at the middle of a line, the fourteen TAB characters end
>>up at the middle of the line. I realize my description of what I really
>>want TAB to do wasn't very clear, so I'll try to clarify: TAB should
>>correctly indent the current line according to the current indentation
>>settings. This should happen independent on where on the line the
>>cursor currently is. BTW, how do I tell the editor how I want my C code
>>indented?
>>
>>* Return just adds the same amount of whitespace as is on the line you
>>were on previously. Typing for instance "for (;;) {RETURN" should
>>indent the next line more than the current line is indented (according
>>to the current C code indentation settings). In other words, pressing
>>RETURN should mean "newline and indent the new line".
>>
>>* The interactive search is quite all right, I just didn't know what key
>>it was bound to. However, I'd like for it to find the next match every
>>time I press ^f again. I.e. to find the third instance of "bar", I'd
>>type "^fbar^f^f".
>>
>>* I would prefer if I couldn't move the cursor past the line ends.
>>Download Emacs and check out its behaviour for exactly how I want this
>>implemented.
>>
>>* ^a should move to the beginning of the line, not mark stuff. ^e
>>should move to the end of the line. ^d should delete the character to
>>the right of the cursor.
>>
>>As we continue this discussion I'm bound to come up with lots of other
>>stuff too, hope you don't mind. Glad to have somebody listening ;-).
>>
>> Cheers //Johan
>>
>>PS: The reason I'd like to see you follow the 2.0 stream is that I
>>badly want to lose Motif for GTK+. It's not in there yet, but when it
>>is, I'm dying to use it.
>>
>
Re: Editor configuration clarifications [message #6712 is a reply to message #6705] Fri, 14 December 2001 15:01 Go to previous messageGo to next message
adrian is currently offline adrianFriend
Messages: 26
Registered: July 2009
Junior Member
Ctrl+A is defined by Eclipse as global action Select All (see under "Edit"). Therefore, LPEX
doesn't receive the c-a key event at all...

This Eclipse key grabbing is a problem for several applications, which the previously mentioned
Key Bindings proposal will try to address (one way or another), although - it seems - at
Eclipse level. That is, when implemented, the user will have to change most key bindings at
the global (Eclipse-wide) scope, and an application will only be free to dynamically redefine
what's left.

Johan Walles wrote:

> Thanks!
>
> I have now been able to map c-e to end and c-d to delete. C-a still
> marks the whole buffer :-(. As LPEX reacts to C-a (by marking the
> entire buffer), shouldn't that mean that LPEX receives the c-a key
> event? And if that case, shouldn't it be configurable? This could be a
> bug in LPEX (or I'm missing something? I tend to do that from time to
> time...).
>
> Anyway, I'm delighted to hear that you are listening (and reacting) to
> my whining!
>
> Cheers //Johan
>
> adrian wrote:
>
> > 1.- Eclipse currently takes over the handling of accelerators (for its global actions
> > / those defined in the menus), and they don't even reach the active view (to give it
> > a chance to interpret them and 'consume' them if processed). This is being addressed
> > - see "RFC: Key Bindings Proposal" in the platform-ui-dev mailing list. LPEX base
> > editor profiles, and key binding definition in general, are affected.
> >
> > 2.- Given the above restrictions, one can redefine its keys in LPEX - "Window" ->
> > "Preferences" -> "LPEX Editor" -> "User Key Actions". There you can Set the key
> > "c-d" (Ctrl+D) to the action "delete" (delete character at cursor). See
> > http://64.38.235.23/tools/cdt/downloads/0.5.0/com.ibm.cpp.do cs.user/Lpex/ref/rlpkeyac.htm
> > for the key definitions,
> > http://64.38.235.23/tools/cdt/downloads/0.5.0/com.ibm.cpp.do cs.user/Lpex/ref/rlpmousa.htm
> > for the mouse event definitions, and
> > http://64.38.235.23/tools/cdt/downloads/0.5.0/com.ibm.cpp.do cs.user/Lpex/ref/rlsdfact.htm
> > for the default editor actions.
> >
> > 3.- Some of the things you forgot to tell we 'forgot' to implement (yet)... These
> > are (now) on the to-do list:
> > - the current indentation 'scheme' is limited to following the line above
> > - there is no 'indentLine' action (what you'd like to bind to the Tab key)
> > - once in Ctrl+F (live find), Enter key does a find next, but another Ctrl+F
> > doesn't (NB when not in live find, Ctrl+N in the default base profile does a find
> > next)
> > - the cursor cannot be restricted to line ends (this is more difficult to implement
> > - as an editing mode!? - LPEX is line oriented, and prides itself in allowing you to
> > set the cursor wherever you feel like).
> >
> > Johan Walles wrote:
> >
> >
> >>Nope. It's quite all right though, now that I've messed a bit more with
> >>it. To complete my check list, here's what I found. Note that I've
> >>freely mixed stuff I forgot about with stuff I can't get working. In
> >>all honesty, it's almost exclusively stuff I forgot to tell you about
> >>;-). The file I'm messing with is called "tabort6.c". To avoid any
> >>hard feelings: Note that this is a wishlist, not a demands list. I'm
> >>just telling you what *I* want, you'll have to judge yourself what parts
> >>you want to implement.
> >>
> >>* TAB doesn't indent the current line, TAB just inserts a TAB character.
> >> Press TAB fourteen times and you get fourteen TAB characters. If
> >>the cursor is at the middle of a line, the fourteen TAB characters end
> >>up at the middle of the line. I realize my description of what I really
> >>want TAB to do wasn't very clear, so I'll try to clarify: TAB should
> >>correctly indent the current line according to the current indentation
> >>settings. This should happen independent on where on the line the
> >>cursor currently is. BTW, how do I tell the editor how I want my C code
> >>indented?
> >>
> >>* Return just adds the same amount of whitespace as is on the line you
> >>were on previously. Typing for instance "for (;;) {RETURN" should
> >>indent the next line more than the current line is indented (according
> >>to the current C code indentation settings). In other words, pressing
> >>RETURN should mean "newline and indent the new line".
> >>
> >>* The interactive search is quite all right, I just didn't know what key
> >>it was bound to. However, I'd like for it to find the next match every
> >>time I press ^f again. I.e. to find the third instance of "bar", I'd
> >>type "^fbar^f^f".
> >>
> >>* I would prefer if I couldn't move the cursor past the line ends.
> >>Download Emacs and check out its behaviour for exactly how I want this
> >>implemented.
> >>
> >>* ^a should move to the beginning of the line, not mark stuff. ^e
> >>should move to the end of the line. ^d should delete the character to
> >>the right of the cursor.
> >>
> >>As we continue this discussion I'm bound to come up with lots of other
> >>stuff too, hope you don't mind. Glad to have somebody listening ;-).
> >>
> >> Cheers //Johan
> >>
> >>PS: The reason I'd like to see you follow the 2.0 stream is that I
> >>badly want to lose Motif for GTK+. It's not in there yet, but when it
> >>is, I'm dying to use it.
> >>
> >
Re: Editor configuration clarifications [message #6718 is a reply to message #6712] Fri, 14 December 2001 15:12 Go to previous message
Eclipse UserFriend
Originally posted by: johan.nosp.m.appeal.se

OK, thanks. I'll just have to wait for the new key binding stuff to go
into Eclipse then.

Cheers //Johan

adrian wrote:

> Ctrl+A is defined by Eclipse as global action Select All (see under "Edit"). Therefore, LPEX
> doesn't receive the c-a key event at all...
>
> This Eclipse key grabbing is a problem for several applications, which the previously mentioned
> Key Bindings proposal will try to address (one way or another), although - it seems - at
> Eclipse level. That is, when implemented, the user will have to change most key bindings at
> the global (Eclipse-wide) scope, and an application will only be free to dynamically redefine
> what's left.
>
> Johan Walles wrote:
>
>
>>Thanks!
>>
>>I have now been able to map c-e to end and c-d to delete. C-a still
>>marks the whole buffer :-(. As LPEX reacts to C-a (by marking the
>>entire buffer), shouldn't that mean that LPEX receives the c-a key
>>event? And if that case, shouldn't it be configurable? This could be a
>>bug in LPEX (or I'm missing something? I tend to do that from time to
>>time...).
>>
>>Anyway, I'm delighted to hear that you are listening (and reacting) to
>>my whining!
>>
>> Cheers //Johan
>>
>>adrian wrote:
>>
>>
>>>1.- Eclipse currently takes over the handling of accelerators (for its global actions
>>>/ those defined in the menus), and they don't even reach the active view (to give it
>>>a chance to interpret them and 'consume' them if processed). This is being addressed
>>>- see "RFC: Key Bindings Proposal" in the platform-ui-dev mailing list. LPEX base
>>>editor profiles, and key binding definition in general, are affected.
>>>
>>>2.- Given the above restrictions, one can redefine its keys in LPEX - "Window" ->
>>>"Preferences" -> "LPEX Editor" -> "User Key Actions". There you can Set the key
>>>"c-d" (Ctrl+D) to the action "delete" (delete character at cursor). See
>>> http://64.38.235.23/tools/cdt/downloads/0.5.0/com.ibm.cpp.do cs.user/Lpex/ref/rlpkeyac.htm
>>>for the key definitions,
>>> http://64.38.235.23/tools/cdt/downloads/0.5.0/com.ibm.cpp.do cs.user/Lpex/ref/rlpmousa.htm
>>>for the mouse event definitions, and
>>> http://64.38.235.23/tools/cdt/downloads/0.5.0/com.ibm.cpp.do cs.user/Lpex/ref/rlsdfact.htm
>>>for the default editor actions.
>>>
>>>3.- Some of the things you forgot to tell we 'forgot' to implement (yet)... These
>>>are (now) on the to-do list:
>>> - the current indentation 'scheme' is limited to following the line above
>>> - there is no 'indentLine' action (what you'd like to bind to the Tab key)
>>> - once in Ctrl+F (live find), Enter key does a find next, but another Ctrl+F
>>>doesn't (NB when not in live find, Ctrl+N in the default base profile does a find
>>>next)
>>> - the cursor cannot be restricted to line ends (this is more difficult to implement
>>>- as an editing mode!? - LPEX is line oriented, and prides itself in allowing you to
>>>set the cursor wherever you feel like).
>>>
>>>Johan Walles wrote:
>>>
>>>
>>>
>>>>Nope. It's quite all right though, now that I've messed a bit more with
>>>>it. To complete my check list, here's what I found. Note that I've
>>>>freely mixed stuff I forgot about with stuff I can't get working. In
>>>>all honesty, it's almost exclusively stuff I forgot to tell you about
>>>>;-). The file I'm messing with is called "tabort6.c". To avoid any
>>>>hard feelings: Note that this is a wishlist, not a demands list. I'm
>>>>just telling you what *I* want, you'll have to judge yourself what parts
>>>>you want to implement.
>>>>
>>>>* TAB doesn't indent the current line, TAB just inserts a TAB character.
>>>> Press TAB fourteen times and you get fourteen TAB characters. If
>>>>the cursor is at the middle of a line, the fourteen TAB characters end
>>>>up at the middle of the line. I realize my description of what I really
>>>>want TAB to do wasn't very clear, so I'll try to clarify: TAB should
>>>>correctly indent the current line according to the current indentation
>>>>settings. This should happen independent on where on the line the
>>>>cursor currently is. BTW, how do I tell the editor how I want my C code
>>>>indented?
>>>>
>>>>* Return just adds the same amount of whitespace as is on the line you
>>>>were on previously. Typing for instance "for (;;) {RETURN" should
>>>>indent the next line more than the current line is indented (according
>>>>to the current C code indentation settings). In other words, pressing
>>>>RETURN should mean "newline and indent the new line".
>>>>
>>>>* The interactive search is quite all right, I just didn't know what key
>>>>it was bound to. However, I'd like for it to find the next match every
>>>>time I press ^f again. I.e. to find the third instance of "bar", I'd
>>>>type "^fbar^f^f".
>>>>
>>>>* I would prefer if I couldn't move the cursor past the line ends.
>>>>Download Emacs and check out its behaviour for exactly how I want this
>>>>implemented.
>>>>
>>>>* ^a should move to the beginning of the line, not mark stuff. ^e
>>>>should move to the end of the line. ^d should delete the character to
>>>>the right of the cursor.
>>>>
>>>>As we continue this discussion I'm bound to come up with lots of other
>>>>stuff too, hope you don't mind. Glad to have somebody listening ;-).
>>>>
>>>> Cheers //Johan
>>>>
>>>>PS: The reason I'd like to see you follow the 2.0 stream is that I
>>>>badly want to lose Motif for GTK+. It's not in there yet, but when it
>>>>is, I'm dying to use it.
>>>>
>>>>
>
Previous Topic:Install problem on Debian Linux
Next Topic:Why make and not ant
Goto Forum:
  


Current Time: Thu Apr 18 13:34:58 GMT 2024

Powered by FUDForum. Page generated in 0.02521 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top