-
Notifications
You must be signed in to change notification settings - Fork 13
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
Single bullet point folds in itself #5
Comments
@lukaszkorecki @Mahaha should we just add the EDIT solution to readme? i.e. InstallationInstall with pathogen Configuration tweak recommendedThis fixes an edge-case with folding bullets. We recommend you add this to your .vimrc:
|
@hangtwenty @Mahaha @flugsio any reason why it can't be included in the workflowish code? |
@lukaszkorecki Well, I don't have the command of Vim or Vimscript or (doing a ton of things to your vim that might interact with each other), to know whether that's a risky change or not. I'll defer to you or @Mahaha on what's best. I don't mind making the code change when we know what is best |
@hangtwenty me neither :-), I think this shouldn't mess up too many things: autocmd BufWinLeave *.wofl mkview
autocmd BufWinEnter *.wofl silent loadview To address this without much risk it's best to update the README with that snippet and link to this issue. |
I don't like the workaround. If I understand the issue correctly, bullets spanning multiple lines should never be foldable? (maybe with a toggle) Currently, there is no "multiline" bullets. Every line is a bullet/item regardless of what characters it begins with. They are foldable if they have lines under them with at least 1 full indent (2 spaces for example). Another workaround is to use less indent for the next lines. This can be accomplished in multiple ways, for example using only 1 space, or prefix with some other character that is at the same indent.
One solution is to not only check the indents, but also the characters to determine foldlevels. To add this feature in the code, it would need to scan the contents around every line and either compute relative to previous indentlevels or scan all the way to the root. For longer files this could cause a significant slowdown. Here is the relevant function workflowish/ftplugin/workflowish.vim Line 172 in ca4f4e9
|
Ok, that sounds way too complicated fix for an edge case. Lets add that snippet to the readme and link to this issue. |
Fix for #5, also Pathogen installation note
@lukaszkorecki close it up? |
@hangtwenty done 👍 |
First off, thank you for making workflowish available, it is very helpful!
Yet I've been encountering an issue, for which I hope there may be an easy solution. I will append my .vimrc, incase the issue lies there:
Whenever I write a bullet point which goes over my linebreak, it automatically continues on the following line. Yet when I fold a bullet point, every bullet point, which is longer than one line, folds as well. I've added two images to highlight what's happening.
Is there anyway to stop folding lines when they belong to one bullet point?
Thanks a lot!
EDIT
I've been able to stop the issue from repeating itself by adding the following lines to my .vimrc:
The text was updated successfully, but these errors were encountered: