Feature request for a text-editor with support for literate programming [closed]

好久不见. 提交于 2019-12-25 04:45:27

问题


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:


Try this

#region abc
//your code here
#endregion

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



来源:https://stackoverflow.com/questions/3701317/feature-request-for-a-text-editor-with-support-for-literate-programming

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!