markdown-mode icon indicating copy to clipboard operation
markdown-mode copied to clipboard

Complete local files for links and urls

Open jo-so opened this issue 4 years ago • 4 comments

Expected Behavior

Helpful would be, if I could press TAB on the URL prompt of URLs and I would get a suggestion of local files. I'm editing my website with markdown and linking to other pages or images would be much easier with tab completion.

Actual Behavior

Actually, I don't use the helper functions, but type ![TEXT]() and call my helper function to insert a filename.

Software Versions

  • Markdown Mode: 2.5-dev
  • Emacs: GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20) of 2020-05-17, modified by Debian
  • OS: Debian

jo-so avatar Jun 28 '20 12:06 jo-so

company-mode supports file completion. Please check it. You can also use hippie-expand for file completion instead, hippie-expand is a built-in package.

syohex avatar Jun 29 '20 00:06 syohex

I think that a helper function like C-c C-i to local paths would be helpful as well. It seems that company-files doesn't complete paths when it's between parenthesis.

jjnilton avatar Mar 27 '22 00:03 jjnilton

Pinging this issue as org-mode supports this directly in the link dialog (markdown-mode seems suggests only files, not directories in pwd)

cxandru avatar Nov 02 '22 10:11 cxandru

Would love to see this as well. Currently it's a bit of an awkward dance by first inserting the path, coping it and then pasting it into the prompt.

Nebucatnetzer avatar Mar 07 '23 16:03 Nebucatnetzer