[pm-h] Vim folding

Robert Stone drzigman at drzigman.com
Fri Jun 9 07:43:35 PDT 2017


Greetings,

Perl doesn't fold properly without some special configuration.  In my
.vimrc I have:

" Perl Specific
let perl_include_pod = 1
let perl_fold = 1

" Folding
set foldmethod=syntax
set foldlevel=1
set foldnestmax=2
highlight Folded ctermbg=darkblue ctermfg=yellow

This is used in conjunction with vim-perl which has support for folding
(that is turned on via the .vimrc directives): https://github.
com/vim-perl/vim-perl  It's not perfect, certain specific sequences will
cause it to fold incorrectly:

(Image cut due to mailing list size limitation)

But 90% of the time, it works every time.  One of these days I'm going to
sit down and fix these little quirks in the folding...

If you are interested in my entire vim setup you can view what I use at
https://github.com/drzigman/zig-vim

Good luck!

Best Regards,
Robert Stone

On Fri, Jun 9, 2017 at 7:05 AM, Julian Brown <jlbprof at gmail.com> wrote:

> I am hoping one of you know how to solve my problem with Vim folding.
>
> I can fold manually, and via marks.   I cannot get folding to work with
> syntax.  But I do not like to use either as they are a pain in the neck and
> not worth the hassle.
>
> So in this screenshot:
>
> :set foldmethod=syntax
>
> I then move my cursor to a sub
>
> <esc>zf
>
> [image: Inline image 1]
>
> My cursor is on line 19 position 0.
>
> The error message is E350: Cannot create fold with current 'foldmethod'
>
> I am on Debian Wheezy,
>
> Linux momentive-webserver 3.2.0-4-amd64 #1 SMP Debian 3.2.88-1 x86_64
> GNU/Linux
> momentive at momentive-webserver:~$ cat /etc/os-release
> PRETTY_NAME="Debian GNU/Linux 7 (wheezy)"
> NAME="Debian GNU/Linux"
> VERSION_ID="7"
> VERSION="7 (wheezy)"
> ID=debian
> ANSI_COLOR="1;31"
> HOME_URL="http://www.debian.org/"
> SUPPORT_URL="http://www.debian.org/support/"
> BUG_REPORT_URL="http://bugs.debian.org/"
>
> VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Mar  8 2017 13:44:28)
>
> I have read that Vim has some problems with syntax folding and am
> wondering if and how you all use syntax folding.
>
> I have this same problem on my cPanel vm's as well, so I am hoping Julian
> is ignorant and does not know what he is doing and you all can straighten
> him out.   :)
>
> Thanx
>
> Julian
>
> _______________________________________________
> Houston mailing list
> Houston at pm.org
> http://mail.pm.org/mailman/listinfo/houston
> Website: http://houston.pm.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/houston/attachments/20170609/f20cd728/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2017-06-09 at 6.58.05 AM.png
Type: image/png
Size: 203171 bytes
Desc: not available
URL: <http://mail.pm.org/pipermail/houston/attachments/20170609/f20cd728/attachment-0001.png>


More information about the Houston mailing list