Comments (15)
Any news on this? :-)
from vim-pencil.
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.
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.
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.
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.
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.
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.
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.
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.
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.
@reedes have you had a chance to make any progress on this? ❤️
from vim-pencil.
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.
Definitely a bug this one 😉! Also occurs with vim-pandoc's syntax.
from vim-pencil.
Has anyone come up with a workaround for this? Other than temporarily disabling Pencil.
from vim-pencil.
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)
- View list of things concealed (or change) HOT 7
- Enable smoothscroll for soft wrap mode
- Disable <cr> mapping HOT 3
- Underline title
- Vim pencil hides/removes colorcolumn HOT 4
- Normal Mode unexpected cursor behavior HOT 6
- In soft mode, map k and j to gj and gk
- vim-pencil applies 'set nolist' in soft wrap mode?
- Why is textwidth not used for soft wrap? HOT 2
- Cleanup key remapping technique HOT 1
- blacklist for rst (restructured text) missing various highlight groups
- g:pencil#textwidth setting not applied
- SoftPencil seems doesn't work HOT 3
- Suspending autoformatting doesn't work? HOT 2
- How disable line wrap in front matter (for Hugo or Jekyll) HOT 6
- Pencil and Markdown issue with lists HOT 8
- Respect indentation of lists in Markdown
- SoftPencil on, then off, then on again -breaks navigation mappings HOT 8
- Can't enter newline when editing vimwiki markdown
- "Undefined variable" and "Invalid arguments" errors HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-pencil.