General refactor

This commit is contained in:
Henrik Lissner 2016-05-06 01:57:50 -04:00
parent 2538de1a92
commit 601b422943
3 changed files with 15 additions and 13 deletions

View file

@ -34,10 +34,10 @@ provided."
(let ((dir (f-dirname path))
(fullpath (f-full path))
(is-auto t))
(when (and bang (not (file-exists-p dir)))
(f-mkdir dir))
(if (file-exists-p dir)
(if (file-exists-p fullpath)
(when (and bang (not (f-exists? dir)))
(mkdir dir))
(if (f-exists? dir)
(if (f-exists? fullpath)
(error "File already exists: %s" path)
(find-file fullpath)
(add-hook 'yas-after-exit-snippet-hook 'narf--save-exit)

View file

@ -7,6 +7,12 @@
(narf|nlinum-disable)
(narf|nlinum-enable)))
;;;###autoload
(defun narf|nlinum-enable ()
(nlinum-mode +1)
(add-hook 'post-command-hook 'narf|nlinum-hl-line nil t)
(narf|nlinum-unhl-line))
;;;###autoload
(defun narf|nlinum-disable ()
(nlinum-mode -1)