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)
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 ...
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.
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).
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 ...
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:
Git uses .git/COMMIT_EDITMSG as the temporary file for the commit message. Since Emacs will be prompted to edit it by git, you can associate that file with markdown-mode by adding something like
(add-to-list 'auto-mode-alist '("COMMIT_EDITMSG" . markdown-mode))
to your init file.
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.
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 ...
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'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 ...
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-...
I've been looking into this as well. The reason your attempt isn't working, is because of evil and the way it binds keys to a higher level keymap (as far as I understand the matter).
Anyways, you can bind directly to the corresponding evil state you want to use the key in.
The following should do the trick:
(evil-define-key 'normal markdown-mode-map
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.
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 ...
If you want to use C-c C-t for checkbox-toggle in markdown-mode then you could bind it to that key in markdown-mode-map. But that will prevent it acting as a prefix key...
(Why don't you just bind it to some other, unused key?)
Since my comment fixed the problem, I'm posting it as an answer here.
It seems that you don't have any executable called markdown in your PATH. Installing daringfireball.net/projects/markdown (preferably from some package manager like homebrew) should fix it.
After reading Window Choice in the emacs documentation, I was able to get the desired behaviour by setting split-height-threshold to nil. I added this to my .emacs file:
(setq split-height-threshold nil)
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. ...
I made a new command for your request, the idea is:
when the point is outside a list, just insert a newline as usual
when the point is inside a list
if the current list is empty, delete it and insert a newline
otherwise, insert a new list item
(defun markdown-enter-key-dwim ()
(require 'subr-x) ; Needs Emacs 24.4