From 5aab60526a3ba4bf5c6ef4477f45576fc1ae340d Mon Sep 17 00:00:00 2001 From: Riley Bruins Date: Mon, 9 Jun 2025 16:31:28 -0700 Subject: [PATCH] Set 'comments' and 'commentstring' options in ftplugin Useful for interacting with 'formatoptions', adding fold markers, and toggling comments. --- ftplugin/plsql.vim | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ftplugin/plsql.vim b/ftplugin/plsql.vim index 18049e8..786e3dd 100755 --- a/ftplugin/plsql.vim +++ b/ftplugin/plsql.vim @@ -4,19 +4,24 @@ " 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 +" Last Change: Jun 09, 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 +setlocal commentstring=--\ %s +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:-- + +let b:undo_ftplugin = "setl com< cms<" + let s:cpo_save = &cpo set cpo&vim if get(g:,"plsql_fold",0) == 1 setlocal foldmethod=syntax - let b:undo_ftplugin = "setl fdm< " + let b:undo_ftplugin .= "|setl fdm< " endif let &cpo = s:cpo_save