-
Notifications
You must be signed in to change notification settings - Fork 521
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
gq wrapping is still broken #390
Comments
I just started using From
|
Instead of making the lists comments, make them, well, lists:
|
I set this to only apply to markdown files to so as to not break commenting on other file types. Not 100% sure this is necessary.
|
plasticboy/vim-markdown `formatoptions`, `comments`, and `indentexpr` lead to incorrect indentation and hard wrapping behavior as per: * preservim/vim-markdown#232 + Rewrapping a bullet point inserts new bullet points * preservim/vim-markdown#390 + gq wrapping is still broken tpope/vim-markdown has the correct behavior. Compare the two implementations: * https://github.com/preservim/vim-markdown/blob/50d42082819cfa91745b6eff6e28ad5cbc8b27fa/indent/markdown.vim#L4 * https://github.com/tpope/vim-markdown/blob/891dff54a92b04cda36da7fbc6634831c3389d29/ftplugin/markdown.vim#L12 See also `formatlistpat` and explanations at: * https://vimways.org/2018/formatting-lists-with-vim * https://blog.siddharthkannan.in/2019/11/02/format-list-pat-and-vim While I'm at it, introduce dkarter/bullets.vim to take my list game to the next level. Pro Tip: When switching back and forth between plasticboy/vim-markdown and tpope/vim-markdown, use the following to keep vim-plug happy: Plug 'tpope/vim-markdown', {'as': 'tpope-markdown'}
Even with #375 merged, and using
let g:vim_markdown_auto_insert_bullets = 0
, the problem occurs below. (By the way,let g:vim_markdown_auto_insert_bullets = 0
should be the default behaviour, and possibly even shouldn't be an option because gq would be broken if it is not set or is set to 1)gets converted to (using
gqap
):So the bullet points that are indented get screwed up.
@lemontheme 's comment is the solution #232 (comment) but it is ugly having to copy paste something into my vim rc file. It is also annoying for anyone who uses gq and does not know of this issue
The text was updated successfully, but these errors were encountered: