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 ()
|
||||
(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))))
|
||||
|
||||
(defun tmux-copy (&optional b e)
|
||||
@ -190,7 +191,9 @@ buffer is not visiting a file."
|
||||
(insert (current-kill 0)))))
|
||||
|
||||
(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)
|
||||
`(,(concat (car x) "/" (car item)) . ,(cdr item)))
|
||||
(flatten-imenu-index (cdr x)))
|
||||
@ -200,7 +203,8 @@ buffer is not visiting a file."
|
||||
(lambda () (flatten-imenu-index (funcall 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
|
||||
@ -350,12 +354,14 @@ buffer is not visiting a file."
|
||||
(use-package org
|
||||
:ensure t
|
||||
:init
|
||||
(progn
|
||||
(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 C-x")
|
||||
(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 (lambda () (linum-mode 0))))
|
||||
(add-hook 'org-mode-hook (lambda () (linum-mode 0)))
|
||||
(define-key mode-specific-map [?a] 'org-agenda)))
|
||||
|
||||
(use-package epg
|
||||
:ensure t
|
||||
@ -421,6 +427,7 @@ buffer is not visiting a file."
|
||||
(progn (helm-projectile-on)))))
|
||||
|
||||
(ido-mode t)
|
||||
(ido-ubiquitous-mode)
|
||||
(ido-everywhere 1)
|
||||
(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-space-replacement nil)
|
||||
(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\\}"
|
||||
"\\(.+\\)$") 1) t))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user