Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I find the particular file in a Project/Folder in Sublime Text

Tags:

sublimetext

I know that using ctrl+shift+f we can find the text in folder we want and simple ctrl+f will find the text in a opened file or we can right folder and click on a option Find in Folder... to search the text

I am looking for, how can I find the file in a Folder/Project.

like image 580
Mohammed Abrar Ahmed Avatar asked Jun 25 '16 17:06

Mohammed Abrar Ahmed


People also ask

How do I search for a file in Sublime Text?

Use the Search all shortcut: Ctrl + Shift + F , then select the folder in the "Where:" box below. (And for Mac, it's ⌘ + Shift + F ).

How do I open Sublime Text in a folder?

If you often work on the different projects in Sublime Text being able to open the current path in Terminal is a big time saver. Run this command in Terminal now when you type subl Sublime Text should open. Now to open a folder type subl . will open the current folder in Sublime Text.

How do I add files to a Sublime Text folder?

You can add files and folders on the sidebar in Sublime Text. First, go to Project -> Add Folder to Project and select whatever your parent folder is. That'll put your parent folder in the sidebar. Then you can right click on any of the folders in the sidebar to create child files and folders.


2 Answers

You can use the Goto Anything feature (Ctrl+P on Windows and Linux, Cmd+P on macOS) and type the name of the file you're looking for. If there are multiple hits, you can select the appropriate file using cursor keys. It also supports powerful operators, that let you jump to specific parts inside a file.

Examples:

  • file.js opens that file
  • :100 jumps to line 100 in current file
  • file.js:100 jumps to line 100 in file.js
  • @loadFile lists all files with classes/functions named loadFile (shortcut: Ctrl+R, Cmd+R on macOS)
  • file.js@loadFile jumps to a loadFile() in file.js
like image 200
idleberg Avatar answered Dec 06 '22 02:12

idleberg


This can be done using:

  • Windows: Ctrl + P

  • Mac: Cmd + P

It works much like ItelliJ's Shift - 2 times, with a faster and accurate prediction.

like image 33
Shivaji Reddy Avatar answered Dec 06 '22 03:12

Shivaji Reddy