记事本++;can';t折叠SAS程序。。。跑正确编码

记事本++;can';t折叠SAS程序。。。跑正确编码,sas,notepad++,Sas,Notepad++,我刚开始使用notepad++编辑SAS代码,发现我当前的userDefineLang_SAS.xml配置无法正确地将SAS代码块从“proc”折叠到“run” 以下是我在notepad++中的示例代码: 1 /*sample code*/ 2 proc sort data=orion.usorders04 3 out=work.sort_usorders04; 4 by Customer_ID Order_Type; 5 run; 6 7 data discount1

我刚开始使用notepad++编辑SAS代码,发现我当前的userDefineLang_SAS.xml配置无法正确地将SAS代码块从“proc”折叠到“run”

以下是我在notepad++中的示例代码:

1 /*sample code*/
2 proc sort data=orion.usorders04
3           out=work.sort_usorders04;
4    by Customer_ID Order_Type;
5 run;
6
7 data discount1 discount2 discount3;
8     set work.sort_usorders04;
9     by customer_id order_type;
10    if first.order_type = 1 then totalsales=0;
11    totalsales + total_retail_price;
12    if last.order_type =1 and totalsales >= 100 then
13        do;
14            if order_type = 1 then output discount1;
15        if order_type = 2 then output discount2;
16        if order_type = 3 then output discount3;
17       end;
18    keep customer_id customer_name totalsales;
19    format totalsales dollar11.2;
20 run;
正如我所期望的,我希望第2行到第5行可以折叠在一起。然而,它并没有像我预期的那样折叠,而是将第2行到第20行折叠在一起。请参见此链接中的示例图像:

有趣的是,如果我在proc排序代码中去掉“data=,第2行到第5行可以折叠在一起。请参见使用此链接的示例图像:


由于在.xml文件中,“data”和“proc”都被指定为折叠代码块的开头关键字,因此当proc排序代码中同时显示proc和data时,会混淆记事本+。我一直在尝试多种方法来调整.xml文件中的配置,但都不起作用。如果你有办法解决这个问题,请告诉我。谢谢

我遇到了这个问题,经过多次修补,我发现了一些适合我的东西。我不确定您的完整语言是如何定义的,但将data=作为折叠式代码1部分的中间标准适用于我的情况:


最好向N++的作者报告这一问题,我也遇到了这个问题,无法找到解决方法-如果您找到了,请告诉我!如果您对折叠过程而不是数据步骤没有意见,那么您可以将
data
从折叠关键字更改为常规关键字。