User forums > Help
Feature Request
Ceniza:
--- Quote from: Silicium62 ---I tried to change AStyle, but where to begin.....
--- End 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 :)
MortenMacFly:
--- Quote from: Silicium62 on April 23, 2006, 08:58:22 pm ---if you want a tab in text, you use \t [...]
--- End quote ---
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.
Silicium62:
--- Quote from: MortenMacFly on April 24, 2006, 08:44:10 am ---
--- Quote from: Silicium62 on April 23, 2006, 08:58:22 pm ---if you want a tab in text, you use \t [...]
--- End quote ---
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...
--- End quote ---
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
--- Quote from: MortenMacFly on April 24, 2006, 08:44:10 am ---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.
--- End quote ---
yes, it is that which I will wish :) (but i don't want all the system key of emacs)
--- Quote from: MortenMacFly on April 24, 2006, 08:44:10 am ---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.
--- End quote ---
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
--- End quote ---
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:
thomas:
--- Quote ---yes, but it is the defect of the innovations: our practices should be changed...
--- End quote ---
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:
--- End quote ---
A few months ago, someone wanted vi key bindings (don't remember who).
MortenMacFly:
--- Quote from: Silicium62 on April 24, 2006, 10:01:30 am ---yes, it is that which I will wish :) (but i don't want all the system key of emacs)
--- End quote ---
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... ;-)
--- Quote from: Silicium62 on April 24, 2006, 10:01:30 am ---:arrow: Am I the only programmer who uses C::B and who likes the key TAB of emacs? :cry:
--- End quote ---
...seems so?! ;-) At least I haven't heard of such a feature request until your post.
With regards, Morten.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version