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

Don't use double quotes when single quotes enough
Author: xaizek
Author date (UTC): 2014-11-02 15:56
Committer name: xaizek
Committer date (UTC): 2014-11-02 15:56
Parent(s): 0b93c0541ab5a8fbeafb83c42154bcd002b2d1d6
Signing key:
Tree: 82d540373b6a95c88c3ef3a9b680af0417049e9b
File Lines added Lines deleted
autoload/Preamble.vim 5 5
File autoload/Preamble.vim changed (mode: 100644) (index 9ad871a..50afd57)
... ... fun! Preamble#Enable(filetypes)
27 27 if a:filetypes == "" | return | endif if a:filetypes == "" | return | endif
28 28
29 29 augroup AugroupPreamble augroup AugroupPreamble
30 execute "au BufWinEnter " . a:filetypes . " call Preamble#Fold()"
30 execute 'au BufWinEnter' a:filetypes 'call Preamble#Fold()'
31 31 augroup END augroup END
32 32 endfunction endfunction
33 33
 
... ... fun! Preamble#Fold()
51 51
52 52 " if a fold aleady exists in line 1, just close it " if a fold aleady exists in line 1, just close it
53 53 if foldlevel(1) && foldclosed(1) == -1 if foldlevel(1) && foldclosed(1) == -1
54 execute ":1,".pl."foldclose"
54 execute ':1,'.pl.'foldclose'
55 55 return return
56 56 endif endif
57 57
58 if &foldmethod=="syntax" | return | endif
58 if &foldmethod=='syntax' | return | endif
59 59
60 execute "set foldmethod=manual | :1,".pl."fold | :1,".pl."foldclose"
60 execute 'set foldmethod=manual | :1,'.pl.'fold | :1,'.pl.'foldclose'
61 61 endfunction endfunction
62 62
63 63
 
... ... fun! s:Length()
179 179 if !is_blankline if !is_blankline
180 180 let synId = synID(line_pos, 1, 1) let synId = synID(line_pos, 1, 1)
181 181 let realSynId = synIDtrans(synId) let realSynId = synIDtrans(synId)
182 if (synIDattr( realSynId, 'name' ) != "Comment") | break | endif
182 if (synIDattr( realSynId, 'name' ) != 'Comment') | break | endif
183 183 endif endif
184 184
185 185 let line_pos = line_pos + 1 let line_pos = line_pos + 1
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