简体   繁体   中英

How do I set my default editor to emacs -nw in my .Rprofile?

As the question says, I want my default editor in R (eg when I do fix(fn_name)) to be the non-windowed mode of emacs as opposed to the windowed mode. Is there any way to do this?

Create a file somewhere (I use a bin directory under my home), called emacsnw like this:

#!/bin/sh
emacs -nw "$@"

and make it executable: chmod 755 emacsnw

Then you can do options(editor="/home/me/bin/emacsnw") and that will then call it.

Note I can never remember if "$@" or "$*" is the right way to pass args through a script, but this seems to work for fix() .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM