Skip to content

modifies smart_lists#21

Open
vovkkk wants to merge 4 commits into
demon386:developfrom
vovkkk:develop
Open

modifies smart_lists#21
vovkkk wants to merge 4 commits into
demon386:developfrom
vovkkk:develop

Conversation

@vovkkk

@vovkkk vovkkk commented Apr 8, 2013

Copy link
Copy Markdown
Contributor

adds non-lists patterns:

  • block quotes (>);
  • line block (|);
  • title block (%);

marker of ordered list may be enclosed in parentheses or followed by a single right-parentheses;
(optionally) list item may contain multiple paragraphs (i.e. empty list bullet is converted to whitespaces)


non-list pattern breaks after triple press enter, e.g.:

> This is a block quote.
> 
>

become:

> This is a block quote.

vovkkk added 3 commits April 8, 2013 17:36
adds non-lists patterns: block quotes (>); line block (|); title block
(%);
marker of ordered list may be enclosed in parentheses or followed by a
single right-parentheses;
list item may contain multiple paragraphs (i.e. empty list bullet is
converted to whitespaces)
ST does it by default, so SM should too
@alehandrof

Copy link
Copy Markdown
Contributor

There's a related issue with the >, | and %.

If I write a >, I enter "blockquote mode" that I can't escape from except by erasing the last >, which is a little inelegant. (It's less like writing and more like editing, if this makes sense.) I find the "mode" useful, but I wish there was an easier way to come out of it.

The only thing I've thought of is interpreting Enter on two consecutive blank >s as a command to return to normal paragraph mode. For example,

> First quoted paragraph
> 
> Second quoted paragraph
> 
> |

Pressing Enter at the caret's location (indicated by the |) would remove the last two >. The caret would remain on the same line (the 6th in the example).

All this sound good (to me) in theory. In practice, it may turn out to be cumbersome. And I'm not sure how convoluted it is to implement.

What do you think?

if current line and previous one are empty (viz. [%>|]\s), enter erases
content of those lines;
cursor remains on the same line
@vovkkk

vovkkk commented Jun 16, 2013

Copy link
Copy Markdown
Contributor Author

There's a related issue with the >, | and %.

fixed

@alehandrof

Copy link
Copy Markdown
Contributor

Cool! It feels a little strange, but I don't see any problems with how it works :) I'm guessing you liked this as an idea?

@vovkkk

vovkkk commented Jun 16, 2013

Copy link
Copy Markdown
Contributor Author

Yes, more than two empty blockquote lines makes no sence for pandoc (it ignores these like there is only one empty line, assume others does the same).
Line block (|) - same.
Title block in general supposed to have only three lines so maybe I should remove it, because a snippet for this seems more suitable.

Anyway, behaviour you suggested really does make sence if user understand what gonna happen after converting markdown to html or other format.

@mgaitan

mgaitan commented Jun 17, 2013

Copy link
Copy Markdown

I've forget to mention that I used this patch in sublime-rst-completion . Thanks
https://github.com/dbousamra/sublime-rst-completion/blob/master/smart_list.py

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.

3 participants