- Options types
- Global options:
g:{option-name} - Local/project-wise options:
b:{option-name} - Project-wise options with default:
(bg):{option-name} - lh-dev options:
(bg):[{filetype}__]{option-name}
- Global options:
- Option list
(bg):cpp_always_a_destructor_when_there_is_a_pointer_attribute'(bg):cpp_std_flavourand$CXXFLAGS(bg):({ft}_)FunctionPosArg,(bg):({ft}_)FunctionPosition(bg):ProjectVersion(bg):({ft}_)ShowDefaultParams,(bg):({ft}_)ShowExplicit,(bg):({ft}_)ShowStatic,(bg):({ft}_)ShowVirtual(bg):accessor_comment_get,(bg):accessor_comment_set,(bg):accessor_comment_ref(bg):({ft}_)alternateSearchPath(bg):({ft}_)begin_end_style(bg):c_menu_name,(bg):c_menu_priority,(bg):cpp_menu_name,(bg):cpp_menu_priority(bg):cpp_defaulted(bg):cpp_defines_to_ignore(bg):cpp_deleted(bg):cpp_noexcept(bg):cpp_noncopyable_class(bg):cpp_explicit_default(bg):cpp_make_ptr(bg):cpp_noexcept(bg):cpp_return_ptr_type(bg):cpp_root_exception(bg):cpp_use_copy_and_swap(bg):cpp_use_nested_namespacesg:c_no_assign_in_conditiong:c_no_hl_fallthrough_caseg:cpp_no_catch_by_referenceg:cpp_no_hl_c_castg:cpp_no_hl_funcdefg:cpp_no_hl_throw_spec(bg):({ft}_)dox_CommentLeadingChar(bg):({ft}_)dox_TagLeadingChar(bg):({ft}_)dox_author_tag(bg):({ft}_)dox_author(bg):({ft}_)dox_brief(bg):({ft}_)dox_group(bg):({ft}_)dox_ingroup(bg):({ft}_)dox_throw(bg):({ft}_)exception_args(bg):({ft}_)exception_type(bg):({ft}_)ext_4_impl_file(bg):({ft}_)file_regex_for_inclusion(bg):({ft}_)filename_simplify_for_inclusion(bg):({ft}_)gcov_files_path(bg):({ft}_)implPlaceg:inlinesPlace(bg):({ft}_)includes(bg):({ft}_)multiple_namespaces_on_same_line(bg):({ft}_)nl_before_bracket(deprecated)(bg):({ft}_)nl_before_curlyB(deprecated)(bg):({ft}_)pre_desc_ordered_tags,(bg):({ft}_post_desc_ordered_tags)(bg):({ft}_)project_namespace(bg):({ft}_)tag_kinds_for_inclusion(bg):tags_select(bg):({ft}_)template_expand_doc(bg):xsltproc
They are best set from the .vimrc;
They are best set from a local_vimrc file;
Their default value can be set in the .vimrc, but its best to set them from a
local_vimrc file;
lh-dev options: (bg):[{filetype}__]{option-name}
Boolean option that enforces the expansion of a destructor in classes that have pointer attributes, even when it isn't required.
Default value: 0 (false)
See:
lh#cpp#snippets#_this_param_requires_a_destructorwhich is used in turn by ...lh#cpp#snippets#requires_destructorwhich is used in turn by ...cpp/internals/class-skeleton.template
These options are exploited by C++ flavour decoding functions
The expected values for (bg):cpp_std_flavour are "03", "05" (TR1), "11", "14", or "17".
Other values will lead into Unspecified Behaviour.
warning: "98" is not a valid value.
If (bg):cpp_std_flavour is not set, the flavour will be extracted from the
-std= option in $CXXFLAGS or else from the CMake $CMAKE_CXXFLAGS option.
Valid values are -std=c++98, -std=c++03, -std=c++0x, -std=c++11,
-std=c++1y, -std=c++14, -std=c++1z, -std=c++17 (the -std=gnu++xx
ones are also handled)
Note: The $CMAKE_CXXFLAGS option is obtained thanks to
lh-cmake. BTW, this plugin is not
automatically installed with lh-cpp (if you are using a dependencies aware
plugin manager like VAM or vim-flavor ; with dependencies unaware plugin
managers, you'll will also have to install it as well)
Determines where the default implementation, for a function not yet defined,
should be placed by :GOTOIMPL. We are placed ...
- 0 -> ... at
cpp_FunctionPosArglines from the end of the file. - 1 -> ... at the line after the first occurrence of the pattern
cpp_FunctionPosArg. By default, we are placed after: >
/*============*/
/*===[ «» ]===*/
/*============*/That I use to insert with :BLINES
- 2 -> ... according the hook (user-defined VimL-function)
cpp_FunctionPosArg. By default, we are asked for a title (actually a regex pattern), and placed after:
/*=====================*/
/*===[ {the_title} ]===*/
/*=====================*/... That I still use to insert with |:BLINES|
- 3 -> ... nowhere, and nothing is inserted. The insertion must be done
manually thanks to
:PASTEIMPL.
Version of the project. Can be used in Doxygen comment through API function
lh#dox#since().
(bg):({ft}_)ShowDefaultParams, (bg):({ft}_)ShowExplicit, (bg):({ft}_)ShowStatic, (bg):({ft}_)ShowVirtual
Boolean options used by :GOTOIMPL. They tells whether
the C++ keywords explicit, static or virtual shall be kept in the empty
implementation skeleton generated for a function declaration. Same thing for
default parameter values.
Default values to all: 1 (true)
Strings to customize the comments inserted on :ADDATTRIBUTE.
"%a" will be substituted with the name of the attribute.
Tells how to alternate between a source file and a header file.
Default value: 'sfr:../source,sfr:../src,sfr:../include,sfr:../inc'
According to alternate.vim documentation:
A path with a prefix of "wdr:" will be treated as relative to the working
directory (i.e. the directory where vim was started.) A path prefix of "abs:"
will be treated as absolute. No prefix or "sfr:" will result in the path
being treated as relative to the source file (see sfPath argument).
A prefix of "reg:" will treat the pathSpec as a regular expression
substitution that is applied to the source file path. The format is:
reg:<sep><pattern><sep><subst><sep><flag><sep>
<sep>seperator character, we often use one of[/|%#]<pattern>is what you are looking for<subst>is the output pattern<flag>can begfor global replace or empty
EXAMPLE: 'reg:/inc/src/g/' will replace every instance of 'inc' with
'src' in the source file path. It is possible to use match variables so you
could do something like:
'reg:|src/\([^/]*\)|inc/\1||'
(see help :substitute, help pattern and help sub-replace-special for more
details)
NOTE: a.vim uses , (comma) internally so DON'T use it in your regular
expressions or other pathSpecs unless you update the rest of the a.vim code to
use some other seperator.mentation:
Tells which style to use to generate a couple of calls to begin()/end():
- "
c++98": ->container.begin() - "
std": ->std::begin(container) - "
boost": ->boost::begin(container) - "
adl": ->begin(container)
See: CTRL-X_be, CTRL-X_cbe, CTRL-X_rbe, CTRL-X_crbe, cpp/b-e snippet
These options tells where the |menu| for all C and C++ item goes.
See :h :menu
String option.
Default Value: = default
See: API function
lh#cpp#snippets#defaulted()
Regex (default: none) that specifies which patterns (#define) shall be
ignored when parsing the source code to detect the current scope
(ns1::..::nsn::cl1::.....cln).
See: API functions
String option.
Default Value: = delete
See: API function
lh#cpp#snippets#deleted()
String format option (for
lh#fmt#printf())
Default Value: noexcept%1 in C++11, throw() in C++98
See:
Policy option that is used to tell how classes are made non-copyable.
- by inheriting from a dedicated noncopyable class.
{"name": "ITK::NonCopyable", "include": "<itkNoncopyable.h>"}
If the class is known by the type database , there is no need to explicit which file shall be included:
{"name": "boost:noncopyable"}
- by explictly deleting copy operations (with
= deletein C++11, or with declared but undefined private copy operations). This done by setting the option to an empty string.
Default value: {"name": "boost:noncopyable"}
See:
Boolean option that forces to explicitly add = default in snippets when C++11
is detected.
Warning: For now, this option has priority over
(bg):cpp_noncopyable_class. i.e. deleted copy operations will still appear even if the class inherits from a non-copyable class.
Default value: undefined (=> ask the user)
See:
lh#cpp#snippets#shall_explicit_defaults()which encapsulates its use.cpp/internals/class-skeleton.templatewhich uses its result
String format option for lh#fmt#printf()).
It tells how pointers are best created. Used only from cpp/clonable-clas.template snippet.
Default Value:
- C++14:
std::make_unique(%3) - C++11:
std::unique_ptr<%2>(new %2(%3)) - C++98:
std::auto_ptr<%1>(new %2(%3))
See:
- cpp/clonable-clas.template which uses it
(bg):cpp_return_ptr_type
String format option (for
lh#fmt#printf())
Default Value: override in C++11, /* override */ in C++98
See:
String format option for printf() (TODO: migrate to lh#fmt#printf())).
It tells how pointers are best returned from functions. Used only from cpp/clonable-clas.template snippet.
Default Value:
- C++11:
std::unique_ptr<> - C++98:
std::auto_ptr<>
See:
- cpp/clonable-clas.template which uses it
(bg):cpp_make_ptr
TDB
Boolean option that suggest to use copy-and-swap idiom when expanding assignment-operator snippet directly, or indirectly through value classes snippets.
Default value: 0 (false)
See:
cpp/assignment-operator.templatewhich uses it directlycpp/internals/class-skeleton.templatewhich uses it indirectly
Boolean option that enables the generation of nested namespaces in C++17
codes with namespace snippet.
Default value: is 1 (true).
Boolean option that disables syntax highlighting that detects assignments in conditions.
Default value: is 0 (false).
Boolean option that disables syntax highlighting that detects uses of case
that fall through other cases.
This feature isn't detecting correctly situation like: break; } case, that
why it's disabled for the moment.
Default value: is 1 (true).
Boolean option that disables syntax highlighting that detects exceptions caught by value.
Default value: is 0 (false).
Boolean option that disables syntax highlighting that detects C casts in C++.
Default value: is 0 (false).
Boolean option that disables syntax highlighting that hightlight function definitions.
Default value: is 0 (false).
Boolean option that disables syntax highlighting that detects throw specifications in C++.
Default value: is 0 (false).
Tells which character to use on each line of a Doxygen comment.
Default value: "*"
Wrapped in API function
lh#dox#comment_leading_char()
Tells which character to use on each line of a Doxygen comment.
Default value: "*". Other typical value: "!"
Wrapped in API function
lh#dox#tag_leading_char()
Tells which tag to use to introduce authors.
Default value: "author".
Wrapped in API function lh#dox#author()
Returns the default value to use as the author tagged in Doxygen comments.
Default value: None
Wrapped in API function lh#dox#author()
Tells if brief tag shall be used.
Default value: "short".
Other possible values: "yes"/"always"/"1", "no"/"never"/"0"/"short"
Wrapped in API function lh#dox#brief()
Default Doxygen group name used in snippets and templates.
Default value: the placeholder «Project»
See:
Tells if ingroup tag shall be used.
Default value: "0".
Other possible values: "yes"/"always"/"1", "no"/"never"/"0", or a group
name to use.
Wrapped in API function lh#dox#ingroup()
Tells which tag name to use to document exceptions.
Default value: "throw". Other typical value: "exception"
Wrapped in API function lh#dox#throw()
Arguments to inject in the exception called in
throw snippet.
Exception type to use in snippets like the
throw snippet.
Default is std::runtime_error
Tells the extension to use when :GOTOIMPL generates a
new implementation skeleton for a function.
Default is ".cpp".
Regex used by API function lh#cpp#tags#fetch() to
filter filenames to keep.
Default value: "\.h"
Tells API function
lh#cpp#tags#strip_included_paths()
how to simplify filenames with |fnamemodify()|.
Default value: ":t"
This option tells where gcov files are expected. The default value is the same path as the one where the current file is.
See: <localleader>g which permits to swap between a .gcov file and its
source.
Tells where a generated accessor shall go (with :ADDATTRIBUTE):
- 0 -> Near the prototype/definition (Java's way)
- 1 -> Within the inline section of the header/inline/current file
- 2 -> Within the implementation file (.cpp)
- 3 -> Use the pimpl idiom (In the Todo-List)
Where inlines are written on :ADDATTRIBUTE
- 0 -> In the inline section of the header/current file
- 1 -> In the inline section of a dedicated inline file
Option used by the C-ftplugin that completes the names of files to include. The options tells which directories shall be searched.
Default value: is vim option &path
See: <PlugCompleteIncludes> (i_CTRL-X_I) and <Plug>OpenIncludes
(n_CTRL_L)
Boolean option wrapped into API function
lh#cpp#option#multiple_namespaces_on_same_line().
Default value: 1 (true)
Permits snippets like namespace to write all names
on a same line (when nested namespaces aren't supported). i.e:
// If true
namespace ns1 { namespace ns2 {
} } // namespaces ns1::ns2
// If false
namespace ns1 {
namespace ns2 {
} // namespace ns1::ns2
} // namespace ns1In function-comment snippet, these |List|
options tell in which order the various documentation information are inserted
around the description the user will have to type:
The default before the user typed information is:
- "ingroup", "brief", "tparam", "param", "return", "throw", "invariant", "pre", "post"
The default after the user typed information is:
- "note", "warning"
Name of the project namespace used by the snippet
namespace.
Default value: the placeholder «ns»
This is also what is returned by API function
lh#cpp#snippets#current_namespace()
-- in that case, the default value used is an empty string.
Regex used by API function lh#cpp#tags#fetch() to
filter tags kind to keep.
Default value: "[dfptcs]"
Tags selection policy used by API function lh#cpp#tags#fetch().
Default value: "expand('<cword>')".
Boolean option used in snippets to tell whether documentation generation is required.
See:
Path to where the executable xsltproc is.
Default Value: xsltproc.
This options is used by the C-ftplugin that converts PVS-studio output into a format compatible with quickfix.
See: :PVSLoad, :PVSIgnore, :PVSShow and :PVSRedraw