Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rolandwalker/simpleclip
Simplified access to the system clipboard in Emacs.
https://github.com/rolandwalker/simpleclip
Last synced: 2 months ago
JSON representation
Simplified access to the system clipboard in Emacs.
- Host: GitHub
- URL: https://github.com/rolandwalker/simpleclip
- Owner: rolandwalker
- Created: 2012-11-27T19:02:56.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2022-05-18T12:51:05.000Z (over 2 years ago)
- Last Synced: 2024-08-02T01:26:20.572Z (6 months ago)
- Language: Emacs Lisp
- Size: 59.6 KB
- Stars: 174
- Watchers: 8
- Forks: 15
- Open Issues: 5
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
[![Build Status](https://github.com/rolandwalker/simpleclip/workflows/CI/badge.svg)](https://github.com/rolandwalker/simpleclip/actions)
# Overview
Simplified access to the system clipboard in Emacs.
* [Quickstart](#quickstart)
* [Explanation](#explanation)
* [Keybindings](#keybindings)
* [Notes](#notes)
* [Compatibility and Requirements](#compatibility-and-requirements)## Quickstart
```elisp
(require 'simpleclip)
(simpleclip-mode 1)
;; Press super-c to copy without affecting the kill ring.
;; Press super-x or super-v to cut or paste.
;; On OS X, use ⌘-c, ⌘-v, ⌘-x.
```## Explanation
By default, Emacs orchestrates a subtle interaction between the
internal kill ring and the external system clipboard.`simpleclip-mode` radically simplifies clipboard handling: the
system clipboard and the Emacs kill ring are made completely
independent, and never influence each other.`simpleclip-mode` also enables support for accessing the system
clipboard from a TTY where possible. You will likely need to
set up custom keybindings if you want to take advantage of that.To use simpleclip, place the `simpleclip.el` library somewhere
Emacs can find it, and add the following to your `~/.emacs` file:```elisp
(require 'simpleclip)
(simpleclip-mode 1)
```## Keybindings
Turning on `simpleclip-mode` activates clipboard-oriented key
bindings which are modifiable in `customize`.The default bindings override keystrokes which may be bound as
alternatives for kill/yank commands on your system. "Traditional"
kill/yank keys (C-k, C-y, M-y) are unaffected.The default keybindings are
Keystroke | Command
------------------------------------------|--------------------------------
super-c (*ie* ⌘-c) | `simpleclip-copy`
super-x (*ie* ⌘-x) | `simpleclip-cut`
super-v (*ie* ⌘-v) | `simpleclip-paste`
C-<insert> | `simpleclip-copy`
S-<delete> | `simpleclip-cut`
S-<insert> | `simpleclip-paste`The super keybindings are friendly for OS X: super is
generally mapped to the "command" key *ie* ⌘. The insert
and delete keybindings are better suited for Unix and MS Windows.## Notes
`x-select-enable-primary` is not affected by `simpleclip-mode`.
Access to the system clipboard from a TTY is provided for those
cases where a literal paste is needed -- for example, where
autopair interferes with pasted input which is interpreted as
keystrokes. If you are already happy with the copy/paste provided
by your terminal emulator, then you don't need to set up
simpleclip's TTY support.The following functions may be useful to call from Lisp:
simpleclip-get-contents
simpleclip-set-contents## Compatibility and Requirements
No external dependencies
Tested on OS X, X11, and MS Windows