vim-template
vim-template copied to clipboard
[bug] if setl foldmethod=expr in ftplugin, this plugin cannot work
OS: linux 5.14 vi: nvim 0.5.0
test.vim:
let $XDG_CONFIG_HOME = $HOME . '/.config'
set runtimepath=$VIMRUNTIME
set runtimepath+=~/.local/share/nvim/repos/github.com/aperezdc/vim-template
set runtimepath+=~/.local/share/nvim/repos/github.com/pedrohdz/vim-yaml-folds/after
let g:templates_global_name_prefix = ''
let g:templates_directory = [$XDG_CONFIG_HOME . '/nvim/template']
test.yaml
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/frnmst/md-toc
rev: 8.0.1
hooks:
- id: md-toc
$ vi -u test.vim test.yaml
Expected result:
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/frnmst/md-toc
rev: 8.0.1
hooks:
- id: md-toc
However, the result is
---
I have found if delete setlocal fdm=expr
in <~/.local/share/nvim/repos/github.com/pedrohdz/vim-yaml-folds/after/yaml/folding.vim>, this plugin can work.
Thanks!