4

The futurize automatically added some line into my codebase. Most of the time is on the first line.

from builtins import object

I would like to delete that line completely. So something like this

from builtins import object
import logging

will become

import logging

I have tried to use \b, that doesn't seem to work.

Brett Cannon
  • 12,223
  • 1
  • 36
  • 34
Jerry
  • 1,614
  • 2
  • 19
  • 36
  • Do you mean with just the keyboard? I use the plugin IntelliJ Keyboard Bindings. Then I use command + delete on Mac, or Ctrl + Delete on Windows. – Brant Unger Dec 02 '19 at 15:06
  • Sorry, I meant to ask how to do that in search and replace – Jerry Dec 02 '19 at 15:07
  • Does this answer your question? [Multiline regular expression search in Visual Studio Code](https://stackoverflow.com/questions/52647894/multiline-regular-expression-search-in-visual-studio-code) – Mrkinix Dec 02 '19 at 15:19

1 Answers1

5

In order to remove completely a line in VS Code through "Search and replace" you need to enable the RegExp function, then you type the line you want to remove followed by a "\n" and you leave the Replace field empty.

enter image description here