forked from colonelpanic/dotfiles
Add
This commit is contained in:
parent
5759aa7ec6
commit
5d386c4b76
20
init.el
20
init.el
@ -173,7 +173,8 @@ buffer is not visiting a file."
|
|||||||
|
|
||||||
(defun open-pdf ()
|
(defun open-pdf ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ( (pdf-file (replace-regexp-in-string "\.tex$" ".pdf" buffer-file-name)))
|
(let ( (pdf-file (replace-regexp-in-string
|
||||||
|
"\.tex$" ".pdf" buffer-file-name)))
|
||||||
(shell-command (concat "open " pdf-file))))
|
(shell-command (concat "open " pdf-file))))
|
||||||
|
|
||||||
(defun tmux-copy (&optional b e)
|
(defun tmux-copy (&optional b e)
|
||||||
@ -190,7 +191,9 @@ buffer is not visiting a file."
|
|||||||
(insert (current-kill 0)))))
|
(insert (current-kill 0)))))
|
||||||
|
|
||||||
(defun flatten-imenu-index (index)
|
(defun flatten-imenu-index (index)
|
||||||
(cl-mapcan (lambda (x) (if (listp (cdr x))
|
(cl-mapcan
|
||||||
|
(lambda (x)
|
||||||
|
(if (listp (cdr x))
|
||||||
(cl-mapcar (lambda (item)
|
(cl-mapcar (lambda (item)
|
||||||
`(,(concat (car x) "/" (car item)) . ,(cdr item)))
|
`(,(concat (car x) "/" (car item)) . ,(cdr item)))
|
||||||
(flatten-imenu-index (cdr x)))
|
(flatten-imenu-index (cdr x)))
|
||||||
@ -200,7 +203,8 @@ buffer is not visiting a file."
|
|||||||
(lambda () (flatten-imenu-index (funcall function))))
|
(lambda () (flatten-imenu-index (funcall function))))
|
||||||
|
|
||||||
(defun flatten-current-imenu-index-function ()
|
(defun flatten-current-imenu-index-function ()
|
||||||
(setq imenu-create-index-function (flatten-imenu-index-function imenu-create-index-function)))
|
(setq imenu-create-index-function
|
||||||
|
(flatten-imenu-index-function imenu-create-index-function)))
|
||||||
|
|
||||||
;; =============================================================================
|
;; =============================================================================
|
||||||
;; General Emacs Options
|
;; General Emacs Options
|
||||||
@ -350,12 +354,14 @@ buffer is not visiting a file."
|
|||||||
(use-package org
|
(use-package org
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:init
|
||||||
|
(progn
|
||||||
(defun guide-key/my-hook-function-for-org-mode ()
|
(defun guide-key/my-hook-function-for-org-mode ()
|
||||||
(guide-key/add-local-guide-key-sequence "C-c")
|
(guide-key/add-local-guide-key-sequence "C-c")
|
||||||
(guide-key/add-local-guide-key-sequence "C-c C-x")
|
(guide-key/add-local-guide-key-sequence "C-c C-x")
|
||||||
(guide-key/add-local-highlight-command-regexp "org-"))
|
(guide-key/add-local-highlight-command-regexp "org-"))
|
||||||
(add-hook 'org-mode-hook 'guide-key/my-hook-function-for-org-mode)
|
(add-hook 'org-mode-hook 'guide-key/my-hook-function-for-org-mode)
|
||||||
(add-hook 'org-mode-hook (lambda () (linum-mode 0))))
|
(add-hook 'org-mode-hook (lambda () (linum-mode 0)))
|
||||||
|
(define-key mode-specific-map [?a] 'org-agenda)))
|
||||||
|
|
||||||
(use-package epg
|
(use-package epg
|
||||||
:ensure t
|
:ensure t
|
||||||
@ -421,6 +427,7 @@ buffer is not visiting a file."
|
|||||||
(progn (helm-projectile-on)))))
|
(progn (helm-projectile-on)))))
|
||||||
|
|
||||||
(ido-mode t)
|
(ido-mode t)
|
||||||
|
(ido-ubiquitous-mode)
|
||||||
(ido-everywhere 1)
|
(ido-everywhere 1)
|
||||||
(setq ido-enable-flex-matching t)
|
(setq ido-enable-flex-matching t)
|
||||||
|
|
||||||
@ -443,7 +450,10 @@ buffer is not visiting a file."
|
|||||||
(setq imenu-prev-index-position-function nil)
|
(setq imenu-prev-index-position-function nil)
|
||||||
(setq imenu-space-replacement nil)
|
(setq imenu-space-replacement nil)
|
||||||
(add-to-list 'imenu-generic-expression
|
(add-to-list 'imenu-generic-expression
|
||||||
`("Sections"
|
`("Package"
|
||||||
|
,"(use-package \\(.+\\)$" 1))
|
||||||
|
(add-to-list 'imenu-generic-expression
|
||||||
|
`("Section"
|
||||||
,(concat ";\\{1,4\\} =\\{10,80\\}\n;\\{1,4\\} \\{10,80\\}"
|
,(concat ";\\{1,4\\} =\\{10,80\\}\n;\\{1,4\\} \\{10,80\\}"
|
||||||
"\\(.+\\)$") 1) t))
|
"\\(.+\\)$") 1) t))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user