This isn't easy enough to find, but what you want is goto-address-mode. You can activate it in the current buffer with M-x goto-address-mode or you can add it to markdown-mode-hook:
(defun turn-on-goto-address-mode ()
(add-hook 'markdown-mode-hook #'turn-on-goto-address-mode)
If I understand the question, you are looking for a way to edit markdown files where you can show or hide sections, navigate by headings and so on.
I've never used allout-mode but it does look like you could configure it to recognize markdown syntax. However, another option is to take a look at markdown-mode which supports navigation and folding, e.g.
The accepted answer for org-mode is written by me. org-mode is tricky because its own check-word-predicate is already defined.
markdown is simpler because it uses default predicate provided by flyspell-mode,
(defun flyspell-generic-textmode-verify ()
"Used for `flyspell-generic-check-word-predicate' in text modes."
;; (point) is next char after the ...
markdown-follow-thing-at-point (C-c C-o) and also markdown-follow-link-at-point will follow links. If you have a link like [filelink](/path/to/file.md) then calling one of the above functions while cursor is on the markdown link will take you to the file.
I wouldn't use align-regexp but the wonderful orgtbl-mode for this: if you enable this minor mode, it will automatically recognize the table, and change its size as needed (use tab to move around in the table).
What I've found so far is this.
The "simplest" way is, as described in this stackoverflow answer and this gist, and as hinted by @Constantine in a comment, is to create a converter function and then use it.
I went a tad further in laziness (this might already exist somewhere, but hey, I've only got the one use case right now). So here's what I have:
I think indent-rigidly (C-x TAB or C-x C-i, see footnote) can help you.
indent-rigidly is an interactive compiled Lisp function in
It is bound to C-x TAB.
(indent-rigidly START END ARG &optional INTERACTIVE)
Indent all lines starting in the region. If called interactively with
no prefix argument, activate a transient ...
In the current development version of Markdown mode, links are now clickable without requiring any additional libraries. URLs can also be hidden, and you can hover your mouse pointer to see the URL and optional title text.
I have a quick & dirty proof of concept for markdown-mode. Idea: keep track of the current line (similar to hl-line-mode). Use a font-lock rule to remove the markup hiding for the current line (markdown-mode seems to use display and invisible text properties, so remove those). Re-fontify the local area when moving from one line to another.
Markup hiding is now part of the current development version of Markdown mode. Markup for bold, italics, links, code, etc. can be hidden and toggled interactively using C-c C-x C-m (M-x markdown-toggle-markup-hiding). You can set the default value by customizing markdown-hide-markup. Additionally, this enables nice Unicode bullet characters for lists, ...
markdown-hide-markup needs to be set before markdown mode starts, so the markdown-mode-hook probably doesn't do anything. But it's buffer-local, so I think you need to use setq-default instead of setq.
You set markdown-hide-markup to t, and then you toggle it, which might be turning it off. Not sure.
This works for me:
(use-package markdown-mode :ensure t
A markdown-minor-mode would be nice, yes. I currently have some ad-hoc code to highlight comments assuming markdown syntax for my typer-mode. It only supports a limited subset of markdown and only performs highlighting, but it shouldn't be difficult to extract it into its own markdown-minor-mode (probably easier than to try and adapt the code from markdown-...
This can be fixed by calling M-x customize-group RET markdown-faces while in Markdown mode. It opens a menu of various font face settings. Under Markdown Code Face, uncheck/delete everything and then save. This will make the code face the same as the default face.
To elaborate on theldoria's comments:
If wc-mode is a major mode then either:
((markdown-mode . ((mode . wc))))
((markdown-mode . ((eval . (wc-mode)))))
If wc-mode is a minor mode, then:
((markdown-mode . ((eval . (wc-mode 1)))))
I have assumed that markdown was an error, and have substituted markdown-mode.
Markup hiding is now part of the current development version of Markdown mode. Markup for headings, but also bold, italics, links, code, etc. can be hidden and toggled interactively using C-c C-x C-m (M-x markdown-toggle-markup-hiding). I should note that this is slightly different than what you asked in your question: even the final hash mark is hidden. ...
To debug performance problems, one approach is to use the built-in profiler:
M-x profiler-start RET RET
<reproduce the slowdown, ideally for a good 10s or so>
M-x profiler-report RET
Then browse the report (C-u RET is an important command there) to see where all that time is spent.
Seeing your profiler report, you'll probably want to file a bug ...
I've found two ways that can be useful:
enable hideshow mode (hs-minor-mode) and use the provided functions
Apparently markdown-mode inherits from outline mode (or at least the functions are available here!) so you can use functions like hide-subtree and show-subtree.
In general, the major-mode hooks run after the primary major-mode is established. Thus, you can reset the tab-width to 2 afterwards -- it happens so fast, you'll never see that it was set to 4 for a split second prior thereto.
If you really want to take complete control, you may wish to consider creating your own major-mode. In the meantime, the following ...
It depends on how exactly you are rendering the LaTeX fragments. I'm not sure if this is possible with the markdown program, but it does work with Pandoc. To use this in markdown-mode, customize markdown-command (via M-x customize-variable) to pandoc -s --mathjax. This assumes you have pandoc installed, of course. There are other options available as well; ...
Thanks to chen bin, I have added a flyspell-generic-check-word-predicate function to Markdown mode. If you're using the latest development version, or use the next release version, then you won't have to use local modifications to achieve this.
For those curious, perhaps to implement a predicate for another mode, the current function is below. It checks ...
Not an answer to the question (@DoMiNeLa10♦ already answered it perfectly), but I thought that it might be useful to point out that markdown is not the best highlighting mode for git commit messages.
There is a perfect mode for this and it is called git-commit, available on Melpa.
Adding (setq global-git-commit-mode t) to your init file will automatically ...
Your R output will be put in the file(s) produced by running knitr on your .Rmd file. IMHO, it doesn't make sense to have it inserted in the .Rmd file itself since that's 'input' not 'output'.
I don't work in org-mode (yet?), but my understanding is that when working in that mode, it's possible to have the graphics output displayed in an emacs window. See ...
You can use texfrag-mode. It can be installed from melpa.
After installation customize the variable texfrag-setup-alist by adding markdown-mode to the entry for texfrag-trac-wiki.
Afterwards you can open your markdown file and run M-x texfrag-mode RET.
Therewith you get the preview-latex menu as TeX in the menu bar.
If you always want to turn on texfrag-...