Section about RStudio function shortcuts

Fixes #1058
This commit is contained in:
Hadley Wickham 2022-09-29 11:27:33 -05:00
parent 931e568be2
commit 78ac42c1a5
1 changed files with 11 additions and 0 deletions

View File

@ -827,6 +827,16 @@ So, for now, strive to keep your functions simple, focussing on concrete repetit
You can also learn other techniques in <https://ggplot2-book.org/programming.html>.
## RStudio
Once you start writing functions, there are two RStudio shortcuts that are useful.
- If you put your cursor on the name of a function that you've written, `F2` will take you to its defintion.
- Press `Ctrl + .` to open the fuzzy file and function finder.
You can type the first few letters in your function name and it'll appear in the dropdown.
You can also navigate to files, Quarto sections, and more, making it a very hand navigation tool.
## Style
It's important to remember that functions are not just for the computer, but are also for humans.
@ -915,3 +925,4 @@ You can figure out when you need to use embracing by looking in the documentatio
In the next chapter, we'll dive into some of the details of R's vector data structures that we've omitted so far.
These are immediately useful by themselves, but are a necessary foundation for the following chapter on iteration that provides some amazingly powerful tools.