How do I search a text in all the projects in sublime text 2 with only specified extension. For example 'error message' only in files with .js extension
-
2possible duplicate of [Sublime text 2 find in folder with file extension](http://stackoverflow.com/questions/17555791/sublime-text-2-find-in-folder-with-file-extension) – caramba May 08 '14 at 11:52
2 Answers
Use Ctrl Shift F which will bring up the global search dialog. You can specify options from there.
Edit: Specify '*.js' in the where. See Sublime text 2 find in folder with file extension

- 1
- 1

- 171
- 2
- 19
-
Specify '*.js' in the where. See http://stackoverflow.com/questions/17555791/sublime-text-2-find-in-folder-with-file-extension – tympaniplayer May 08 '14 at 11:43
search for a word or regex in all files:
CMD+Shift+F
on Macs to search all files
Specify *.js
in combination with ,-*/tests/*, -*/build/*
or similar places you don't want to look
jump to a function in your codebase:
quickly type the function's name or put your cursor on it, then press CMD+Optn+Down
to show a small list of possibilities, then use up/down
and letters to deliminate, optionally press ESC
to leave the header box, or ENTER
to enter the file at the function's appearance
jump to a function in the current file:
use CMD+R
and deliminate, using ESC
to cancel
jump to a file: CMD+P
or CMD+T
again using ESC
or ENTER
with delimiters
quickly highlight all occurences of a word:CMD+D
or use CMD+G / CMD+SHIFT+G
to skip around
fold code for quick file overview: use CMD+A
followed by CMD+KJ
and CMD+K2
for example
fold code and scroll and use the aforementioned CMD+OPTN+DOWN
to get a good understanding of related files. Predawn Skin looks great with neon green functions :)
Install that with Package Control using CMD+SHIFT+P
Which reminds me that you can set your file syntax using CMD+SHIFT+P
"Set Syntax: JavaScript"

- 10,027
- 9
- 55
- 83