Add functions+shortcuts to insert the filename into the buffer.
This commit is contained in:
@ -125,5 +125,15 @@ If PROJECT is not specified, assume current project root."
|
||||
"Check if font with FONT-NAME is available."
|
||||
(find-font (font-spec :name font-name)))
|
||||
|
||||
(defun insert-full-filename ()
|
||||
"Insert the full path file name into the current buffer."
|
||||
(interactive)
|
||||
(insert (buffer-file-name)))
|
||||
|
||||
(defun insert-filename-only ()
|
||||
"Insert the filename (without path) into the current buffer."
|
||||
(interactive)
|
||||
(insert (file-name-nondirectory (buffer-file-name))))
|
||||
|
||||
(provide 'init-functions)
|
||||
;;; init-functions.el ends here.
|
||||
|
Reference in New Issue
Block a user