Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modifies smart_lists #21

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

modifies smart_lists #21

wants to merge 4 commits into from

Conversation

vovkkk
Copy link
Contributor

@vovkkk vovkkk commented Apr 8, 2013

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
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
Copy link
Contributor Author

vovkkk commented Jun 16, 2013

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

fixed

@alehandrof
Copy link
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
Copy link
Contributor Author

vovkkk commented Jun 16, 2013

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
Copy link

mgaitan commented Jun 17, 2013

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