Navigate recent locations and changes
JetBrains Rider keeps track of your actions and navigation history, and offers some commands that let you navigate to places where you have edited or just studied the code.
The lists of viewed/edited files are stored separately for each solution you open, and it is saved when you close the solution. This means that you can invoke this command as soon as you open a solution to get the list of the files you worked with in previous working sessions.
tip
You can delete any item from the list of viewed/edited files by pressing Delete when this item is selected.
View | Recent Files
This command helps you quickly find a file that you have opened recently in the current solution.
When the popup appears, you can press once again or tick the corresponding checkbox to only show recently changed files.
View | Recently Changed Files
This command is similar to Go to Recent Files, but it allows you to navigate to symbols or files that you have recently modified in the current solution.
When the popup appears, you can press once again or clear the corresponding checkbox to show all recently viewed files.
You can use the Recent Changes list to see a list of files that were changed either locally or externally in your project. If necessary, you can revert those changes.
In the main menu, go to View | Recent Changes .
In the Recent Changes tab of the Local History tool window, select a change.
The IDE shows you a list of files modified with this change in the panel below.
Press Enter or double-click the file to open the diff viewer where you can check what was changed and revert those changes if necessary.
You can also check your recently viewed or changed code using the Recent Locations popup.
To open the Recent Locations popup, press CtrlShift0E. The list starts with the latest visited location at the top and contains code snippets.
While in the popup, use the same shortcut or select the Show changed only checkbox to see only the locations with changed code.
To search for a code snippet, in the Recent Locations popup, start typing your search query. You can search by the code text, filename, or breadcrumbs.
To delete a location entry from the search results, press either Delete or Backspace.
Keep in mind that the deleted location is also removed from the list of entries that you access with the Ctrl0- shortcut.
Navigate | Last Edit Location
CtrlShiftBackspace
This command brings your caret to the place in your solution where you have made some changes. You can invoke this command several times to go further back in your editing history.
Navigate | Back/Forward ( or on the toolbar)
Ctrl0-/CtrlShift0-
Using these commands, you can quickly navigate through the history of your movements in the codebase. Whenever you move in the editor and switch between editor tabs, as well as when you use Navigate and search commands (except Back and Forward of course), the navigation history is recorded and you can go backward and forward within it.
If you edit a file that is under version control, there are several ways to move between VCS changes: you can use the navigation commands, keyboard shortcuts, and the change markers.
Press CtrlAltShift0N/CtrlAltShift0P.
Go to Navigate | Next / Previous Change.
Click a change marker on the left gutter, and then click or .