[Lazarus] IDE Ctrl+W key

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

[Lazarus] IDE Ctrl+W key

Free Pascal - Lazarus mailing list
I suggest to remap Ctrl+W to "close current tab". Now it is weird-- some
completion listbox shows...

--
Regards,
Alexey

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE Ctrl+W key

Free Pascal - Lazarus mailing list
On Sat, 16 Mar 2019 19:36:02 +0300
AlexeyT via lazarus <[hidden email]> wrote:

> I suggest to remap Ctrl+W to "close current tab". Now it is weird--
> some completion listbox shows...

This is word completion. One of the most useful features.

Mattias

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE Ctrl+W key

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
I support this idea, although manually remapping hotkeys thanks to the fantastic key bindings dialog is very easy.

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE Ctrl+W key

Free Pascal - Lazarus mailing list
On 17/03/2019 17:21, Anthony Walter via lazarus wrote:
> I support this idea, although manually remapping hotkeys thanks to the
> fantastic key bindings dialog is very easy.
>

The problem with changing this default (this one particularly) is that
anyone used to the current behaviour will not only get a new behaviour,
but one that close the current tab for them. So that is one, that cannot
just undone by ctrl-z.
And they might get it repeatedly, as "old habits die hard".


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE Ctrl+W key

Free Pascal - Lazarus mailing list
You can still keep the old hotkey of ctrl+f4 and add ctrl+w. I really think worldwide there are is a grand total of zero people who use the word completion feature currently mapped to ctrl+w.

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE Ctrl+W key

Free Pascal - Lazarus mailing list
Anthony Walter via lazarus <[hidden email]> schrieb am So., 17. März 2019, 19:04:
You can still keep the old hotkey of ctrl+f4 and add ctrl+w. I really think worldwide there are is a grand total of zero people who use the word completion feature currently mapped to ctrl+w.

Wrong. I use it very often, especially when CodeTools fails due to me working on features that are not yet supported. Or if some include file is not picked up correctly. 

Regards, 
Sven 

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE Ctrl+W key

Free Pascal - Lazarus mailing list
On Sun, 17 Mar 2019 21:45:44 +0100
Sven Barth via lazarus <[hidden email]> wrote:

> Anthony Walter via lazarus <[hidden email]> schrieb am
> So., 17. März 2019, 19:04:
>
> > You can still keep the old hotkey of ctrl+f4 and add ctrl+w. I
> > really think worldwide there are is a grand total of zero people
> > who use the word completion feature currently mapped to ctrl+w.
> >  
>
> Wrong. I use it very often, especially when CodeTools fails due to me
> working on features that are not yet supported. Or if some include
> file is not picked up correctly.

+1

Ctrl+Space is for parseable Pascal files, Ctrl+W is for all other
files.

Mattias
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE Ctrl+W key

Free Pascal - Lazarus mailing list
On Sun, Mar 17, 2019 at 4:58 PM Mattias Gaertner via lazarus <[hidden email]> wrote:
Ctrl+Space is for parseable Pascal files, Ctrl+W is for all other
files.
and what's the issue to have Ctrl+Space for both cases? 

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE Ctrl+W key

Free Pascal - Lazarus mailing list
On Sun, 17 Mar 2019 19:16:40 -0400
Dmitry Boyarintsev via lazarus <[hidden email]> wrote:

> On Sun, Mar 17, 2019 at 4:58 PM Mattias Gaertner via lazarus <
> [hidden email]> wrote:
>
> > Ctrl+Space is for parseable Pascal files, Ctrl+W is for all other
> > files.
> >  
> and what's the issue to have Ctrl+Space for both cases?

Are you aware that if Ctrl+Space fails it jumps to the syntax error?


Mattias
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE Ctrl+W key

Free Pascal - Lazarus mailing list
On Sun, Mar 17, 2019 at 7:35 PM Mattias Gaertner via lazarus <[hidden email]> wrote:
>
> > Ctrl+Space is for parseable Pascal files, Ctrl+W is for all other
> > files.
> > 
> and what's the issue to have Ctrl+Space for both cases?

Are you aware that if Ctrl+Space fails it jumps to the syntax error?

Yes. And it's irritating, because I do remember when Ctrl+Space used to work even with incomplete sources.  
I often trying to use Ctrl+Space to complete the word on incomplete sources. (because I don't remember an API, and I need a hint.). 
But instead of showing me a list of options, it just doesn't work or jumps somewhere else. (...and jumping can be turned off, yet it won't do anything useful).

thanks,
Dmitry

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE Ctrl+W key

Free Pascal - Lazarus mailing list
On Sun, 17 Mar 2019 19:54:35 -0400
Dmitry Boyarintsev via lazarus <[hidden email]> wrote:

>[...]
> > Are you aware that if Ctrl+Space fails it jumps to the syntax error?
>
> Yes. And it's irritating, because I do remember when Ctrl+Space used
> to work even with incomplete sources.

Ctrl+Space always jumped to an error.
Although over the years codetools parser matured. So some syntax, that
was formerly skipped/ignored, now raises an error. Maybe you mean
this?


> I often trying to use Ctrl+Space to complete the word on incomplete
> sources. (because I don't remember an API, and I need a hint.).
> But instead of showing me a list of options, it just doesn't work or
> jumps somewhere else. (...and jumping can be turned off, yet it won't
> do anything useful).

IMO hiding an error is asking for trouble.
A good GUI must indicate somehow when the results are not reliable or
incomplete. For example by showing as first result a red line with the
error message, which when selected will jump to the error.
Then the user can deliberately choose to fix or ignore the error.

I guess that would substitute a good deal of word-completion. Although
word-completion is also much faster.

Mattias

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE Ctrl+W key

Free Pascal - Lazarus mailing list
On Mon, Mar 18, 2019 at 1:57 PM Mattias Gaertner via lazarus <[hidden email]> wrote:
Ctrl+Space always jumped to an error.
Although over the years codetools parser matured. So some syntax, that
was formerly skipped/ignored, now raises an error. Maybe you mean this?
I would think, this is exactly the problem. Though I'd expect the mature parser to be more tolerant to user errors and do some sort of self recovery.

Also, I don't think me simply complaining about the "here and there" would help.
However, sometimes I just cannot bug-report the issue, because restarting the IDE resolves the problem.

Is there any sort of stand-alone code-tools log happening? Something that could be used for bug reporting?
 
IMO hiding an error is asking for trouble.
A good GUI must indicate somehow when the results are not reliable or incomplete.
That's what C-language developers are relying on. In Pascal world compilation is fast, so it will be quite a short time when the compiler would remind a developer about the error.
(btw, the "slowness" retains even in modern faster languages. i.e. C#. It's not because the compiler is slow, but because an IDE is slow.
Lazarus manages to keep very high performance)
 
For example by showing as first result a red line with the
error message, which when selected will jump to the error.
Then the user can deliberately choose to fix or ignore the error.
I hate my cursor to jump anywhere, when I'm asking for word-completion at a particular placement.
As well as the concentration on the particular part of the code is lost.
The error can be pretty far away, and returning to the where I was might take some time.

(btw, due to aggressive jumping in the past. I.e. when Objective-P support was only introduced to code tools I taught myself to use bookmarks often. 
Just for a quick jump back to the line of code I was working at.)

I guess that would substitute a good deal of word-completion. Although word-completion is also much faster.
All in all, why can't both of them be the same thing?
Typical single-form application template:

procedure TForm1.FormCreate(Sender: TObject);
begin
  For|
end;

Ctrl+Space produces:
* FormCreate
* FormIsUpdating
* FormState
* FormStyle
...

Ctrl+W produces:
* Forms
* FormsCreate (how did it know?)
* Form1

thanks,
Dmitry

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE Ctrl+W key

Free Pascal - Lazarus mailing list
On 19/03/2019 03:44, Dmitry Boyarintsev via lazarus wrote
error message, which when selected will jump to the error.
Then the user can deliberately choose to fix or ignore the error.
I hate my cursor to jump anywhere, when I'm asking for word-completion at a particular placement.
As well as the concentration on the particular part of the code is lost.
The error can be pretty far away, and returning to the where I was might take some time.

(btw, due to aggressive jumping in the past. I.e. when Objective-P support was only introduced to code tools I taught myself to use bookmarks often. 
Just for a quick jump back to the line of code I was working at.)


History back should work after an codetools error. IIRC Ctrl-H, but I move it to Alt-Cursor-Left.



--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE Ctrl+W key

Free Pascal - Lazarus mailing list
On Mon, Mar 18, 2019 at 10:58 PM Martin Frb via lazarus <[hidden email]> wrote:
History back should work after an codetools error. IIRC Ctrl-H, but I move it to Alt-Cursor-Left.

The first time I hear about that thing. What's "History point"?  how is it defined?



--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE Ctrl+W key

Free Pascal - Lazarus mailing list
On 19/03/2019 04:39, Dmitry Boyarintsev via lazarus wrote:
On Mon, Mar 18, 2019 at 10:58 PM Martin Frb via lazarus <[hidden email]> wrote:
History back should work after an codetools error. IIRC Ctrl-H, but I move it to Alt-Cursor-Left.

The first time I hear about that thing. What's "History point"?  how is it defined?

View menu: jump history

Everytime you jump to a declaration, method body, ... (and some others like go to begin/end of file) a point is inserted. (except, if it is just 1 or 2 lines from where you were).

You can navigate back and forward on those points.
- mouse buttons 4 and 5 (like in webbrowesrs)
- ctrl-h (IIRC.., I recommand mapping it to alt cursor left/right)
- editor toolbar can provide buttons too


The usual way is, that you look up the definition of some identifier (I mapped "jump to declaration" to alt cursor up), maybe follow it forward, follow another declaration inside it...., and then jump back as far as you need.


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE Ctrl+W key

Free Pascal - Lazarus mailing list
I always saw the cursor jumping due to a syntax error as a bug, not a
feature and has always been an annoyance that breaks my code flow.
Honestly, i do not see what the point is, i am trying to complete the
word, not find syntax errors (this is what Ctrl+F9 is for). I also
think Ctrl+Space should display word completion in addition to
parsed-based words - it could put an icon with a pair of question
marks or whatever in front of the "guessed" words to indicate where
they come from.

Going back through the jump history is just a bandaid to a problem
that shouldn't exist in the first place.

On Tue, Mar 19, 2019 at 5:00 AM Martin Frb via lazarus
<[hidden email]> wrote:

>
> On 19/03/2019 04:39, Dmitry Boyarintsev via lazarus wrote:
>
> On Mon, Mar 18, 2019 at 10:58 PM Martin Frb via lazarus <[hidden email]> wrote:
>>
>> History back should work after an codetools error. IIRC Ctrl-H, but I move it to Alt-Cursor-Left.
>
>
> The first time I hear about that thing. What's "History point"?  how is it defined?
>
> View menu: jump history
>
> Everytime you jump to a declaration, method body, ... (and some others like go to begin/end of file) a point is inserted. (except, if it is just 1 or 2 lines from where you were).
>
> You can navigate back and forward on those points.
> - mouse buttons 4 and 5 (like in webbrowesrs)
> - ctrl-h (IIRC.., I recommand mapping it to alt cursor left/right)
> - editor toolbar can provide buttons too
>
>
> The usual way is, that you look up the definition of some identifier (I mapped "jump to declaration" to alt cursor up), maybe follow it forward, follow another declaration inside it...., and then jump back as far as you need.
>
> --
> _______________________________________________
> lazarus mailing list
> [hidden email]
> https://lists.lazarus-ide.org/listinfo/lazarus
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE Ctrl+W key

Free Pascal - Lazarus mailing list
There is no need to discuss this. As I said before both your points are
customizable.

On 25.03.2019 11:40, Kostas Michalopoulos via lazarus wrote:
> I always saw the cursor jumping due to a syntax error as a bug, not a
> feature and has always been an annoyance that breaks my code flow.
> Honestly, i do not see what the point is, i am trying to complete the
> word, not find syntax errors (this is what Ctrl+F9 is for).

IDE options -> Codetools -> Identifier Completion -> Miscellaneous ->
Jump to error


> I also
> think Ctrl+Space should display word completion in addition to
> parsed-based words - it could put an icon with a pair of question
> marks or whatever in front of the "guessed" words to indicate where
> they come from.

IDE Options -> Codetools -> Identifier Completion -> Include words


> Going back through the jump history is just a bandaid to a problem
> that shouldn't exist in the first place.

Does the problem persist if you change the options from above?

Ondrej

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE Ctrl+W key

Free Pascal - Lazarus mailing list
Thanks, those two options seem to be exactly what i had in mind :-)

On Mon, Mar 25, 2019 at 12:30 PM Ondrej Pokorny <[hidden email]> wrote:

>
> There is no need to discuss this. As I said before both your points are
> customizable.
>
> On 25.03.2019 11:40, Kostas Michalopoulos via lazarus wrote:
> > I always saw the cursor jumping due to a syntax error as a bug, not a
> > feature and has always been an annoyance that breaks my code flow.
> > Honestly, i do not see what the point is, i am trying to complete the
> > word, not find syntax errors (this is what Ctrl+F9 is for).
>
> IDE options -> Codetools -> Identifier Completion -> Miscellaneous ->
> Jump to error
>
>
> > I also
> > think Ctrl+Space should display word completion in addition to
> > parsed-based words - it could put an icon with a pair of question
> > marks or whatever in front of the "guessed" words to indicate where
> > they come from.
>
> IDE Options -> Codetools -> Identifier Completion -> Include words
>
>
> > Going back through the jump history is just a bandaid to a problem
> > that shouldn't exist in the first place.
>
> Does the problem persist if you change the options from above?
>
> Ondrej
>
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus