Author Topic: Feature Request  (Read 14657 times)

Silicium62

  • Guest
Feature Request
« on: April 23, 2006, 12:27:52 pm »
hi

I would like much to have his 2 features

* To open or close the window of the Messages while clicking on one of the tabs.  the same for for Management.  

* Indenter correctly the current line while pressing on the key (TAB) anywhere on the line (as with emacs)

thanks


Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Feature Request
« Reply #1 on: April 23, 2006, 07:27:22 pm »
* Indenter correctly the current line while pressing on the key (TAB) anywhere on the line (as with emacs)
I'd disagree here. How would you place a tab then in the code (which applies more often)? What's wrong with "Home" + "TAB" as (let me say) all non-emacs-users do?!
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Silicium62

  • Guest
Re: Feature Request
« Reply #2 on: April 23, 2006, 08:58:22 pm »
* Indenter correctly the current line while pressing on the key (TAB) anywhere on the line (as with emacs)
I'd disagree here. How would you place a tab then in the code (which applies more often)? What's wrong with "Home" + "TAB" as (let me say) all non-emacs-users do?!
With regards, Morten.

if you want a tab in text, you use \t

but emacs's tab is very useful for easily  debugging : if your line is not indenting after, you know you have a bug : missing ;...

and you put more often a tab for indenting than to put a tab in the code....

try it one time, for ever....

PS : sorry for my english....


Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Feature Request
« Reply #3 on: April 23, 2006, 09:29:59 pm »
The AStyle plugin works on the full source, not just the current line, so that might be problematic.

Also, I agree with Martin, as a non-Emacs user, it would be quite confusing for me if pressing tab indented the current line. But hey, if you want that functionality, why don't you write a mini-plugin that hijacks the key events? That shouldn't be more than 20-30 lines of code. Then those who absolutely must have Emacs-like behaviour can have it, simply by loading that plugin :)

Quote
if you want a tab in text, you use \t
I believe he did not refer to a tab inside a character string, but in the source code, something like here:
int     foo = 1;
string  bar = "bar";
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Silicium62

  • Guest
Re: Feature Request
« Reply #4 on: April 23, 2006, 11:27:38 pm »
The AStyle plugin works on the full source, not just the current line, so that might be problematic.

yes...I use AStyle for this but it is not the same.... :(

Also, I agree with Martin, as a non-Emacs user, it would be quite confusing for me if pressing tab indented the current line.

I use emacs with Linux, and IDE with XP....I have the 2 practices...
But, i guaranteed to you that you love it....It is as TAB with bash on linux... :D

But hey, if you want that functionality, why don't you write a mini-plugin that hijacks the key events? That shouldn't be more than 20-30 lines of code. Then those who absolutely must have Emacs-like behaviour can have it, simply by loading that plugin :)

I tried to change AStyle, but where to begin.....  :oops:

Quote
if you want a tab in text, you use \t
I believe he did not refer to a tab inside a character string, but in the source code, something like here:
int     foo = 1;
string  bar = "bar";


yes...I didn't know it..why not...
but I prefer my way to debug easily :wink:

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Feature Request
« Reply #5 on: April 24, 2006, 06:08:51 am »
Quote from: Silicium62
I tried to change AStyle, but where to begin.....

What thomas said is to write a new plugin to do what you want (the Emacs-like behaviour), not to modify the AStyle plugin to do that :)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Feature Request
« Reply #6 on: April 24, 2006, 08:44:10 am »
if you want a tab in text, you use \t [...]
I personally have a problem with emacs. I believe it is missing nearly every standard in "hot-keys" that has been established in recent times. I think there are much less developers using emacs than other dev-tools which use the "standard" key-bindings. Such "standard" would be e.g. in the case of the TAB key: Insert a tab - what really seems to be obvious to me.
Anyway, I really dont' want to offend - at my work a lot people (especially students) using emacs, too. I think it's kind of a philosophic question. It's simply that my expectation if I press a key on the keyboard is that it is written in the editor what I've typed and no "magic" is applied... But I had no problem if there were the possibilty to switch the keyboard bindings to "emacs type". Other dev-tools have this possibility, too.
Anyway: To come back to the problem: Are you using smart indent in C::B? Because that would automatically align code lines for you, so you wouldn't probably need to press any key... ;-)
With regards, Morten.
« Last Edit: April 24, 2006, 08:46:26 am by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Silicium62

  • Guest
Re: Feature Request
« Reply #7 on: April 24, 2006, 10:01:30 am »
if you want a tab in text, you use \t [...]
I personally have a problem with emacs. I believe it is missing nearly every standard in "hot-keys" that has been established in recent times. I think there are much less developers using emacs than other dev-tools which use the "standard" key-bindings. Such "standard" would be e.g. in the case of the TAB key: Insert a tab - what really seems to be obvious to me. Anyway, I really dont' want to offend - at my work a lot people (especially students) using emacs, too. I think it's kind of a philosophic question. It's simply that my expectation if I press a key on the keyboard is that it is written in the editor what I've typed and no "magic" is applied...

yes, but it is the defect of the innovations:  our practices should be changed... :wink:
especially that emacs 's TAB is used for another thing that indenting easily:  debugging easily 

But I had no problem if there were the possibilty to switch the keyboard bindings to "emacs type". Other dev-tools have this possibility, too.

yes, it is that which I will wish  :)  (but i don't want all the system key of emacs)

Anyway: To come back to the problem: Are you using smart indent in C::B? Because that would automatically align code lines for you, so you wouldn't probably need to press any key... ;-)
With regards, Morten.

yes but it isn't perfect....and you lose debugging help of emacs's TAB
and AStyle move code on the screen...then it isn't perfect

Quote
What thomas said is to write a new plugin to do what you want (the Emacs-like behaviour), not to modify the AStyle plugin to do that

I must modify AStyle to preserve the configuration of the indentation  :(

:arrow: Am I the only programmer who uses C::B and who likes the key TAB of emacs?  :cry:



Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Feature Request
« Reply #8 on: April 24, 2006, 10:22:15 am »
Quote
yes, but it is the defect of the innovations:  our practices should be changed...
Luckily we do change practices from time to time, otherwise the Inquisition would still burn down your house :lol:
But seriously, I agree that people like to keep their habits. If I understand correctly what you want (pressing tab indents and does some basic error checking), then calling AStyle would probably really be the easiest way. If you forgot a brace or a semicolon, AStyle will freak up formatting horribly, I often use that feature as a quick spell-checker, too. It is quite good.

Thus, I would hijack the tab key event and send a menu event to AStyle in the easiest case. Or, more sophisticated, copy the current line to a separate buffer, process that buffer, and write it back, then you keep the formatting in the rest of the document. If you don't want to use AStyle, you'll have to write a code parser for that, this may not be precisely the easiest thing.

Quote
:arrow: Am I the only programmer who uses C::B and who likes the key TAB of emacs?  :cry:
A few months ago, someone wanted vi key bindings (don't remember who).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Feature Request
« Reply #9 on: April 24, 2006, 10:31:23 am »
yes, it is that which I will wish  :)  (but i don't want all the system key of emacs)
Ok, so you could file a feature report for that. But if then it should really be fully compatible to emacs and no partial implementation. Otherwise we're getting more in trouble with other emacs users... ;-)
:arrow: Am I the only programmer who uses C::B and who likes the key TAB of emacs?  :cry:
...seems so?! ;-) At least I haven't heard of such a feature request until your post.
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Feature Request
« Reply #10 on: April 24, 2006, 10:35:17 am »
Quote
yes, but it is the defect of the innovations:  our practices should be changed...
Luckily we do change practices from time to time, otherwise the Inquisition would still burn down your house :lol:
...should I state that C::B is a by far younger software? How long does emacs exist? I would say it's an innovation from the "old days" that hasn't come to a serious standard. Again: That's only me.
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Silicium62

  • Guest
Re: Feature Request
« Reply #11 on: April 24, 2006, 10:55:14 am »
If I understand correctly what you want (pressing tab indents and does some basic error checking), then calling AStyle would probably really be the easiest way. If you forgot a brace or a semicolon, AStyle will freak up formatting horribly, I often use that feature as a quick spell-checker, too. It is quite good.

Thus, I would hijack the tab key event and send a menu event to AStyle in the easiest case. Or, more sophisticated, copy the current line to a separate buffer, process that buffer, and write it back, then you keep the formatting in the rest of the document.

yes, i'm agree with you....

Quote
:arrow: Am I the only programmer who uses C::B and who likes the key TAB of emacs?  :cry:
A few months ago, someone wanted vi key bindings (don't remember who).

I don't like all system key of emacs...I prefer classic system key...but emacs's TAB is a additional fonctionality

Silicium62

  • Guest
Re: Feature Request
« Reply #12 on: April 24, 2006, 10:57:18 am »
Quote
yes, but it is the defect of the innovations:  our practices should be changed...
Luckily we do change practices from time to time, otherwise the Inquisition would still burn down your house :lol:
...should I state that C::B is a by far younger software? How long does emacs exist? I would say it's an innovation from the "old days" that hasn't come to a serious standard. Again: That's only me.
With regards, Morten.

I think that, very often, standard comes from Windows, not from Linux....
« Last Edit: April 24, 2006, 11:00:22 am by Silicium62 »

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: Feature Request
« Reply #13 on: April 24, 2006, 02:09:39 pm »
:arrow: Am I the only programmer who uses C::B and who likes the key TAB of emacs?  :cry:
No but you are one of the few emacs users who is searching for another IDE. One of my colleagues is an emacs user and refuses to use anything else.
Life would be so much easier if we could just look at the source code.

Silicium62

  • Guest
Re: Feature Request
« Reply #14 on: April 24, 2006, 03:20:55 pm »
:arrow: Am I the only programmer who uses C::B and who likes the key TAB of emacs?  :cry:
No but you are one of the few emacs users who is searching for another IDE. One of my colleagues is an emacs user and refuses to use anything else.

I try to keep an open mind   :D

and in fact the functionalities make the good IDE... You must add much plugins to emacs to obtain C::B... And I don't speak about IntelliJ for java ...

« Last Edit: April 24, 2006, 03:38:28 pm by Silicium62 »