In the C + + project and source code development of UE4, visual studio series was often used as ide in the past, but vs has always been unfriendly to the support of UE4 project. The installation of small tomato visual Assist X Series plug-ins is also very metaphysical and fails from time to time.
JetBrains launchedRider For UE4, after a period of trial, I feel that vs + VA can be completely defeated in daily development. Although it is still in the test version, it has basically not encountered any major problems after polishing in recent years.
Here is a summary of some functions that can greatly improve the efficiency of rider when writing code. The shortcut keys attached to the article areVisual Studio
In mode.
1 – editor shortcuts
Sometimes you need to start a new line in the code, sometimes at the top, and sometimes at the bottom. If the cursor is directly in the line, useEnter
It breaks a line, so we often use itHome->Enter
/End->Enter
The two-step method is realized by pressing the right hand twice, which is more troublesome. There are shortcut keys in the rider:
Ctrl+Enter
: new line aboveShift+Enter
: new line below
Ctrl
andShift
The up-down relationship is a little counterintuitive, and you can work on your ownSetting->KeyMap
Inside modification
Some other line editing shortcuts:
Ctrl+L
: delete rowCtrl+D
: copy row / selected blockCtrl+Alt+Shift+Up/Down
: move the line up and down (it’s amazing not to destroy the block structure, but the response is sometimes a little slow)
In addition to the code block folding function provided by rider on the left side of the code, you can also manually select the area to be folded and use shortcut keys to fold:
Ctrl+M, H
: fold selected (hide)Ctrl+M, E
: expandCtrl+M, S
: shrink
2 – Search shortcut
Double click shift
/Ctrl+T
: global search everywhere, compact versionFind in Files
, it is convenient to find some key documents in the project;Ctrl+F
: search in the file. You can search the selected content in the file without filling in the search content;Ctrl+Shift+F
: search in all files, the search speed will be slower, but it is more complete than fast search;Ctrl+Shift+T
: search for files, used to search for files by name (this option is automatically included in quick search)
Alt+\
: used to quickly search some methods / members in the current file
3-navigation shortcut
In addition to the quick search method in the file mentioned above, there are also some quick navigation methods in the file:
Ctrl+[
: move to the first line of the method / class definitionAlt+Up
: move to previous methodAlt+Down
: move to next methodCtrl+G
: move to specified row / column number
A special quick navigation in a file is the structure view, which can directly view the class, method, member function, etc. in the current file in the form of list. The shortcut key to open isCtrl+Alt+F
, you can also find the options page button in the lower left corner.
Shortcut keys for code page (TAB) navigation:
Middle click tab
: close the tab page (you don’t have to point a small fork)Ctrl+F4
: close the current tab page (you can even use the mouse)Alt+Left/Right
: switch the displayed tab page from left to rightCtrl+Tab
: useSwitcher
Quickly switch tab pagesShift+F4
: open a tab page with a separate new window
File level navigation shortcuts:
Ctrl+,
: recent filesCtrl+Shift+,
: recently modified files
Alt+`
: navigation menu (current file / selection)Alt+Shift+L
: locate the current file in the solution directory
Some class / function definitions are related to file navigation
F12
: find definition / usageShift+F12
: find usage
Alt+Shift+F12
: UsageCtrl+F12
: find implementationCtrl+Shift+F11
: found type declaration
4 – bookmarks view
When reading a lot of code in the project, those who navigate through various files and functions are easy to lose themselves. Rider provides bookmarks to manage the code locations we often go to or some portals.
Shortcut keys for opening Bookmarks:Alt+2
, or you can find it in the lower left corner of the editor. This is the management page of all bookmarks, including user-defined Book signature, adding bookmark list and other operations.
Ctrl+K, K
: add a normal bookmark to the current line, and you will see an additional flag next to the line number;
Ctrl+F11
: add a bookmark with mnemonic symbols. You can add a mnemonic flag to this bookmark to replace the ordinary flag, which is more symbolic;
Ctrl+`
: a floating window pops up. Click bookmark to quickly preview the corresponding code content
5 – inheritance view (hierarchy)
When you want to understand the inheritance relationship between various classes, rider provides a very useful function, that is, inheritance view.
Select the class you want to view, and then useCtrl+E, H
You can open the corresponding inheritance view. There are two key options. The first is to view which supertypes you inherit and the second is to view which subtypes you have.
Using the inherited view is better than pressing one by oneF12
Then it is much more straightforward to make up the inheritance relationship of various classes between various files.