Created
April 20, 2015 17:20
-
-
Save linktohack/61c052cefb1c488edce4 to your computer and use it in GitHub Desktop.
emacs helper to open current file in Sublime Text and Lyx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun link/subl-file () | |
"Edit current file in subl." | |
(interactive) | |
(shell-command (format "subl -n %s:%s" | |
(buffer-file-name) | |
(line-number-at-pos)))) | |
(evil-define-operator link/subl-line (beg end type) | |
"Edit current region in subl." | |
:motion evil-line | |
(interactive "<R>") | |
(shell-command-on-region beg end "subl -n -" t t)) | |
(evil-define-operator link/lyxit-line (beg end type) | |
"Edit current region in lyx." | |
:motion evil-line | |
(interactive "<R>") | |
(shell-command-on-region beg end "lyxit -n -" t t) | |
(when org-indent-mode | |
(org-indent-mode 1))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment