Skip to content

Quick indent lists#28

Open
alehandrof wants to merge 7 commits intodemon386:developfrom
alehandrof:quick-indent-lists-2
Open

Quick indent lists#28
alehandrof wants to merge 7 commits intodemon386:developfrom
alehandrof:quick-indent-lists-2

Conversation

@alehandrof
Copy link
Contributor

I had to cherry pick through my devel branch. I hope this is everything :)

  • Resolves Feature: Quick nested list indenting #9.
  • The regex looks for most of what Pandoc would consider valid. (See alehandrof@90953bf for details.)
  • @vovkkk had suggested I restrict the binding so that it doesn't fire inside code blocks. I haven't found this necessary, but if you decide otherwise, this is an easy fix.
  • I have added the ability to use Ctrl+Enter to add new line with SmartList when in a list. I find this very useful, but YMMV. (alehandrof@b79c9ec)

A quick-and-dirty way to resolve issue demon386#9
This one relies on a lovingly hand-crafted regex rather than syntax of
the default Markdown.tmLanguage. Of course this should _really_ be
addressed at the level of the syntax. But I digress:

It supports the following list types (more or less in the order in
which they appear in the regex):

    -
    +
    *
    5.
    a.
    A.
    5)
    a)
    A)
    (5)
    (a)
    (A)
    (@)
    (@label-5_)

Because my attention is starting to wander, it does not support the
[two spaces after a single capital letter followed by a period](http://johnmacfarlane.net/pandoc/README.html#fn1)
rule, as well as roman numerals (e.g., `v)` or `III.`)

There are probably other issues I haven't noticed as well. Such as
those created by this excepionally long commit message :)
I call this "fake" because all I'm doing is matching IVXLCDM in either
upper- or lowercase, without testing the validity of the construction.
Thanks to @vovkkk for patiently pointing this out.
Use `Ctrl+Enter` on a list to quickly add a new item.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant