Skip to content

Instantly share code, notes, and snippets.

@linktohack
Created April 20, 2015 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save linktohack/61c052cefb1c488edce4 to your computer and use it in GitHub Desktop.
Save linktohack/61c052cefb1c488edce4 to your computer and use it in GitHub Desktop.
emacs helper to open current file in Sublime Text and Lyx
(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