Is it possible to remove a code line by its number?


#1

Let’s say I’d like to remove lines that contain a particular code. I’m using the following code:

const cursor = editor.getSearchCursor('// #foldBlock');
while (cursor.findNext()) {
   const lineNumber = cursor.from().line;
   // how can I remove a line using the `lineNumber` value?
}

Thanks.