gitmodules: Set foldmethod=expr per modeline

Fold away every submodule entry.

Add section headers.
This commit is contained in:
2022-04-24 13:45:09 +02:00
parent 464d4de64b
commit 846d0fc6c6
2 changed files with 12 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
" Create folds for all lines between a section start and either the next section
" start or blank line
setlocal foldexpr=getline(v:lnum)=~'^\\['?'>1':getline(v:lnum+1)=~'(^\\[\\|^$)'?'<1':getline(v:lnum)=~'^\\t'

9
.gitmodules vendored
View File

@@ -1,11 +1,17 @@
# vim: foldmethod=expr
# See the foldexpr in ftplugin/gitconfig.vim as well as vim-sort-folds
# meta
[submodule "dotbot"]
path = meta/dotbot
url = https://github.com/anishathalye/dotbot
# bin
[submodule "fzf"]
path = .local/bin/fzf-repo
url = https://github.com/junegunn/fzf
# git
[submodule "diff-so-fancy"]
path = .config/git/diff-so-fancy
url = https://github.com/so-fancy/diff-so-fancy
@@ -13,6 +19,7 @@
path = .config/git/git-filter-repo
url = https://github.com/newren/git-filter-repo
# tmux
[submodule "tmux-continuum"]
path = .config/tmux/plugins/tmux-continuum
url = https://github.com/tmux-plugins/tmux-continuum
@@ -29,6 +36,7 @@
path = .config/tmux/plugins/tpm
url = https://github.com/tmux-plugins/tpm
# vim
[submodule "arm-syntax-vim"]
path = .config/vim/pack/plugins/opt/arm-syntax-vim
url = https://github.com/ARM9/arm-syntax-vim
@@ -87,6 +95,7 @@
path = .config/vim/pack/plugins/opt/vim-textobj-user
url = https://github.com/kana/vim-textobj-user
# zsh
[submodule "fzf-tab"]
path = .config/zsh/plugins/fzf-tab
url = https://github.com/Aloxaf/fzf-tab