Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change default editor in RStudio to notepad++

I would like to change default editor in RStudio (Windows 7) to notepad++.

I know that I should use

options(editor = "notepad")

and then run, for example:

mean <- edit(mean)

but when I type notepad++ I get this error

options(editor = "notepad++")
mean <- edit(mean)
Error in edit(name, file, title, editor) : 
  unable to run editor 'notepad++'

I Windows I can run notepad++ in console by typing "start notepad++".

I would be very grateful for help!

Here is my Session Info:

> sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=Polish_Poland.1250  LC_CTYPE=Polish_Poland.1250    LC_MONETARY=Polish_Poland.1250
[4] LC_NUMERIC=C                   LC_TIME=Polish_Poland.1250    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] tools_2.15.2
like image 835
Maciej Avatar asked Feb 12 '13 09:02

Maciej


People also ask

How do I change the default text editor to Notepad ++?

Set Notepad++ as Default Text EditorRight-click on your dummy file and select “Open with.” You will see Notepad and WordPad as suggested options. Select “Choose another app” instead. Click on more apps with an arrow pointing downward.

How to run code in RStudio windows?

To execute the line of source code where the cursor currently resides you press the Ctrl+Enter key (or use the Run toolbar button): After executing the line of code, RStudio automatically advances the cursor to the next line.


1 Answers

Ok, it was really simple:

options(editor = "C:/Program Files (x86)/Notepad++/notepad++.exe")

Sorry for the problem.

like image 90
Maciej Avatar answered Sep 27 '22 21:09

Maciej