Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sublime text- "list lines containing 'find' string

Tags:

sublimetext2

How do I list the lines that contains the matches from the "find" command ? ie., I would like to list all the matching lines in a separate window. Currently one can only goto next / previous 'find'.

like image 709
user85917 Avatar asked Jan 16 '13 17:01

user85917


People also ask

How do I search a line in Sublime Text?

In Sublime Text, you can quickly jump to any line in the code. Hit Ctrl–G (Mac and Windows). Type in a line number and hit Return/Enter to go to that line.

How do I highlight a line in Sublime Text?

In Sublime Text, you can select lines with a keystroke. Hit Cmd–L (Mac) or Ctrl–L (Windows) to select the current line. Repeat the keystroke to add the line below.

How do you delete multiple lines in Sublime Text?

Multiple Selections To select multiple regions using the keyboard, select a block of text, then press Ctrl+Shift+L to split it into one selection per line. When you're done with using multiple selections, just press Ctrl+K to trim all but the first.


1 Answers

1.Here is a reference: How can I filter a file for lines containing a string in Sublime Text 2?

  • Hit Ctrl+F(⌘+F) to "Find All" occurences;
  • Hit Ctrl+L to Expand All Selection to Line.
  • Then you can Ctrl+C(⌘+C) or Ctrl+Shift+K(⌃+⇧+K) to copy/delete the lines.

2.There's now a plugin for filtering lines: https://github.com/davidpeckham/FilterLines It allows filtering and code folding based on strings or regular expressions. filterlines plugin:Edit->Line->Filter

like image 83
fan2 Avatar answered Sep 22 '22 07:09

fan2