Dernière modification majeure (modifications mineures suivantes)
Résumé : Use code markup for key sequences.
Modifié(e) :
< markdown-mode version 1.9 was released on January 25, 2013. Release notes can be found here:
< http://jblevins.org/projects/markdown-mode/rev-1-9
à
> markdown-mode version 2.0 was released on March 24, 2013. Release notes can be found here:
> http://jblevins.org/projects/markdown-mode/rev-2-0
Modifié(e) :
< It should be noted that in practice this thing is not too usable, because
< * for a file > 500 lines in size it gets rather slow (in Aquamacs-current, based on GNU Emacs 23.3.50.1)
< * completion with Meta-/ is broken (inserts a new line)
< * syntax highlithing is broken in several places (especially for pre-formatted text)
< * and so on
< Except for some help with indentation there is no markdown-specific stuff here
< * no way to change header level
< * no section navigation
< * no shortcuts for reordering list items
< There are some shortcuts to insert markdown elements, but as a rule they are longer than corresponding
< elements themselves (e.g. "shortcut" 'Ctrl-C Ctr-S C' to insert a pair of backticks).
< Sadly this is the only mode for markdown editing I've found yet. For now I'd use text mode for short projects
< or excellent org-mode (with markdown export) for long ones.
à
> Useful markdown-specific editing features:
> * Change heading level by re-issuing a heading insertion command when the point is at a heading (e.g., C-c C-t 4 will replace the current heading with a level-four heading).
> * Section navigation via outline-minor-mode using the same keybindings as in org-mode (C-c C-f, C-c C-b, C-c C-u, C-c C-p, and C-c C-n).
> * Reorder list items with M-UP and M-DOWN.
markdown-mode is a major mode for GNU Emacs which provides syntax highlighting and supporting commands for editing Markdown files. It provides keybindings and commands for inserting Markdown elements and to assist in calling Markdown to parse the source code or preview the document in a browser. It also, optionally, provides syntax highlighting for wiki links and embedded itex mathematical expressions.
http://jblevins.org/projects/markdown-mode/
markdown-mode version 2.0 was released on March 24, 2013. Release notes can be found here:
http://jblevins.org/projects/markdown-mode/rev-2-0
It can be useful to enforce certain static constraints on Markdown files; for example, the heavy use of brackets and parentheses in link syntax mean it is easy to omit a closing parentheses, especially if one is linking something inside a natural language digression (where one will have 2 or more closing parentheses). Balance can be checked with 'check-parens', and it can be automatically invoked after file saves with the usual hooks, eg.
(add-hook 'markdown-mode-hook
(lambda ()
(when buffer-file-name
(add-hook 'after-save-hook
'check-parens
nil t))))A similar logic applies to double-quotes, especially if one is frequently adding tooltips to links. ‘check-parens’ works off the buffer syntax table, and double-quotes are not special to markdown-mode, so one must do a more invasive hook:
; warning, may yield wrong results in edge-cases like single double-quotes in code block.
; Use only if your files usually are balanced w/r/t double-quotes
; <http://stackoverflow.com/questions/9527593/customizing-check-parens-to-check-double-quotes>
(add-hook 'markdown-mode-hook (lambda () (modify-syntax-entry ?\" "\"" markdown-mode-syntax-table)))Useful markdown-specific editing features:
‘C-c C--’ or `C-c C-=’ or by re-issuing a heading insertion command when the point is at a heading (e.g., ‘C-c C-t 4’ will replace the current heading with a level-four heading).‘C-c C-f’, ‘C-c C-b’, ‘C-c C-u’, ‘C-c C-p’, and ‘C-c C-n’).