Update defuns
This commit is contained in:
parent
89c7c77c1d
commit
4a670cc1fb
5 changed files with 42 additions and 3 deletions
|
@ -15,7 +15,9 @@
|
|||
(yas--get-snippet-tables mode)))))
|
||||
(if template (yas--template-content template) nil))))
|
||||
(when (and is-yasnippet-on snippet)
|
||||
(yas-expand-snippet snippet)))))
|
||||
(yas-expand-snippet snippet)
|
||||
(when (and (featurep 'evil) evil-mode)
|
||||
(evil-initialize-state 'insert))))))
|
||||
|
||||
(provide 'defuns-auto-insert)
|
||||
;;; defuns-auto-insert.el ends here
|
||||
|
|
|
@ -28,5 +28,12 @@
|
|||
'flycheck-previous-error
|
||||
'previous-error)))
|
||||
|
||||
;;;###autoload
|
||||
(defun narf/flycheck-errors ()
|
||||
(interactive)
|
||||
(when (bound-and-true-p flycheck-mode)
|
||||
(flycheck-buffer)
|
||||
(flycheck-list-errors)))
|
||||
|
||||
(provide 'defuns-flycheck)
|
||||
;;; defuns-flycheck.el ends here
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
;;;###autoload
|
||||
(defun narf/neotree-find ()
|
||||
(interactive)
|
||||
(save-excursion (narf/neotree-open))
|
||||
(unless (neo-global--window-exists-p)
|
||||
(save-excursion (narf/neotree-open)))
|
||||
(neotree-find))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
;;;###autoload
|
||||
(defun narf/reset-theme ()
|
||||
(interactive)
|
||||
(narf/load-theme 'narf-dark))
|
||||
(narf/load-theme narf-theme))
|
||||
|
||||
;;;###autoload
|
||||
(defun narf/load-theme (theme)
|
||||
|
|
|
@ -50,6 +50,35 @@ evil-window-move-* (e.g. `evil-window-move-far-left')"
|
|||
(switch-to-buffer this-buffer))
|
||||
(select-window that-window))))
|
||||
|
||||
;;;###autoload
|
||||
(defun narf/new-buffer ()
|
||||
(interactive)
|
||||
(switch-to-buffer (generate-new-buffer "*new*")))
|
||||
|
||||
;;;###autoload
|
||||
(defun narf/new-frame ()
|
||||
(interactive)
|
||||
(let ((nlinum-p (and (featurep 'nlinum)
|
||||
(memq 'nlinum--setup-window window-configuration-change-hook))))
|
||||
;; Disable nlinum to fix elusive "invalid face linum" bug
|
||||
(remove-hook 'window-configuration-change-hook 'nlinum--setup-window t)
|
||||
(let ((frame (new-frame))
|
||||
(frame-name (format "*new-%s*" (length narf-wg-frames))))
|
||||
(with-selected-frame frame
|
||||
(wg-create-workgroup frame-name t)
|
||||
(add-to-list 'narf-wg-frames (cons frame frame-name))))
|
||||
(when nlinum-p
|
||||
(add-hook 'window-configuration-change-hook 'nlinum--setup-window nil t))))
|
||||
|
||||
;;;###autoload
|
||||
(defun narf/close-frame ()
|
||||
(interactive)
|
||||
(let ((data (assq (selected-frame) narf-wg-frames)))
|
||||
(if data
|
||||
(progn (wg-delete-workgroup (wg-get-workgroup (cdr data)))
|
||||
(delete-frame (car data)))
|
||||
(delete-frame))))
|
||||
|
||||
;;;###autoload
|
||||
(defun narf/evil-window-move-left ()
|
||||
"See `narf--evil-window-move'"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue