2012-11-09

[emacs] compare with clipboard like IntelliJ IDEA





comparewithclipboard.el





(defun compare-with-clipboard  ()
  "compare current buffer with contents in clipboard"
  (interactive)  
  (let ((clipboard-buffer (get-buffer-create "*clipbord*"))
        (orig-buffer (current-buffer)))
    (switch-to-buffer clipboard-buffer)
    (delete-region (point-min) (point-max))
    (yank)
    (ediff-buffers clipboard-buffer orig-buffer)))

-->

No comments:

Post a Comment