Add a function to insert wikilinks

This commit is contained in:
Andreas Zweili 2022-05-26 17:09:59 +02:00
parent 52c3e6ccaf
commit 68b49d870d
1 changed files with 7 additions and 1 deletions

View File

@ -987,7 +987,13 @@ Provides syntax highlighting and other functions for markdown.
:init (setq markdown-command "multimarkdown")
:config
(setq markdown-enable-wiki-links t)
(setq markdown-link-space-sub-char " "))
(setq markdown-link-space-sub-char " ")
(defun insert-file-name-as-wikilink (filename &optional args)
(interactive "*fInsert file name: \nP")
(insert (concat "[[" (file-name-sans-extension (file-relative-name
filename)) "]]")))
(define-key markdown-mode-map (kbd "C-c i") 'insert-file-name-as-wikilink))
#+end_src
*** powershell