lervag / wiki-ft.vim

Simple Vim filetype plugin for wiki-files
MIT License
14 stars 5 forks source link

Add option g:wiki_foldlevel #10

Closed BirgerNi closed 2 years ago

BirgerNi commented 2 years ago

I like to open wiki files with a specific fold level. The following command does job:

autocmd BufRead,BufNewFile *.md setlocal foldlevel=2
autocmd BufRead,BufNewFile *.Rmd setlocal foldlevel=2

An option like g:wiki_foldlevel would be convenient. What do you think?

lervag commented 2 years ago

I think it is equally good to apply this in your own custom ftplugin, i.e. create ~/.config/nvim/ftplugin/markdown.vim and add the desired config. I do this myself, e.g.:

https://github.com/lervag/dotnvim/blob/main/ftplugin/wiki.vim