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

Pencil and Markdown issue with lists #93

Open
KRSHK opened this issue Oct 8, 2020 · 8 comments
Open

Pencil and Markdown issue with lists #93

KRSHK opened this issue Oct 8, 2020 · 8 comments

Comments

@KRSHK
Copy link

KRSHK commented Oct 8, 2020

Hi ! I'm actually using Pencil in addition to markdown-vim.
I setup my pencil plugin but when I begin a list, when writing a new list entry, the cursor goes back, and continue the previous line as following:

This is the wanted behavior:

- first element of my list
- second element of the list

But this is how it reacts when I press Enter to begin a new line, markdown-vim add automatically a new dash, but when I start to write my new entry, Pencil remove the dash and the new line to continue my writing after my first entry:

- first element of my list second element of my list

Any idea ?

@alerque
Copy link
Member

alerque commented Oct 8, 2020

Which markdown-vim are you using? There is more than one plugin by that name in the wild.

@KRSHK
Copy link
Author

KRSHK commented Oct 8, 2020

Which markdown-vim are you using? There is more than one plugin by that name in the wild.

The one from plasticboy

@hauleth
Copy link

hauleth commented Dec 9, 2020

@alerque I am using built in one as well as VimWiki and in both cases the problem persists.

@lyz-code
Copy link

lyz-code commented Feb 9, 2021

It also happens with * lists. It may be a duplicate of #31

@omichaelo
Copy link

I found a workaround in this issue on plasticboy markdown.

autocmd BufRead,BufNewFile *.md setlocal comments=fb:>,fb:*,fb:+,fb:-

However, new list items no longer automatically starts with - or * . At least now lists are usable in hardwrap mode.

The relevant section of my .vimrc looks like this.

au FileType markdown setlocal textwidth=80
let g:vim_markdown_new_list_item_indent=0
au FileType markdown setlocal comments=fb:>,fb:*,fb:+,fb:-
au FileType markdown setlocal fo+=2ca

@cachandlerdev
Copy link

Has there been any update on this issue? I have also experienced this problem with :HardPencil in latex files. Luckily, it does not seem to appear in :SoftPencil mode, but when :Pencil activates :HardPencil by default in latex files, it can be quite obnoxious.
Screencast from 2023-06-24 07-23-10.webm

@reedes
Copy link
Collaborator

reedes commented Jul 12, 2023

I don't have any specific fix to offer re list behavior, but I recall when I coded Pencil that behavior could be dependent on the syntax plugin, such as plasticboy which actively managed lists.

Ideally Pencil's defaults will work cleanly with all the syntax plugins. But that'll require someone to dive into figuring out better Pencil defaults.

Re hardpencil behavior with Latex, that's likely an autoformat issue that needs tweaking of the blacklist. (Best pursued as a separate issue)

@alerque
Copy link
Member

alerque commented Aug 12, 2023

Plasticboy's markdown syntax plugin is now under the preservim umbrella now to, so we have access to both ends of the stick. Anybody is welcome to contribute whatever it takes to make them work together cleanly, and yes working out of the box with all major syntax plugins is the goal.

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

No branches or pull requests

7 participants