Feature request for a text-editor with support for

2019-08-31 08:28发布

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).

1条回答
Luminary・发光体
2楼-- · 2019-08-31 09:16

Try this

#region abc
//your code here
#endregion

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

查看更多
登录 后发表回答