如何在vim中过滤一些多行语句

时间:2016-07-27 22:31:09

标签: regex vim vim-plugin

我有vim-script函数调用ScreenShellSend("some string"),我希望能够过滤多行以使用正确的字符串提供此函数。

我怎样才能这样做:

//@brief: an example => TO LINE IS REMOVED
anExampleOfFunction:{[x;y]
    x: doing some stuff; //a comment => after // is removed
    //a comment => this is removed
    :y;
 };
 someVariable: 5;
 //another comment => this is removed
 anotherFunction:{[x] 2*x};

要:

anExampleOfFunction:{[x;y] x: doing some stuff; :y; }; someVariable: 5; anotherFunction:{[x] 2*x};

0 个答案:

没有答案