From 2061193c856654382e66582021fe861fd384acee Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 14 Aug 2014 14:36:23 -0700 Subject: [PATCH] add open-pdf function and enable latex preview mode at startup. --- init.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/init.el b/init.el index c91ba3ae..9f29347f 100644 --- a/init.el +++ b/init.el @@ -119,6 +119,9 @@ Return a list of installed packages or nil for every package not installed." (add-hook 'after-init-hook '(lambda () (setq debug-on-error t))) +(latex-preview-pane-enable) +;; (add-hook 'latex-mode-hook (lambda () (global-set-key (kbd "M-n") )) + ;; ============================================================================= ;; Misc ;; ============================================================================= @@ -145,6 +148,11 @@ Return a list of installed packages or nil for every package not installed." (tmux-copy 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 ;; ============================================================================= @@ -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") -(setq skeleton-pair nil) ;; This stuff sucks. - ;; ============================================================================= ;; Custom Key Bindings ;; =============================================================================