add open-pdf function and enable latex preview mode at startup.

This commit is contained in:
Ivan Malison 2014-08-14 14:36:23 -07:00
parent 6723c93068
commit 2061193c85

10
init.el
View File

@ -119,6 +119,9 @@ Return a list of installed packages or nil for every package not installed."
(add-hook 'after-init-hook (add-hook 'after-init-hook
'(lambda () (setq debug-on-error t))) '(lambda () (setq debug-on-error t)))
(latex-preview-pane-enable)
;; (add-hook 'latex-mode-hook (lambda () (global-set-key (kbd "M-n") ))
;; ============================================================================= ;; =============================================================================
;; Misc ;; Misc
;; ============================================================================= ;; =============================================================================
@ -145,6 +148,11 @@ Return a list of installed packages or nil for every package not installed."
(tmux-copy b e) (tmux-copy b e)
(kill-ring-save b e)) (kill-ring-save b e))
(defun open-pdf ()
(interactive)
(let ( (pdf-file (replace-regexp-in-string "\.tex$" ".pdf" buffer-file-name)))
(shell-command (concat "open " pdf-file))))
;; ============================================================================= ;; =============================================================================
;; tmux ;; tmux
;; ============================================================================= ;; =============================================================================
@ -217,8 +225,6 @@ Return a list of installed packages or nil for every package not installed."
;;(load-file "~/.emacs.d/emacs-for-python/epy-init.el") ;;(load-file "~/.emacs.d/emacs-for-python/epy-init.el")
(setq skeleton-pair nil) ;; This stuff sucks.
;; ============================================================================= ;; =============================================================================
;; Custom Key Bindings ;; Custom Key Bindings
;; ============================================================================= ;; =============================================================================