Commit Graph

92 Commits

Author SHA1 Message Date
Greg Anders
f35c43c535 Update [[ and ]] mappings
1. Add support for setext style headings
2. Use the 's' flag in search() to set the ' mark instead of using m'
3. Fix the guard
2020-02-01 11:47:08 -05:00
Tim Pope
6c4c60fbaa Also don't let HTML and dependent syntaxes change 'foldmethod'
References https://github.com/tpope/vim-markdown/issues/154
2020-01-30 12:56:09 -05:00
Tim Pope
719b046bbe Don't let fenced language syntaxes change 'foldmethod'
Closes https://github.com/tpope/vim-markdown/issues/154
2020-01-30 12:45:09 -05:00
Tim Pope
191438f358 Add [[ and ]] maps
Hat tip to Joe Reynolds for the idea.
2020-01-30 11:57:41 -05:00
Tim Pope
4e25b2f606 Vim 8.2.0141 2020-01-30 11:50:49 -05:00
Tim Pope
e875717243 Fix closing italics
Closes https://github.com/tpope/vim-markdown/issues/151
2019-12-12 13:55:26 -05:00
Tim Pope
a273e6d1f3 Vim 8.2 vim8.2 2019-12-12 13:54:51 -05:00
Tim Pope
9c2133fef0 Skip escaped bold/italics closer
Closes https://github.com/tpope/vim-markdown/issues/102
2019-12-02 08:47:20 -05:00
Igor Mikushkin
8a76c845de Github flavored parsing of underscores 2019-12-01 07:42:25 -05:00
Tim Pope
1a436852ac Clean up folding code 2019-12-01 04:27:35 -05:00
Tim Pope
06a62df8a5 Restrict HTML highlighting when nesting
Closes https://github.com/tpope/vim-markdown/issues/148
2019-11-23 16:02:45 -05:00
Tim Pope
a6866ac0aa Add sponsor button 2019-11-12 19:30:03 -05:00
Tim Pope
5363a4d803 Allow one level of nested brackets
Closes https://github.com/tpope/vim-markdown/issues/129
2019-10-23 03:03:09 -04:00
Greg Anders
64689dfeae Support pandoc syntax for fenced code blocks 2019-10-10 18:10:49 -04:00
Alex Vear
a2e123a288 Prevent the folding of heading syntax in code fences
Previously in Markdown files, Vim would treat heading syntax in code
fences as Markdown headers. This commit ensures that only headers will
be folded by checking the 'synIDattr' of the item.

E.g. The comment in this code snippet would have been treated as a
Markdown header.

```sh
 # This is a comment
 echo "Hello world"
```
2019-08-15 18:53:44 -04:00
Thomas Faingnaert
c043a93c84 Conceal code blocks 2019-07-28 19:37:25 -04:00
David Palma
fd3f4831be Fix for slowness due to folds (#143) 2019-07-24 16:59:55 -04:00
Daniel M. Capella
57c58269a2 readme: Upstream matches *.md to Markdown
Introduced in late 2014:
7d76c804af (diff-44a099e40ae628aef90a28c6408a4c61R1154)
2019-03-12 23:54:34 -04:00
Florian Heiderich
e2d7fcd682 add .mdwn file extension 2018-02-04 23:47:43 -05:00
Alex Griffin
8cd41796fd Separate highlight groups for each heading level
Closes tpope#123.
2017-10-17 20:30:01 -04:00
Tim Pope
a7dbc31456 Three or more backticks, not two or more 2017-05-08 11:37:43 -04:00
Tim Pope
44822aa3c6 Allow fenced language names to contain punctuation
Closes https://github.com/tpope/vim-markdown/issues/116
2017-05-08 11:36:12 -04:00
Ian Edington
1e6798717a Added markdown foldtext function
Addresses an issue metioned in tpope/vim-markdown#10 of adding a
foldtext function.

- Displays == and -- headers as # and ##
- Use markdown header style instead of '+--' to show nesting

Given the example of

    This is Header One
    ==================
    This is Header Two
    -----------------
    ### This is Header Three
    This is a normal line

Instead of:

    +--  6 lines: This is Header One-----------------------------
    +---  4 lines: This is Header Two----------------------------
    +----  2 lines: ### This is Header Three---------------------

You get:

    # This is Header One [6 lines]-------------------------------
    ## This is Header Two [4 lines]------------------------------
    ### This is Header Three [2 lines]----------------------------
2017-05-01 15:03:38 -04:00
Linda_pp
0b92a7d4cb Customizable minlines with g:markdown_minlines (#115) 2017-04-11 23:06:07 -04:00
Addison Bean
3c2215bfed Fix spell check on bold and italic text (#101)
Closes #100.
2016-07-01 17:15:47 -04:00
Rob Hurring
5c21f16771 Allow toggling of syntax concealing (#99)
Add `let g:markdown_syntax_conceal = 0` to your vimrc
2016-05-08 19:57:37 -04:00
Tim Pope
4260faa48f Merge pull request #95 from sbdchd/master
changed markdown comment string to use html style comment
2016-03-05 16:44:22 -05:00
Steve Dignam
0df8de0b50 change markdown comment string to use html style comment 2016-03-05 14:18:01 -05:00
Tim Pope
ee550a7b2b Merge pull request #92 from tyru/fix-e403-error
Avoid E403 error on :syn-include
2016-01-22 14:38:11 -05:00
tyru
63074a52ad Avoid E403 error on :syn-include
Example .vimrc:

        let g:markdown_fenced_languages = ['vim', 'viml=vim']
        syntax on

causes

        "/tmp/test.mkd" 6L, 98C
        Error detected while processing /usr/share/vim/vim74/syntax/vim.vim:
        line  777:
        E403: syntax sync: line continuations pattern specified twice
        E403: syntax sync: line continuations pattern specified twice

Example "test.mkd" file:

        ```vim
        echo 'hi'
        ```
2016-01-23 02:09:00 +09:00
Tim Pope
de42c8a325 Merge pull request #88 from afc163/patch-1
Support more backtick
2015-12-28 14:14:52 -05:00
afc163
b938671300 Support more backtick
like

````
code
````
2015-12-04 16:02:12 +08:00
Tim Pope
15d19778a3 Merge pull request #84 from larryhynes/patch-1
Add note on fenced code block highlighting to README.md
2015-10-12 19:38:50 -04:00
larryhynes
64e5a2f200 Fix wrap on note on fenced code blocks in README.md 2015-10-13 00:17:19 +01:00
larryhynes
e8a6e373f2 Add note on fenced code block highlighting to README.md 2015-10-12 23:31:06 +01:00
Tim Pope
6eac9ffb58 Revert "Improve fenced code block matching"
This reverts commit aff85c6411.

Closes https://github.com/tpope/vim-markdown/issues/83
2015-10-12 13:53:26 -04:00
Tim Pope
578647a9de Merge pull request #82 from kevinoid/fence-matching
Improve fenced code block matching for Kramdown/CommonMark
2015-10-05 15:43:42 -04:00
Kevin Locke
aff85c6411 Improve fenced code block matching
The previous fenced code block matching did not support the syntax used
by [Kramdown][1] or fully support the syntax described in
[CommonMark][2].  The differences are:

* Kramdown requires \~ instead of \` in fences (CommonMark permits \~)
* Both permit code fences to have more than 3 \~ or \` characters
* Both require the closing fence to have as many chars as the opening
* Both permit the closing fence to have extra fence chars
* CommonMark explicitly forbids \` in the fence info string

This is likely the case with other Markdown variants, but these are the
only two that I have considered when authoring this commit.

This commit implements all of the above mentioned changes.  The change
is mostly straight-forward.  The only exception is that the end matching
is a little subtle since one of `\z2` and `\z3` will be empty, using the
more natural expression `\z2*\|\z3*` can hang the regex matcher.  The
`\%(\z2\z3)*` expression is a bit less obvious but works reliably.

Note that I did not include any changes relating to the Pandoc syntax
mentioned in #65 and #74.  If this syntax is desired, I can adjust this
commit to include it.

[1]:  http://kramdown.gettalong.org/syntax.html#fenced-code-blocks
[2]:  http://spec.commonmark.org/0.22/#code-fence

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2015-10-02 22:12:34 -07:00
Tim Pope
ba294150d1 Merge pull request #78 from allenbh/master
Add escape support for angle braces
2015-07-18 00:27:58 -04:00
Allen Hubbe
188d816314 Add escape support for angle braces 2015-07-17 23:49:00 -04:00
Tim Pope
409c37b205 Conceal bold and italic markers
References #9.
2014-07-11 13:35:48 -04:00
Tim Pope
cd81c2f209 Merge pull request #67 from sencer/master
Improve footnotes
2014-06-19 18:58:45 -04:00
Sencer Selcuk
14977fb9df Indent the footnotes also. 2014-06-19 18:09:10 -04:00
Sencer Selcuk
cb2b885214 Footnote doesn't have to be at the line end. 2014-06-19 17:30:13 -04:00
Sencer Selcuk
db5c79f7c0 Allow multi-char footnote labels. 2014-06-19 17:13:36 -04:00
Tim Pope
b3cea72eea Add a README
Closes #66.
2014-05-04 17:22:12 -04:00
Emil Loer
b02182ebbd Add folding support
Closes #10.
2014-03-19 01:07:38 -04:00
Tim Pope
355c8e9bb5 Merge pull request #62 from myitcv/footnote_support
Footnote support
2014-02-24 12:11:09 -05:00
Paul Jolly
ede001b33d Footnote support 2014-02-24 13:10:20 +00:00
Tim Pope
61deff1362 Allow link nesting
Closes #58.
2014-01-01 11:48:03 -05:00