Emerald Editor Discussion
August 16, 2017, 04:07:29 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: "fold" contents in brackets  (Read 6396 times)
0 Members and 1 Guest are viewing this topic.
per9000
Miner
**
Posts: 10



WWW
« on: November 09, 2006, 10:38:38 am »

Dear all,

another feature request that might be tricky - this one is also from MSVC#2005EE.

the source file (with line numbers this time)

01 - int main()
02 - {
03 -   int i;
04 - 
05 -   for (i = 0; i < 100; i++)
06 -   {
07 -      /*
08 -       * lots of code
09 -       * on many lines
10 -       * a really long and annoying loop
11 -       */
12 -   }
13 -
14 -  printf("Hell o World...\n");
15 -  return 0;
16 -}
17 -

In the left margin (where the line number are) there is a small "-" in a square for each curly bracket.  Pressing it "folds" the source file into something like this

01 - int main()
02 - {
03 -   int i;
04 - 
05 -   for (i = 0; i < 100; i++) { ... }
13 -
14 -  printf("Hell o World...\n");
15 -  return 0;
16 -}

where the "{ ... }" has another color, to indicate hidden contents.

This is great for getting rid of ugly struct's etc, to just display contents I care about right now.

A press on the main row produces

01 - int main() { ... }
17 -

Perhaps I explain poorly, if so try Microsoft Visual C# 2005 Express Editor, it's free (as in beer).

Thanks
/Per
Logged
per9000
Miner
**
Posts: 10



WWW
« Reply #1 on: November 09, 2006, 01:08:29 pm »

I tried to attach some images to show what I mean

clipboard01
  Normal layout.
  Red (?) next to line number means: line changed since file opened (quite nice feature).
  Green: line changed since last compilation (hard since compilation macros should be optional I guess)
 
clipboard02
  comments 1 and 2 folded
 
clipboard03
  "functions" Main and BeerMaster folded, comments 2 folded
 
clipboard03
  In MSVC#2005EE you can not fold for-loops (line 43 - 47).
  If Emerald Editor would have this feature there would be a lot of rejoicing Cheesy

/p9k


* Clipboard01.png (41.42 KB, 556x630 - viewed 729 times.)

* Clipboard02.png (35.58 KB, 552x552 - viewed 706 times.)

* Clipboard03.png (11.56 KB, 476x217 - viewed 691 times.)

* Clipboard04.png (17.98 KB, 462x350 - viewed 704 times.)
Logged
hoeltgman
Miner
**
Posts: 17


« Reply #2 on: November 10, 2006, 08:36:01 pm »

Notepad++ and Geany (great editor on linux btw...) have this feature both. Once you start using this, you don't want to miss it anymore.
Logged
ddlieber
Prospector
*
Posts: 3


« Reply #3 on: March 13, 2007, 02:59:45 pm »

Yes, please try to include this feature!
Logged
Wahooney
Miner
**
Posts: 25


« Reply #4 on: January 16, 2008, 06:34:29 am »

I believe EE is using Scintilla for it's editing component, which has built-in code folding capabilities, among other things.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.233 seconds with 19 queries.