Finding your way around

There are many ways to find things in Cursive. Here are some of the most important.

Show Usages

This is one of the most useful actions when programming. It will show you the usages across your project of the symbol under the cursor. Invoke it with Ctrl Alt F7 (Cmd Alt F7 on Mac). If you select one of the usages you’ll be taken to it.

Find Usages

Alt F7 will open the usages in a tool window. You can group them in various ways, turn on previews (which will split the pane to show you the code around the usage), and change the search parameters. If you’d like to search specifying the parameters from the start use Ctrl Shift Alt F7 (Cmd Shift Alt F7 on Mac).

Recent Files

Often when working in a project you’re mostly working on a small set of files. Recent Files (Ctrl E, or Cmd E on Mac) presents you with a list of the files you’ve had open recently. You can filter the list by typing part of the name of the file you’re looking for. This feature has completely replaced editor tabs for us here at Cursive.

There’s a similar list for recently edited files, accessible via Ctrl Shift E (Cmd Shift E on Mac).

Cursive can display the namespace instead of the filename in the Recent Files list. However for internal reasons this will only be enabled if you have Settings→Editor→General→Editor Tabs→Show directory in editor tabs for non-unique filenames set. If you have tabs disabled as described in the minimal UI section, you’ll have to enable them briefly to turn this flag on.

File structure

This will display a list of symbols defined in the current file. You can access it via Ctrl F12 (Cmd F12 on Mac). You can filter the list as usual by typing.

Navigation bar

As a fast alternative to opening the project browser, consider using the navigation bar. You invoke it with Alt Home, and you can navigate around it using the arrow keys.

You can also execute actions from the nav bar, for example code generation.

Step between functions

You can step from method to method using Alt up/down arrow (Ctrl up/down on Mac).

Navigate to files, symbols and namespaces

You can navigate to a file by name by pressing Ctrl Shift N (Cmd Shift O on Mac), and filter by typing as usual.

You can also navigate to any symbol defined anywhere in your project, and optionally search inside third-party libraries as well.

You can also navigate to the file containing a namespace by using the Navigate→Namespace… action. This will give you a list of fully-qualified namespace names to select from.

Navigating from Java to Clojure for Interop projects

Cursive supports navigation and references searching from Java calls into the Clojure API. This works for both the RT functions and the new Clojure 1.6 API. Completion is available in these fields, and you can navigate from Java to Clojure and vice versa.

Select in

You can view the current file in the project window or Finder/Explorer by pressing Alt F1.