xaizek / vim-preamble (License: Unspecified) (since 2018-12-07)
Preamble Vim plugin by Mel Davis with a couple of fixes.
Commit 7eac6cee0b0081ba2e145cb72188fb3a9923f43b

Fix creation of multiple foldes
How to reproduce:
* add "filetype = c" to modeline
* or just do `:set filetype=c` N times, there will be N folds on the
first line without this change
Author: xaizek
Author date (UTC): 2015-10-31 07:51
Committer name: xaizek
Committer date (UTC): 2015-10-31 07:51
Parent(s): c431aedbc40ea5374b51a2f3bedb27f87662624a
Signing key:
Tree: bdd6a336154de9667b5c03ffb68bbb8678b06bb7
File Lines added Lines deleted
autoload/Preamble.vim 7 3
File autoload/Preamble.vim changed (mode: 100644) (index 85227d0..92950b9)
... ... fun! Preamble#Fold()
49 49 if pl < s:preamble_min_lines | return | endif if pl < s:preamble_min_lines | return | endif
50 50 if pl > s:preamble_max_lines && !s:preamble_fold_partial | return | endif if pl > s:preamble_max_lines && !s:preamble_fold_partial | return | endif
51 51
52 " if a fold aleady exists in line 1, just close it
53 if foldlevel(1) && foldclosed(1) == -1
54 execute ':1,'.pl.'foldclose'
52 " if a fold aleady exists in line 1
53 if foldlevel(1)
54 " and it's open, close it
55 if foldclosed(1) == -1
56 execute ':1,'.pl.'foldclose'
57 endif
58 " or do nothing
55 59 return return
56 60 endif endif
57 61
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vim-preamble

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vim-preamble

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master