Git Product home page Git Product logo

Comments (15)

sjktje avatar sjktje commented on May 31, 2024 4

Any news on this? :-)

from vim-pencil.

zeorin avatar zeorin commented on May 31, 2024 2

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.

from vim-pencil.

reedes avatar reedes commented on May 31, 2024 1

Sorry, I've been distracted by non-vim projects.

If outlining is broken independent of pencil with Vim's autoformat enabled (via set formatoptions+=a), then I'd consider this a bug with the syntax plugin which should support autoformat. That is what needs to be tested.

from vim-pencil.

reedes avatar reedes commented on May 31, 2024

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.

from vim-pencil.

brianarn avatar brianarn commented on May 31, 2024

I believe this is the issue I just ran into.

  • If I start at the end of a list item, then hit Enter, HardPencil seems to understand that I'm still in a list and it lets me keep going
  • If I add a new line (say, via o in normal mode) and that line is a new list item (which it is, thanks to plasticboy/vim-markdown), as soon as I type a \w character, the list item collapses back up and things get wonky.

It's not been too hard to work around yet, but it certainly was weird and confusing at first. :)

from vim-pencil.

reedes avatar reedes commented on May 31, 2024

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.

from vim-pencil.

bitprophet avatar bitprophet commented on May 31, 2024

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 o in visual mode - has identical results for me.

EDIT: This may be fodder for a separate ticket, but I also can't work around this with :TogglePencil (or :NoPencil etc). (Those may be straight-up broken for me, actually. FWIW I'm on MacOS Yosemite's bundled vim 7.3 at the moment, unclear how much pencil wants eg 7.4?)

from vim-pencil.

reedes avatar reedes commented on May 31, 2024

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.

from vim-pencil.

bitprophet avatar bitprophet commented on May 31, 2024

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!

from vim-pencil.

reedes avatar reedes commented on May 31, 2024

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.

from vim-pencil.

joeybaker avatar joeybaker commented on May 31, 2024

@reedes have you had a chance to make any progress on this? ❤️

from vim-pencil.

devsnek avatar devsnek commented on May 31, 2024

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.

from vim-pencil.

alerque avatar alerque commented on May 31, 2024

Definitely a bug this one 😉! Also occurs with vim-pandoc's syntax.

from vim-pencil.

thesofakillers avatar thesofakillers commented on May 31, 2024

Has anyone come up with a workaround for this? Other than temporarily disabling Pencil.

from vim-pencil.

jchook avatar jchook commented on May 31, 2024

It's not a great workaround but I use PencilSoft to author markdown and Prettier to format it.

I also find that using textwidth with PencilSoft makes for an acceptable "middle ground" solution:

function SetPencilOptions()
  call pencil#init({ 'wrap': 'soft' })
  set textwidth=80
  set colorcolumn=80
endfunction
autocmd FileType markdown,mkd,text call SetPencilOptions()

from vim-pencil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.