Skip to content

Instantly share code, notes, and snippets.

@saptarshiguha
Created January 19, 2017 05:00
Show Gist options
  • Save saptarshiguha/4e8fadeaa6a89dad4b1835ba0814886d to your computer and use it in GitHub Desktop.
Save saptarshiguha/4e8fadeaa6a89dad4b1835ba0814886d to your computer and use it in GitHub Desktop.
C-up>") 'xah-backward-block)
(global-set-key (kbd "<C-down>") 'xah-forward-block)
;;Use M-{ and M-} to activate the abbove(opt+shift+{)
(defun copy-from-osx ()
(shell-command-to-string "pbpaste"))
(defun paste-to-osx (text &optional push)
(let ((process-connection-type nil))
(let ((proc (start-process "pbcopy" "*Messages*" "pbcopy")))
(process-send-string proc text)
(process-send-eof proc))))
(setq interprogram-cut-function 'paste-to-osx)
(setq interprogram-paste-function 'copy-from-osx)
(setq save-interprogram-paste-before-kill t)
;;(setq x-select-enable-clipboard t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment