Skip to content
/ altw Public

RStudio addin to copy selection(s) in current source editor to X clipboard

License

Notifications You must be signed in to change notification settings

fnaufel/altw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

altw: an RStudio addin to copy selection to clipboard

In my installation of RStudio, even with Emacs keybindings, I was not able to use M-w (i.e., Alt-W) for copying.

In the Tools | Modify Keyboard Shortcuts… menu, it is not possible to bind keys to the copy command.

C-w and C-y work fine for killing and yanking, respectively.

altw is an RStudio addin to copy the current selection to the clipboard.

If there are multiple selections in the active document (made with multiple cursors), the altw concatenates them with \n as the separator before copying.

As any addin, it can be bound to a keyboard shortcut.

Now I can use M-w to copy text to the clipboard, as in Emacs.

Installation

You can install altw from GitHub with:

# install.packages("devtools")
devtools::install_github("fnaufel/altw")

After installation, go to the Tools | Addins | Browse Addins… menu, find altw, select it, and click on Keyboard shortcuts to bind it to your favorite key.

Dependencies

This addin uses the great clipr package.

If you’re using any distribution of GNU-Linux with X11, you need to have the xclip program installed.

About

RStudio addin to copy selection(s) in current source editor to X clipboard

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages