Every one of the projects in this repository is available at the canonical
URL git://git.madduck.net/madduck/pub/<projectpath> — see
each project's metadata for the exact URL.
All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
Shane Pearman [Fri, 30 Jun 2017 00:19:54 +0000 (17:19 -0700)]
Change mkdRule match syntax to be more liberal
Consider any line beginning with 3 or more of '*', '-', or '_' with
possible spaces before and between, possibly followed by zero or more of
the previously matched symbols or spaces to be a horizontal rule.
memeplex [Sat, 25 Feb 2017 19:33:28 +0000 (16:33 -0300)]
Allow local anchors and improve buffer filename.
Now urls of the form #anchor works (by searching the -transformed-
anchor in the current buffer).
I've fixed the new buffer file naming code in two senses (and note that
both are unrelated to named anchors, but since the problem it's in the
same part of the code I decided to include the fix here):
1. The previous code only expanded the filename relative to the current
file when vim_markdown_no_extensions_in_markdown was set, but
concatenation of .md is unrelated to filename expansion.
2. The previous code was expanding relative to the home dir (:~) then
making the path absolute (:p), which made not much sense and also
produced long, absolute, buffer names. Now the full path is computed
relative to the current file but the buffer is named relative to the
current working directory (:.).
memeplex [Wed, 22 Feb 2017 16:52:36 +0000 (13:52 -0300)]
Follow named anchors with ge
This commit allows ge to follow named anchors in links of the form
file#anchor, where file may omit the .md extension as usual.
Two global variables control the operation of this feature:
vim_markdown_follow_anchor: a flag that tells vim-markdown whether
to attempt to follow a named anchor in a link or not. When this is
1, and only if a link can be split in exactly two parts by the
pattern '#', then the first part is interpreted as the file and the
second one as the named anchor. After the file is opened, the anchor
will be searched.
vim_markdown_anchorexpr: if available this expression will be
evaluated substituting v:anchor with a quoted string that contains
the anchor to visit. The result of the evaluation will become the
real anchor to search in the target file. This is useful in order to
convert anchors of the form my-section-title to searches of the form
My Section Title. It needs to be generic since every markdown
renderer follows its own conventions to generate "auto-anchors".
A dummy example: let vim_markdown_anchorexpr = "'<<'.v:anchor"
Note: I've also reformatted EditUrlUnderCursor a bit since it was
violating the 4-space tab and single-quoted string conventions that most
of the rest of the code seems to follow.
Option to not require .md extensions in markdown links
Gitlab uses markdown in an interesting way. If you want to create a link
to the page "linked-to-page" you might do this:
[Linked To Page Title](linked-to-page)
And not,
[Linked To Page Title](linked-to-page.md)
This change is about having the "ge" command work on wiki links
constructed in this way, and provides consistency between how gitlab
works and vim-markdown works.
Mike Percy [Wed, 27 Apr 2016 08:09:46 +0000 (01:09 -0700)]
Implement "edit link in Vim" shortcut
Added a shortcut called `ge` that is similar to `gx` except that it
opens the file under the cursor for editing in Vim. This is particularly
useful when editing markdown that contains relative links to other
markdown files.
Takumi Tsunokake [Sat, 20 Feb 2016 12:22:58 +0000 (21:22 +0900)]
make new list item indent configurable
before the commit, we cannot configure new list item indent,
it was fixed. i always insert 2-space indent for new list item.
so i'd like to make it configurable.
When alias names of a language are used with fenced code block,
syntax include is executed twice and causes errors.
We add `b:mkd_included_filetypes` to check syntax included.
Fix #251