forked from aniani/vim
patch 8.2.4993: smart/C/lisp indenting is optional
Problem: smart/C/lisp indenting is optional, which makes the code more
complex, while it only reduces the executable size a bit.
Solution: Graduate FEAT_CINDENT, FEAT_SMARTINDENT and FEAT_LISP.
This commit is contained in:
@@ -1500,8 +1500,7 @@ cindent({lnum}) *cindent()*
|
||||
indenting rules, as with 'cindent'.
|
||||
The indent is counted in spaces, the value of 'tabstop' is
|
||||
relevant. {lnum} is used just like in |getline()|.
|
||||
When {lnum} is invalid or Vim was not compiled the |+cindent|
|
||||
feature, -1 is returned.
|
||||
When {lnum} is invalid -1 is returned.
|
||||
See |C-indenting|.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
@@ -5173,8 +5172,7 @@ lispindent({lnum}) *lispindent()*
|
||||
indenting rules, as with 'lisp'.
|
||||
The indent is counted in spaces, the value of 'tabstop' is
|
||||
relevant. {lnum} is used just like in |getline()|.
|
||||
When {lnum} is invalid or Vim was not compiled the
|
||||
|+lispindent| feature, -1 is returned. In |Vim9| script an
|
||||
When {lnum} is invalid -1 is returned. In |Vim9| script an
|
||||
error is given.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
|
||||
@@ -22,9 +22,6 @@ indent and do not perform other formatting. There are additional options that
|
||||
affect other kinds of formatting as well as indenting, see |format-comments|,
|
||||
|fo-table|, |gq| and |formatting| for the main ones.
|
||||
|
||||
Note that this will not work when the |+smartindent| or |+cindent| features
|
||||
have been disabled at compile time.
|
||||
|
||||
There are in fact four main methods available for indentation, each one
|
||||
overrides the previous if it is enabled, or non-empty for 'indentexpr':
|
||||
'autoindent' uses the indent from the previous line.
|
||||
|
||||
@@ -1621,8 +1621,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'cindent'* *'cin'* *'nocindent'* *'nocin'*
|
||||
'cindent' 'cin' boolean (default off)
|
||||
local to buffer
|
||||
{not available when compiled without the |+cindent|
|
||||
feature}
|
||||
Enables automatic C program indenting. See 'cinkeys' to set the keys
|
||||
that trigger reindenting in insert mode and 'cinoptions' to set your
|
||||
preferred indent style.
|
||||
@@ -1639,8 +1637,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'cinkeys'* *'cink'*
|
||||
'cinkeys' 'cink' string (default "0{,0},0),0],:,0#,!^F,o,O,e")
|
||||
local to buffer
|
||||
{not available when compiled without the |+cindent|
|
||||
feature}
|
||||
A list of keys that, when typed in Insert mode, cause reindenting of
|
||||
the current line. Only used if 'cindent' is on and 'indentexpr' is
|
||||
empty.
|
||||
@@ -1650,8 +1646,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'cinoptions'* *'cino'*
|
||||
'cinoptions' 'cino' string (default "")
|
||||
local to buffer
|
||||
{not available when compiled without the |+cindent|
|
||||
feature}
|
||||
The 'cinoptions' affect the way 'cindent' reindents lines in a C
|
||||
program. See |cinoptions-values| for the values of this option, and
|
||||
|C-indenting| for info on C indenting in general.
|
||||
@@ -1660,8 +1654,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'cinwords'* *'cinw'*
|
||||
'cinwords' 'cinw' string (default "if,else,while,do,for,switch")
|
||||
local to buffer
|
||||
{not available when compiled without both the
|
||||
|+cindent| and the |+smartindent| features}
|
||||
These keywords start an extra indent in the next line when
|
||||
'smartindent' or 'cindent' is set. For 'cindent' this is only done at
|
||||
an appropriate place (inside {}).
|
||||
@@ -1672,8 +1664,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'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": >
|
||||
@@ -4578,8 +4568,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'indentexpr'* *'inde'*
|
||||
'indentexpr' 'inde' string (default "")
|
||||
local to buffer
|
||||
{not available when compiled without the |+cindent|
|
||||
or |+eval| features}
|
||||
{not available when compiled without the |+eval|
|
||||
feature}
|
||||
Expression which is evaluated to obtain the proper indent for a line.
|
||||
It is used when a new line is created, for the |=| operator and
|
||||
in Insert mode as specified with the 'indentkeys' option.
|
||||
@@ -4624,8 +4614,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'indentkeys'* *'indk'*
|
||||
'indentkeys' 'indk' string (default "0{,0},0),0],:,0#,!^F,o,O,e")
|
||||
local to buffer
|
||||
{not available when compiled without the |+cindent|
|
||||
feature}
|
||||
A list of keys that, when typed in Insert mode, cause reindenting of
|
||||
the current line. Only happens if 'indentexpr' isn't empty.
|
||||
The format is identical to 'cinkeys', see |indentkeys-format|.
|
||||
@@ -5013,8 +5001,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'lisp'* *'nolisp'*
|
||||
'lisp' boolean (default off)
|
||||
local to buffer
|
||||
{not available when compiled without the |+lispindent|
|
||||
feature}
|
||||
Lisp mode: When <Enter> is typed in insert mode set the indent for
|
||||
the next line to Lisp standards (well, sort of). Also happens with
|
||||
"cc" or "S". 'autoindent' must also be on for this to work. The 'p'
|
||||
@@ -5028,8 +5014,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'lispwords'* *'lw'*
|
||||
'lispwords' 'lw' string (default is very long)
|
||||
global or local to buffer |global-local|
|
||||
{not available when compiled without the |+lispindent|
|
||||
feature}
|
||||
Comma-separated list of words that influence the Lisp indenting.
|
||||
|'lisp'|
|
||||
|
||||
@@ -7222,8 +7206,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'smartindent'* *'si'* *'nosmartindent'* *'nosi'*
|
||||
'smartindent' 'si' boolean (default off)
|
||||
local to buffer
|
||||
{not available when compiled without the
|
||||
|+smartindent| feature}
|
||||
Do smart autoindenting when starting a new line. Works for C-like
|
||||
programs, but can also be used for other languages. 'cindent' does
|
||||
something like this, works better in most cases, but is more strict,
|
||||
|
||||
@@ -346,7 +346,7 @@ B *++builtin_terms* maximal terminals builtin |builtin-terms|
|
||||
N *+byte_offset* support for 'o' flag in 'statusline' option, "go"
|
||||
and ":goto" commands.
|
||||
m *+channel* inter process communication |channel|
|
||||
N *+cindent* |'cindent'|, C indenting
|
||||
6 *+cindent* |'cindent'|, C indenting
|
||||
N *+clientserver* Unix and Win32: Remote invocation |clientserver|
|
||||
*+clipboard* |clipboard| support compiled-in
|
||||
*+clipboard_working* |clipboard| support compiled-in and working
|
||||
@@ -398,7 +398,7 @@ N *+lambda* |lambda| and |closure|
|
||||
B *+langmap* |'langmap'|
|
||||
N *+libcall* |libcall()|
|
||||
N *+linebreak* |'linebreak'|, |'breakat'| and |'showbreak'|
|
||||
N *+lispindent* |'lisp'|
|
||||
t *+lispindent* |'lisp'|
|
||||
T *+listcmds* Vim commands for the list of buffers |buffer-hidden|
|
||||
and argument list |:argdelete|
|
||||
T *+localmap* Support for mappings local to a buffer |:map-local|
|
||||
@@ -450,7 +450,7 @@ m *+ruby* Ruby interface |ruby|
|
||||
m *+ruby/dyn* Ruby interface |ruby-dynamic| |/dyn|
|
||||
T *+scrollbind* |'scrollbind'|
|
||||
B *+signs* |:sign|
|
||||
N *+smartindent* |'smartindent'|
|
||||
t *+smartindent* |'smartindent'|
|
||||
B *+sodium* compiled with libsodium for better encryption support
|
||||
B *+sound* |sound_playevent()|, |sound_playfile()| functions, etc.
|
||||
N *+spell* spell checking support, see |spell|
|
||||
|
||||
Reference in New Issue
Block a user