/docs/_docs/features/quick-open.md

https://github.com/facebook/nuclide · Markdown · 90 lines · 57 code · 33 blank · 0 comment · 0 complexity · 8206e9314a2b570ddef996cd60b6cbc6 MD5 · raw file

  1. ---
  2. pageid: feature-quick-open
  3. title: Quick Open
  4. layout: docs
  5. permalink: /docs/features/quick-open/
  6. ---
  7. Nuclide goes beyond just normal file opening capabilities. Quick Open provides multiple
  8. mechanisms to find a file, from recently opened files to a global OmniSearch that lets you search
  9. for anything a file might contain.
  10. * TOC
  11. {:toc}
  12. ## Toggling
  13. There are three ways to toggle the **Quick Open** window.
  14. - The `Cmd-T` (macOS) or `Ctrl-T` (Linux) keyboard shortcuts
  15. - [Command palette](/docs/editor/basics/#command-palette) searching for
  16. `Nuclide Quick Open: Find Anything Via Omni Search`
  17. - [Quick Launch Menu](/docs/quick-start/getting-started/#quick-launch-menu)
  18. ![](/static/images/docs/feature-quick-open-toggle-window.png)
  19. > The `Hack Symbols` pane will only show if you have [Hack](/docs/languages/hack) files in your
  20. > project.
  21. ## OmniSearch
  22. *Keyboard Shortcuts*: `Cmd-T` or `Cmd-P` (`Ctrl-T` or `Ctrl-P` on Linux)
  23. When launching the **Quick Open** window, you will be taken to the **OmniSearch** tab. All of the
  24. features of the other tabs are coalesced and condensed into your search results in this tab.
  25. ![](/static/images/docs/feature-quick-open-omnisearch.png)
  26. ## Filenames
  27. *Keyboard Shortcut*: `Option-Cmd-T` (`Alt-Ctrl-T` Linux)
  28. If you just want to search by filename (including within the path to the file) only, you can click
  29. on the **Filenames** tab in the **Quick Open** window.
  30. ![](/static/images/docs/feature-quick-open-filenames.png)
  31. ## Open Files
  32. *Keyboard Shortcut*: `Option-Cmd-O` (`Alt-Ctrl-O` Linux)
  33. If you have a lot of files open in your [editor](/docs/editor/basics), you can use the **Open Files** tab of Quick Open to quickly scan a list of your currently open files.
  34. ![](/static/images/docs/feature-quick-open-open-files.png)
  35. ## Recent Files
  36. *Keyboard Shortcut*: `Option-Cmd-R` (`Alt-Ctrl-R` Linux)
  37. If you have recently closed a file and would like to quickly open it back up, you can use the
  38. **Recent Files** tab of Quick Open. This tab also displays when you last opened the file(s).
  39. ![](/static/images/docs/feature-quick-open-toggle-recent-files.png)
  40. ## Hack Symbols
  41. *Keyboard Shortcut*: `Option-Cmd-Y` (`Alt-Ctrl-Y` Linux)
  42. If your project contains [Hack](/docs/languages/hack) code, you will get Hack language-specific
  43. search options. Here you can search based on function (`@function-name`), class (`#class-name`), or
  44. constant (`%constant-name`) symbols in your project.
  45. To access this feature, click on the **Hack Symbols** tab in the **Quick Open** window.
  46. ![](/static/images/docs/feature-quick-open-toggle-hack-symbols.png)
  47. ## Code Search
  48. *Keyboard Shortcut*: `Option-Cmd-K` (`Alt-Ctrl-K` Linux)
  49. The Code Search tab will help you find a piece of code within all the source files in your projects.
  50. Internally it uses either [ripgrep](https://github.com/BurntSushi/ripgrep) (rg),
  51. [silversearcher](https://github.com/ggreer/the_silver_searcher) (ag) or
  52. [ack](https://beyondgrep.com/).
  53. By default, Nuclide will use any available tool in your PATH.
  54. However, you can specify a default one in the *nuclide-code-search* tab in the Nuclide package
  55. settings. We recommend ripgrep and ag because they are blazing fast. Sadly, only ripgrep works
  56. properly on Windows.
  57. ![](/static/images/blog/2017-08-31/quick-open.png)