summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorTom Praschan <13141438+tom-anders@users.noreply.github.com>2022-04-07 12:39:08 +0100
committerBram Moolenaar <Bram@vim.org>2022-04-07 12:39:08 +0100
commit3506cf34c17c5eae6c2d1317db1fcd5a8493c288 (patch)
tree7a93cd7c69e55b1ee9e170d8efb62e75f67087fd /runtime
parent3ad2090316edc85e93094bba7af64f9991cc7f85 (diff)
downloadvim-git-3506cf34c17c5eae6c2d1317db1fcd5a8493c288.tar.gz
patch 8.2.4702: C++ scope labels are hard-codedv8.2.4702
Problem: C++ scope labels are hard-coded. Solution: Add 'cinscopedecls' to define the labels. (Rom Praschan, closes #10109)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/indent.txt8
-rw-r--r--runtime/doc/options.txt14
-rw-r--r--runtime/doc/quickref.txt1
-rw-r--r--runtime/optwin.vim5
4 files changed, 23 insertions, 5 deletions
diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt
index 6e8f35b2d..69a03f977 100644
--- a/runtime/doc/indent.txt
+++ b/runtime/doc/indent.txt
@@ -42,11 +42,12 @@ is not a C compiler: it does not recognize all syntax. One requirement is
that toplevel functions have a '{' in the first column. Otherwise they are
easily confused with declarations.
-These four options control C program indenting:
+These five options control C program indenting:
'cindent' Enables Vim to perform C program indenting automatically.
'cinkeys' Specifies which keys trigger reindenting in insert mode.
'cinoptions' Sets your preferred indent style.
'cinwords' Defines keywords that start an extra indent in the next line.
+'cinscopedecls' Defines strings that are recognized as a C++ scope declaration.
If 'lisp' is not on and 'equalprg' is empty, the "=" operator indents using
Vim's built-in algorithm rather than calling an external program.
@@ -293,8 +294,9 @@ The examples below assume a 'shiftwidth' of 4.
<
*cino-g*
gN Place C++ scope declarations N characters from the indent of the
- block they are in. (default 'shiftwidth'). A scope declaration
- can be "public:", "protected:" or "private:".
+ block they are in. (default 'shiftwidth'). By default, a scope
+ declaration is "public:", "protected:" or "private:". This can
+ be adjusted with the 'cinscopedecls' option.
cino= cino=g0 >
{ {
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index d5e5e6834..8b2021107 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1661,13 +1661,23 @@ A jump table for the options with a short description can be found at |Q_op|.
matter, include the keyword both the uppercase and lowercase:
"if,If,IF".
- *'clipboard'* *'cb'*
+ *'cinscopedecls'* *'cinsd'*
+'cinscopedecls' 'cinsd' string (default "public,protected,private")
+ local to buffer
+ {not available when compiled without the |+cindent|
+ feature}
+ Keywords that are interpreted as a C++ scope declaration by |cino-g|.
+ Useful e.g. for working with the Qt framework that defines additional
+ scope declarations "signals", "public slots" and "private slots": >
+ set cinscopedecls+=signals,public\ slots,private\ slots
+
+< *'clipboard'* *'cb'*
'clipboard' 'cb' string (default "autoselect,exclude:cons\|linux"
for X-windows, "" otherwise)
global
{only in GUI versions or when the |+xterm_clipboard|
feature is included}
- This option is a list of comma separated names.
+ This option is a list of comma-separated names.
Note: if one of the items is "exclude:", then you can't add an item
after that. Therefore do append an item with += but use ^= to
prepend, e.g.: >
diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt
index e53294291..279e3d56c 100644
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -643,6 +643,7 @@ Short explanation of each option: *option-list*
'cinkeys' 'cink' keys that trigger indent when 'cindent' is set
'cinoptions' 'cino' how to do indenting when 'cindent' is set
'cinwords' 'cinw' words where 'si' and 'cin' add an indent
+'cinscopedecls' 'cinsd' words that are recognized by 'cino-g'
'clipboard' 'cb' use the clipboard as the unnamed register
'cmdheight' 'ch' number of lines to use for the command-line
'cmdwinheight' 'cwh' height of the command-line window
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index d138ab1d1..9b4868f7c 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -624,6 +624,8 @@ call <SID>BinOptionG("scf", &scf)
if has("gui")
call <SID>AddOption("mousehide", gettext("hide the mouse pointer while typing"))
call <SID>BinOptionG("mh", &mh)
+ call <SID>AddOption("mousemoveevent", gettext("report mouse movement events"))
+ call <SID>BinOptionG("mousemev", &mousemev)
endif
call <SID>AddOption("mousemodel", gettext("\"extend\", \"popup\" or \"popup_setpos\"; what the right\nmouse button is used for"))
call <SID>OptionG("mousem", &mousem)
@@ -927,6 +929,9 @@ if has("cindent")
call <SID>AddOption("cinwords", gettext("list of words that cause more C-indent"))
call append("$", "\t" .. s:local_to_buffer)
call <SID>OptionL("cinw")
+ call <SID>AddOption("cinscopedecls", gettext("list of scope declaration names used by cino-g"))
+ call append("$", "\t" .. s:local_to_buffer)
+ call <SID>OptionL("cinsd")
call <SID>AddOption("indentexpr", gettext("expression used to obtain the indent of a line"))
call append("$", "\t" .. s:local_to_buffer)
call <SID>OptionL("inde")