-1

This is a feature request for the writers of Visual Studio and any other programmer's editor.

Consider a literate program as follows:

/* File Name: LiterateProgram.h */ // \begin{comment} 

#pragma once

#include "myHeader.h"

/* \end{comment}
%\bigskip
\begin{lstlisting} %
*/
class CSomeClass : public CSomeBase {
public:
    float someFunction(float some paramter);
};
// \end{lstlisting} \begin{comment}

/* \end{comment} %*/

I'd like an editor window with two small icons representing (COLLAPSE_CODE) and (COLLAPSE_COMMENTS) in the bottom right corner. If COLLAPSE_COMMENT, then the view of the file would look like:

+
#pragma once

#include "myHeader.h"
+    
class CSomeClass : public CSomeBase {
public:
    float someFunction(float some paramter);
};
+

If COLLAPSE_CODE, then the view of the file would look like:

/* File Name: LiterateProgram.h */ // \begin{comment} 
+    
/* \end{comment}
%\bigskip
\begin{lstlisting} %
*/
+
// \end{lstlisting} \begin{comment}
+    
/* \end{comment} %*/

Bonus points for displaying a side-by-side splitscreen of both views simultaneously. (maybe that's the behaviour if both ICONS are chosen).

vo1stv
  • 55
  • 2
  • 17
  • The FAQ says this is the site to post questions about "software tools commonly used by programmers". I could have phrased the topic in the form of a question; if so the question would be: does anyone know of an editor that already has this feature? However, I wasn't interested the answer, "no". – vo1stv Sep 13 '10 at 15:46
  • I give. I've moved the topic to SourceForge: https://sourceforge.net/projects/switchhats/ – vo1stv Sep 14 '10 at 16:48
  • This may not have been a question, but a lot of the pieces I neded to solve it (like this one: http://stackoverflow.com/questions/636797/external-editor-in-visual-studio-2008/636807#636807 ) are on StackOverflow anyway. Thanks to Hugh Brackett (could that be his real name), looks like a good answer (if it is possible to answer something that is not a question) is possibly to develop a plugin for NPP (see http://stackoverflow.com/questions/1687281/a-text-editor-that-auto-folds-parentheses/3702445#3702445) – vo1stv Sep 15 '10 at 19:23

1 Answers1

4

Try this

#region abc
//your code here
#endregion

http://msdn.microsoft.com/en-us/library/9a1ybwek%28v=VS.100%29.aspx

blizpasta
  • 2,624
  • 3
  • 25
  • 31
  • Thanks, but I don't thing regions will cut it. Regions would help divide a long file into collapsible regions, but what I want is just to be able to toggle between two views of the same file at the click of a button.... one view that has TeX'able literate-programming comments, the other that has compilable source code. – vo1stv Sep 13 '10 at 15:38