2

I was using ctrl + - to make the code font smaller (or zooming out) in the R studio source editor and I got the pop up window (picture attached).

I think I pressed OK by mistake and I lost a huge chunk of code. How can I recover that?

Also. it makes me bit skeptical of using Rstudio. Pop out message

David Tansey
  • 5,813
  • 4
  • 35
  • 51
Saubhagya
  • 51
  • 1
  • 4
  • 1
    There is no shortcut for zooming out. If you want to make the code font smaller, go to Tools -> Global Options and in the Appearance Tab change the font size to whatever value you prefer. – Phil Mar 30 '17 at 20:01
  • Hi, actually if you press Ctrl+ -/ +, it does zoom in and out. But if you press it multiple times, it shows a pop out message as I shown in the picture. It makes me nervous now to use Rstudio. I don't know why my tags are not working – Saubhagya Mar 31 '17 at 00:01
  • All shortcuts in R Studio can be found here: https://support.rstudio.com/hc/en-us/articles/200711853-Keyboard-Shortcuts As you'll see, there is no default shortcut for zooming in/out. You can however customize a shortcut for this, as per here: https://support.rstudio.com/hc/en-us/articles/206382178-Customizing-Keyboard-Shortcuts – Phil Mar 31 '17 at 01:11

5 Answers5

0

ctrl + z is the undo command (Windows)

For other shortcuts:

https://support.rstudio.com/hc/en-us/articles/200711853-Keyboard-Shortcuts

From a beginner standpoint, I find rstudio to be one of the most user friendly dedicated IDE's available for any programming language.

Minnow
  • 1,733
  • 2
  • 26
  • 52
0

If you are on Windows, a JSON file with your code is available at

C:\Users[your user]\AppData\Local\RStudio-Desktop\sources

Follow instructions as: https://stackoverflow.com/a/51433764/3142205

This is a terrible bug that RStudio has. I have never seen a code editor that every time you change the zoom level you lose your code! It is a terrible issue that makes me wonder if I should go back to Notepad++. I have never lost a file using Notepad++.

Updated: This issue has been solved in RStudio 1.2.1335 "Allow changing zoom level without reloading (#2125)".

0

Use ctrl with + on the right keyboard, don't use key.

xixixi
  • 1
0

In this case I immediately press ctrl + z. If this is not recovering your code try with history tab -> go to history tab: enter image description here

TarJae
  • 72,363
  • 6
  • 19
  • 66
0

may the shortcut of Zoom Source Editor with Ctrl+Shift+1 is a substitute plan. It’s a pity that Rstudio doesn't provides a support to ctrl + +/-(mouse scroll)

lemmingxuan
  • 549
  • 1
  • 7
  • 18