diff options
author | Christian Clason <c.clason@uni-graz.at> | 2025-03-09 17:22:32 +0100 |
---|---|---|
committer | Christian Clason <ch.clason+github@icloud.com> | 2025-03-10 09:40:42 +0100 |
commit | 8e55a5315a90a03c8d505c44b767c61859fcc4d9 (patch) | |
tree | 3094be8a4d9546ea3a3c90fee44125efdefe2069 | |
parent | c53e00889d38d19ec5e40f97e77280c8d4e33802 (diff) | |
download | rneovim-8e55a5315a90a03c8d505c44b767c61859fcc4d9.tar.gz rneovim-8e55a5315a90a03c8d505c44b767c61859fcc4d9.tar.bz2 rneovim-8e55a5315a90a03c8d505c44b767c61859fcc4d9.zip |
vim-patch:42e498d: runtime(plsql): move fold option from syntax to filetype plugin
closes: vim/vim#16838
https://github.com/vim/vim/commit/42e498d9c41a0260ccddceeb2927c18b508eff54
Co-authored-by: Lee Lindley <lee.lindley@gmail.com>
Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
-rw-r--r-- | runtime/doc/filetype.txt | 6 | ||||
-rw-r--r-- | runtime/ftplugin/plsql.vim | 17 | ||||
-rw-r--r-- | runtime/syntax/plsql.vim | 3 |
3 files changed, 24 insertions, 2 deletions
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index 46af8801a5..c04367d1ad 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -821,6 +821,12 @@ the PDF. The following are treated as tags: These maps can be disabled with > :let g:no_pdf_maps = 1 + +PLSQL *ft-plsql-plugin* + +To enable syntax folding in PL/SQL filetypes, set the following variable: > + + :let g:plsql_fold = 1 < PYTHON *ft-python-plugin* *PEP8* diff --git a/runtime/ftplugin/plsql.vim b/runtime/ftplugin/plsql.vim new file mode 100644 index 0000000000..7fcc5d7a5c --- /dev/null +++ b/runtime/ftplugin/plsql.vim @@ -0,0 +1,17 @@ +" Vim ftplugin file +" Language: Oracle Procedural SQL (PL/SQL) +" Maintainer: Lee Lindley (lee dot lindley at gmail dot com) +" Previous Maintainer: Jeff Lanzarotta (jefflanzarotta at yahoo dot com) +" Previous Maintainer: C. Laurence Gonsalves (clgonsal@kami.com) +" URL: https://github.com/lee-lindley/vim_plsql_syntax +" Last Change: Feb 19, 2025 +" History: Enno Konfekt move handling of optional syntax folding from syntax +" file to ftplugin + +if exists("b:did_ftplugin") | finish | endif +let b:did_ftplugin = 1 + +if get(g:,"plsql_fold",0) == 1 + setlocal foldmethod=syntax + let b:undo_ftplugin = "setl fdm< " +endif diff --git a/runtime/syntax/plsql.vim b/runtime/syntax/plsql.vim index 9b4df09ac7..7e44e83334 100644 --- a/runtime/syntax/plsql.vim +++ b/runtime/syntax/plsql.vim @@ -4,7 +4,7 @@ " Previous Maintainer: Jeff Lanzarotta (jefflanzarotta at yahoo dot com) " Previous Maintainer: C. Laurence Gonsalves (clgonsal@kami.com) " URL: https://github.com/lee-lindley/vim_plsql_syntax -" Last Change: Sep 19, 2022 +" Last Change: Mar 09, 2025 " History Carsten Czarski (carsten dot czarski at oracle com) " add handling for typical SQL*Plus commands (rem, start, host, set, etc) " add error highlight for non-breaking space @@ -694,7 +694,6 @@ syn region plsqlSqlPlusCommand start="^\(SET\|DEFINE\|PROMPT\|ACCEPT\|EXEC\|HOS syn region plsqlSqlPlusRunFile start="^\(@\|@@\)" skip="\\$" end="$" keepend extend if get(g:,"plsql_fold",0) == 1 - setlocal foldmethod=syntax syn sync fromstart syn cluster plsqlProcedureGroup contains=plsqlProcedure |