-
Notifications
You must be signed in to change notification settings - Fork 69
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
Disabling folding #11
Comments
I'm sorry, but I don't quite follow. Could you please explain what you want to achieve? |
I never enable folds in this plugin, I just set the foldmethod. If you don't want folds, you can either disable them globally with |
I tried it with a minimal init.vim set nocompatible " be iMproved, required
filetype off " required
call plug#begin('~/.vim/bundle')
Plug 'lervag/wiki.vim'
call plug#end()
syntax on
filetype plugin indent on " required
let g:wiki_root = '~/Cloud/wiki/'
set nofoldenable
autocmd Filetype wiki set nofoldenable And the wiki is still folded. I thought it was the plugin, because the filetype stuff gets sourced after the init.vim |
Sorry, this was actually a bug. In the code that opens a wiki link, I do |
Hi @lervag, is it possible that you overwrite the foldlevel user option? Using the index command (and this Focusing part), foldlevel=0 is forced. Maybe something like this would be better:
However, I'm not sure why you close all folds by default in the first place. Isn't it done automatically? |
Good questions.
No, not necessarily. That is, people could use different Perhaps it is better to fully avoid the I'd like more opinions on this. @jabirali for instance, what do you think? Note: I've accepted your suggested change as a bugfix. |
Sorry about the late reply... I've been a lot sick lately, so haven't kept up with my notifications :).
Personally, I think I like the same behaviour as you: I like that folding allows me to only see the relevant parts of the file, and I believe the If you do keep this behaviour, perhaps the snippet of @rattletat can be generalized to all fold levels? Quickly checking the docs, it seems like replacing If you decide to remove the |
The docs for
I'm not so sure if this is right, though. In the Or did you mean to change the entire snippet and do Perhaps, though, that this is better (and what you meant)? if l:same_file
normal! zv
else
normal! zx
endif Opinions, @rattletat and @jabirali?
Agreed, will do that if I make the change. |
Indeed, that's what I meant :). Having a different behavior for My understanding of the documentation is that replacing |
Agreed, thanks. I'll update accordingly. |
I guess this is kind of a feature request. But here is hacky workaround:
The text was updated successfully, but these errors were encountered: