Clean up
This commit is contained in:
parent
7c37162d9b
commit
6049bee001
9 changed files with 32 additions and 32 deletions
|
@ -55,9 +55,9 @@
|
|||
("\\.md$" "__" markdown-mode)
|
||||
|
||||
;; Org
|
||||
(,(format "%s.+\\.org$" org-directory-contacts) "__contact.org" org-mode)
|
||||
(,(format "%s.+\\.org$" org-directory-projects) "__projects.org" org-mode)
|
||||
(,(format "%s.+\\.org$" org-directory-invoices) "__invoices.org" org-mode)
|
||||
(,(format "%s.+\\.org$" (f-relative org-directory-contacts org-directory)) "__contact.org" org-mode)
|
||||
(,(format "%s.+\\.org$" (f-relative org-directory-projects org-directory)) "__projects.org" org-mode)
|
||||
(,(format "%s.+\\.org$" (f-relative org-directory-invoices org-directory)) "__invoices.org" org-mode)
|
||||
|
||||
;; PHP
|
||||
("\\.class\\.php$" "__.class.php" php-mode)
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
tab-width 4
|
||||
require-final-newline t
|
||||
delete-trailing-lines nil
|
||||
fill-column 80
|
||||
fill-column 90
|
||||
line-spacing 0
|
||||
word-wrap t
|
||||
truncate-lines t
|
||||
truncate-partial-width-windows 50
|
||||
line-spacing 0
|
||||
|
||||
;; Sane scroll settings
|
||||
scroll-margin 0
|
||||
|
@ -66,20 +66,18 @@ enable multiple minor modes for the same regexp.")
|
|||
|
||||
;; Modes 'n hooks ;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(associate! sh-mode :match "/\\.?z\\(profile\\|login\\|logout\\|shrc\\|shenv\\)?$")
|
||||
(associate! sh-mode :match "/\\.?zsh/")
|
||||
(associate! sh-mode :match "/\\.?z\\(sh/?\\|profile\\|login\\|logout\\|shrc\\|shenv\\)$")
|
||||
(associate! applescript-mode :match "\\.applescript$")
|
||||
(associate! emacs-lisp-mode :match "Cask$")
|
||||
(associate! emacs-lisp-mode :match "\\.el\\.gz$")
|
||||
(associate! emacs-lisp-mode :match "\\(/Cask\\|\\.\\(el\\|gz\\)\\)$")
|
||||
(associate! makefile-gmake-mode :match "/Makefile$")
|
||||
(associate! nxml-mode :match "\\.plist$")
|
||||
|
||||
(add-hook! help-mode 'visual-line-mode)
|
||||
(add-hook! python-mode 'electric-indent-local-mode)
|
||||
(add-hook! makefile-mode 'narf|enable-tabs) ; Use normal tabs in makefiles
|
||||
(add-hook! before-save 'delete-trailing-whitespace)
|
||||
(add-hook! prog-mode 'narf|enable-comment-hard-wrap)
|
||||
(add-hook! special-mode (setq truncate-lines nil))
|
||||
(add-hook! before-save 'delete-trailing-whitespace)
|
||||
(add-hook! python-mode 'electric-indent-local-mode)
|
||||
(add-hook! change-major-mode-hook
|
||||
(when indent-tabs-mode (whitespace-mode +1)))
|
||||
|
||||
|
|
|
@ -51,12 +51,6 @@
|
|||
|
||||
(evil-define-key 'normal evil-command-window-mode-map [escape] 'kill-buffer-and-window)
|
||||
|
||||
;; Monkey-patch an error triggered randomly during column-selection; is caused
|
||||
;; by `evil-move-to-column' receiving a float.
|
||||
(defun narf*evil-move-to-column-fix (args)
|
||||
(mapcar (lambda (i) (if (numberp i) (truncate i) i)) args))
|
||||
(advice-add 'evil-move-to-column :filter-args 'narf*evil-move-to-column-fix)
|
||||
|
||||
;; modes to map to different default states
|
||||
(dolist (mode-map '((cider-repl-mode . emacs)
|
||||
(comint-mode . emacs)
|
||||
|
@ -92,11 +86,11 @@
|
|||
(narf-minibuffer-quit)))
|
||||
|
||||
;; Monkey-patch an error triggered randomly during column-selection caused
|
||||
;; by `extract-rectangle-line' receiving a float:
|
||||
;; by `evil-move-to-column' receiving a float:
|
||||
;; evil-move-to-column: Wrong type argument: wholenump, 12.0
|
||||
(defun narf*evil-extract-rectangle-line-fix (args)
|
||||
(defun narf*evil-move-to-column-fix (args)
|
||||
(mapcar (lambda (i) (if (numberp i) (truncate i) i)) args))
|
||||
(advice-add 'extract-rectangle-line :filter-args 'narf*evil-extract-rectangle-line-fix)
|
||||
(advice-add 'evil-move-to-column :filter-args 'narf*evil-move-to-column-fix)
|
||||
|
||||
;; buffer-local ex commands, thanks to:
|
||||
;; http://emacs.stackexchange.com/questions/13186
|
||||
|
|
|
@ -7,16 +7,14 @@
|
|||
(mapc (lambda (rule) (push rule popwin:special-display-config))
|
||||
'(("*Help*" :position bottom :height 0.25 :stick t)
|
||||
(debugger-mode :position bottom :height 15)
|
||||
(org-src-mode :position bottom :height 0.5 :stick t)
|
||||
(org-agenda-mode :position bottom :height 0.4 :stick t)
|
||||
("*evil-registers*" :position bottom :height 0.3 :stick t)
|
||||
("*scratch*" :position bottom :height 20 :stick t)
|
||||
("*Apropos*" :position bottom :height 40 :stick t)
|
||||
("*Backtrace*" :position bottom :height 15 :stick t)
|
||||
("^\\*CPU-Profiler-Report .+\\*$" :regexp t :position bottom :height 0.35)
|
||||
("*Flycheck errors*" :position bottom :height 15 :stick t)
|
||||
("*quickrun*" :position bottom :height 15 :stick t)
|
||||
("*minor-modes*" :position bottom :height 0.5 :stick t)
|
||||
("^\\*CPU-Profiler-Report .+\\*$" :regexp t :position bottom :height 0.35)
|
||||
|
||||
;; vcs
|
||||
("\\*git-gutter.+\\*" :regexp t :position bottom :height 30 :stick t)
|
||||
|
@ -27,6 +25,8 @@
|
|||
("*helm-mode-ffap*" :position bottom :height 10)
|
||||
|
||||
;; Org
|
||||
(org-src-mode :position bottom :height 0.5 :stick t)
|
||||
(org-agenda-mode :position bottom :height 0.4 :stick t)
|
||||
("^\\*Org-Babel.*\\*$" :regexp t :position bottom :height 15 :tail t)
|
||||
("*Agenda Commands*" :position bottom :height 0.5)
|
||||
(" *Org todo*" :position bottom :height 5)
|
||||
|
|
|
@ -173,7 +173,7 @@
|
|||
(narf|nlinum-unhl-line))
|
||||
|
||||
(add-hook!
|
||||
(markdown-mode prog-mode scss-mode web-mode)
|
||||
(markdown-mode prog-mode scss-mode web-mode conf-mode)
|
||||
'narf|nlinum-enable)
|
||||
:config
|
||||
(defun narf|nlinum-unhl-line ()
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
(use-package gitconfig-mode
|
||||
:mode ("/\\.?git/?config$" "/\\.gitmodules$")
|
||||
:init (add-hook 'gitconfig-mode-hook 'flyspell-mode))
|
||||
:init (add-hook! gitconfig-mode 'flyspell-mode))
|
||||
|
||||
(use-package gitignore-mode
|
||||
:mode ("/\\.gitignore$"
|
||||
|
|
|
@ -69,10 +69,15 @@
|
|||
(if bang (helm-multi-swoop-all search) (helm-swoop :$query search)))
|
||||
|
||||
;;;###autoload
|
||||
(defun narf/helm-projectile-in-emacsd ()
|
||||
(defun narf/helm-find-in-emacsd ()
|
||||
(interactive)
|
||||
(in! narf-emacs-dir (helm-projectile-find-file)))
|
||||
|
||||
;;;###autoload
|
||||
(defun narf/helm-find-in-dotfiles ()
|
||||
(interactive)
|
||||
(in! (expand-file-name ".dotfiles" "~") (helm-projectile-find-file)))
|
||||
|
||||
;;;###autoload
|
||||
(defun narf/helm-buffers-dwim (&optional all-p)
|
||||
"Displays open buffers in current project. If ALL-P, then show all open
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
;;; module-writing.el
|
||||
|
||||
;; From <https://github.com/joostkremers/visual-fill-column/pull/6>
|
||||
(advice-add 'split-window :around #'visual-fill-column--disable-on-split-window)
|
||||
(after! visual-fill-column
|
||||
(advice-add 'split-window :around #'visual-fill-column--disable-on-split-window))
|
||||
(defun visual-fill-column--disable-on-split-window (fn window &rest args)
|
||||
"Undo the effects of `visual-fill-column-mode' for splitting window."
|
||||
(if (and (or (not window) (window-live-p window))
|
||||
|
@ -61,6 +62,7 @@
|
|||
(add-hook! latex-mode 'turn-on-auto-fill)
|
||||
(add-hook! LaTeX-mode 'turn-on-auto-fill)
|
||||
|
||||
(defvar biblio-directory (concat narf-dropbox-dir "docs/biblio/") "docstring")
|
||||
(use-package reftex
|
||||
:config
|
||||
(add-hook 'latex-mode-hook 'turn-on-reftex)
|
||||
|
@ -75,7 +77,6 @@
|
|||
|
||||
;; NOTE: http://bibdesk.sourceforge.net/
|
||||
|
||||
(defvar biblio-directory (concat narf-dropbox-dir "docs/biblio/") "docstring")
|
||||
(use-package helm-bibtex
|
||||
:defer t
|
||||
:config
|
||||
|
|
|
@ -106,7 +106,6 @@
|
|||
:nv ":" 'helm-imenu-in-all-buffers
|
||||
:nv "]" 'helm-etags-select
|
||||
:nv "a" 'helm-projectile-find-other-file
|
||||
:nv "E" 'narf/helm-projectile-in-emacsd
|
||||
:nv "m" 'helm-recentf
|
||||
:nv "M" 'helm-projectile-recentf ; recent PROJECT files
|
||||
:nv "P" 'helm-projectile-switch-project
|
||||
|
@ -131,6 +130,9 @@
|
|||
:nv "qq" 'evil-save-and-quit
|
||||
:nv "QQ" 'narf/kill-all-buffers-do-not-remember
|
||||
|
||||
:nv "E" 'narf/helm-find-in-emacsd
|
||||
:nv "\\" 'narf/helm-find-in-dotfiles
|
||||
|
||||
;; Tmux
|
||||
(:prefix "t"
|
||||
:n "." 'narf/tmux-cd-to-here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue