-
Notifications
You must be signed in to change notification settings - Fork 40
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
markdownListMarker at start of previous line does not disable autoformat #31
Comments
To make it easier to add new items to a list in HardPencil mode
This disables autoformat within the list items, which is a step down. Need to determine if there's a way to get the best of both worlds: autoformat within list items AND ease of adding new list items without unintended reformat of multiple lines. |
For tpope's markdown syntax, restored standard autoformat behavior for unordered lists, which is generally pretty good. Ordered lists had annoying behavior for autoformat, so simply disabling autoformat if detected when insert is entered. This isn't ideal, but it's not clear what else can be done now. Fixed bug for PFormatToggle, where it wasn't properly disabling Vim's autoformat. Provided help in README for mapping key to toggle autoformat.
I believe this is the issue I just ran into.
It's not been too hard to work around yet, but it certainly was weird and confusing at first. :) |
Thanks for the report and for working around the problem. I've recently experienced some odd list behavior, but with the tpope syntax plugin. I'm not sure of the cause. It's time that I added regression tests (vader, e.g.) to better track all of these edge cases. |
I'm encountering this as well (latest HEAD of pencil, just got it today ❤️), and I'm also using the tpope markdown plugin (albeit a slightly old copy). Line-item character, space, text, Enter, everything's ok; then any character (other than a second newline) triggers autoformat and oops, both lines are now merged. Unlike in Brian's case, any method of arriving on a new line - Enter in insert mode or EDIT: This may be fodder for a separate ticket, but I also can't work around this with |
Re 7.3: As I had developed pencil a few months after 7.4 became available, it's likely that all my testing had been with that version. (I'm open to backwards compatibility, though I'd have to rely on others to port and test it.) Re the line-item issue, I haven't yet had a chance to revisit but intend to do in the coming weeks. Hopefully I can do better than to blacklist markdownListMarker which would disable autoformat in lists. |
Turns out my MacVim binary is 7.4(.258) and it's got the same issue re: inability to disable Pencil. Opened #38 to track. Thanks! |
Outlining appears to be broken when using the plasticboy/vim-markdown syntax plugin with Vim's autoformat (which pencil's HardPencil mode relies upon). This appears to be due to dynamic text handling found in that plugin. It would likely happen independently of pencil with Vim's autoformat enabled, but I haven't dug into it. |
@reedes have you had a chance to make any progress on this? ❤️ |
Sorry, I've been distracted by non-vim projects. If outlining is broken independent of pencil with Vim's autoformat enabled (via |
i'm getting this same issue with newlines getting poofed away in markdown lists, i have tpope's md plugin and this enabled. reading through this there didn't seem to be a real fix and its getting annoying enough that i've taken to disabling pencil for markdown files. if there's any fixes that people have please let me know, i do love using this plugin. |
This is still an issue for me, using tpope's markdown plugin or plasticboy's one. The syntax groups are just for the list marker, not the whole item, and I think that's perhaps where the issue lies. |
Any news on this? :-) |
Definitely a bug this one 😉! Also occurs with vim-pandoc's syntax. |
Has anyone come up with a workaround for this? Other than temporarily disabling Pencil. |
It's not a great workaround but I use PencilSoft to author markdown and Prettier to format it. I also find that using function SetPencilOptions()
call pencil#init({ 'wrap': 'soft' })
set textwidth=80
set colorcolumn=80
endfunction
autocmd FileType markdown,mkd,text call SetPencilOptions() |
Occurs in HardPencil mode and interferes with ability to add new items to a list.
The text was updated successfully, but these errors were encountered: