Again code folding |
Re: Again code folding |
|
I subscribe to this... we should be able to fold all {...} blocks automatically without any select. We should also be able to select part of the code and save as a region so we can restore the folding at any time without reselecting. Any chance to know when this is possible to be added? |
||||||||||||||
|
|
I may be testing on old version, but why cant I fold a function form the bottom }.... I have to scroll up to function definition start... was this resolved?
|
||||||||||||
|
Site Admin
|
it wasn't a problem from the beginning. Press Ctrl-Plus to collapse code under cursor.
|
||||||||||||
_________________ The PHP IDE team |
|
Alright it works, although a - sign at the ending } would be more intuitive if I am not shortcuts freak... there are quite a few to remember in the end Any thoughts on #region idea above? |
||||||||||||||
|
Site Admin
|
I don't like the idea of patching sources with somehting like this. Although fill free to run poll on the Feat Request forum to see if the idea gets any significant support. |
||||||||||||||
_________________ The PHP IDE team |
|
Well, maybe you dont have to save this into source file, but some xml along with the project file ... |
||||||||||||||||
|
Veteran
|
In general, I agree. However, if the extra markup is semi-standardized, then I think the usefulness of it outweighs the downsides. In this respect, it's not too unlike how so much code insight functionality is tied to PhpDoc comments, even though individual programmers (and perhaps even company guidelines) might prefer a completely different comment structure. I know VisualStudio does something like this, and I believe vim does, as well. Do they have a common syntax that could be adopted by PhpED? |
||||||||||||||||
|
Veteran
|
How hard will be for You implement folding for this:
#{ ... #} or this //{ ... //} Becouse in some codes in structural meaning i can fold by doing it: // some code { //some other code function 1() {} ... function2() {} //many other lines } Then in classes or etc. it is not possible to do this - but I want to make fold for some method groups, eg. class A { function1() {} { function2() {} ... function3() {} } } cant work. So? Regards |
||||||||||||
_________________ ML |
How about this for the region idea? |
|
From documentation on php.net:
http://www.php.net/manual/en/control-structures.intro.php
In other words, the following code is valid PHP code:
The curly braces define a statement group similar to when used with if, else, foreach, etc. It does not create a new variable scope, but can be used to format/organize code in some arbitrary way. Statement groups can contain almost anything (assuming nest conventions are followed). Some things that can't be used inside statement blocks are: namespace, use, (global) const, and __halt_compiler(). Anything in curly braces will have a fold mark in PhpED. That includes statement groups which then function just as one would hope/expect. One feature that would be nice is if PhpED showed the comment immediately after the starting brace while the group is folded. One can even make a shortcut to create a foldable statement group using code snippets in PhpED. For example, the following template could be created and assigned to the keyboard combination Ctrl+Alt+B
Thereafter one could highlight a block of code then hit Ctrl+Alt+B to wrap the highlighted statements in curly braces, creating a statement group. |
||||||||||||||||||
|
Again code folding |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by