Set/Reset File Code Folding, then Saving

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

I don't use the code collapsing feature of the editor but today I decided to fold a handful of functions and noticed that when saving the file, they functions are not saved as collapsed . 

I searched through the options and couldn't find a setting for this feature.  Is it possible to save a file with the functions collapsed being saved as collapsed?

 

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
No

That's odd because VS2017 does save the folded sections. (Like OP, I don't use the feature much or even at all)

 

  • Perhaps VS2015 (the baseline platform for AS7) did not save folded sections.
  • Perhaps it isn't Visual Studio that is actually doing the code folding; it could be an extension.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


N.Winterbottom wrote:
That's odd because VS2017 does save the folded sections.
Oh yeah, I see that. Clearly nothing is stored in the .c/.cpp file itself so it must be storing the folding information in the .user file yet on a small example (one source file project) I don't see where in ANY of he files it actually stores this:

 Directory of D:\c\ascii_graphics

09/03/2021  11:25    <DIR>          .
09/03/2021  11:25    <DIR>          ..
09/03/2021  11:25            28,520 ascii_graphics.cpp
26/02/2021  15:15             1,440 ascii_graphics.sln
26/02/2021  15:15             7,634 ascii_graphics.vcxproj
26/02/2021  15:15               970 ascii_graphics.vcxproj.filters
26/02/2021  15:15               165 ascii_graphics.vcxproj.user
26/02/2021  16:38    <DIR>          Debug
               5 File(s)         38,729 bytes

I've looked at every one of those (most are XML) and do not see any likely candidate as to where it is storing the folding info and yet on reloading the solution:

 

 

but where it is actually storing the fact that lines 7 and 139 are folded is a complete mystery ??

 

Anyway, if you do the same in AS7/MCS7 it does not store the folding.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
if you do the same in AS7/MCS7 it does not store the folding.

If you were to find it, I wonder  if you could manually hack the info into the appropriate place for MS7 to find it ... ?

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If one could be arsed you could run msdev with procmon from sysinternals and watch all the CreateFile and Queryreg calls it makes to see what file or registry key it might be saving the folding info to (I hope it's not reg keys!!) but not everyone has that much patience !!