From: Ted Pavlic <ted@tedpavlic.com>
To: git <git@vger.kernel.org>, vim_use <vim_use@googlegroups.com>
Subject: Vim's gitconfig filetype (and folding)
Date: Wed, 28 Jan 2009 11:56:54 -0500 [thread overview]
Message-ID: <49808E56.3090300@tedpavlic.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 918 bytes --]
I don't know who is responsible for maintaining the git-related files
distributed with Vim, but it would be nice if folding was enable for the
gitconfig filetype.
I've attached a sample set of folding rules that works well for me...
Right now I have the attached file in ~/.vim/ftplugin/gitconfig.vim.
I'll paste those rules here (but beware of word wrap):
:set
foldexpr=getline(v:lnum)=~'^[;#]\\s*\\(ex\\\|vi\\\|vim\\):'?\">1\":((getline(v:lnum)=~\"^#\\\\=[\")?\">1\":\"1\")
:set fdm=expr
--Ted
--
Ted Pavlic <ted@tedpavlic.com>
Please visit my ALS association page:
http://web.alsa.org/goto/tedpavlic
My family appreciates your support in the fight to defeat ALS.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
[-- Attachment #2: gitconfig.vim --]
[-- Type: text/plain, Size: 133 bytes --]
:set foldexpr=getline(v:lnum)=~'^[;#]\\s*\\(ex\\\|vi\\\|vim\\):'?\">1\":((getline(v:lnum)=~\"^#\\\\=[\")?\">1\":\"1\")
:set fdm=expr
reply other threads:[~2009-01-28 16:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49808E56.3090300@tedpavlic.com \
--to=ted@tedpavlic.com \
--cc=git@vger.kernel.org \
--cc=vim_use@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).