Adding new stuff

This commit is contained in:
Viktor Barzin 2017-10-08 12:00:02 +01:00
parent 39ee792ad4
commit a410da0e04
722 changed files with 331 additions and 189 deletions

View file

@ -0,0 +1,24 @@
*vim-c-complete.html*
C/C++ Code Completion
*********************
C/C++ code completion uses the standard Vim code completion mechanism
(vim-code_completion) like so:
>
#include <st<C-X><C-U>
#include <stio.h>
int main(void) {
pu<C-X><C-U>
puts(
puts("Hello World");
return EX<C-X><C-U>
return EXIT_SUCCESS;
}
<
vim:ft=eclimhelp

View file

@ -0,0 +1,30 @@
*vim-c-index.html*
C/C++
*****
Features
========
- C/C++ Project Configuration (vim-c-project)
- C/C++ Code Completion (vim-c-complete)
- C/C++ Validation (vim-c-validate)
- C/C++ Search (vim-c-search)
- C/C++ Code Inspection (vim-c-inspection)
Suggested Mappings
==================
Here are some mappings for the c/c++ funtionality provided by eclim.
To make use of these mappings, simply create a ftplugin file for c/cpp
and place your mappings there (:help ftplugin-name).
- The following mapping allows you to simply hit <enter> on an
element to perform a search to find it.
>
nnoremap <silent> <buffer> <cr> :CSearchContext<cr>
<
vim:ft=eclimhelp

View file

@ -0,0 +1,59 @@
*vim-c-inspection.html*
*:CCallHierarchy*
C/C++ Code Inspection
*********************
Call Hierarchy
==============
When viewing a c or c++ source file you can view the call hierarchy of
a function or method by issuing the command :CCallHierarchy. This
will open a temporary buffer with an inversed tree view of the
hierarchy of callers of the requested function or method.
>
fun2(int)
fun1(int)
main()
fun3(int)
fun3(int)
<
While you are in the hierarchy tree buffer, you can jump to the call
under the cursor using one of the following key bindings:
- <cr> - open the type using the (default action).
- E - open the type via :edit
- S - open the type via :split
- T - open the type via :tabnew
- ? - view help buffer
:CCallHierarchy can also be used to view the callees for a function or
method by invoking the command with a !:
>
:CCallHierarchy!
<
Configuration
-------------
Vim Settings (vim-settings)
*g:EclimCCallHierarchyDefaultAction*
- g:EclimCCallHierarchyDefaultAction (defaults to 'split') -
Determines the command used to open the file when hitting <enter> on
an entry in the hierarchy buffer.
vim:ft=eclimhelp

View file

@ -0,0 +1,62 @@
*vim-c-project.html*
*:CProjectConfigs*
C/C++ Project Configuration
***************************
The eclipse cdt provides a large set of configuration support for your
c/c++ projects. Eclim exposes a subset of these to you using the
:CProjectConfigs command:
>
:CProjectConfigs
" or if you are outside of the project
:CProjectConfigs my_c_project
<
This command will open a temporary buffer displaying some of the cdt
configuration values available to you. In this buffer you can add or
remove source directory references, include path references, and
symbols.
Here is a small example of what the contents may look like:
>
Config: Linux GCC
Sources: |add|
dir: src
Tool: GCC C Compiler
Includes: |add|
path: "${workspace_loc:/my_c_project/includes}"
Symbols: |add|
Tool: GCC Assembler
Includes: |add|
<
To add a source directory, include path, or symbol, simply move the
cursor over the relevant "|add|" link and hit <enter>. You will then
be prompted to enter an appropriate value. For your convenience, tab
completion is provided where possible.
Note: Despite the odd looking value in the includes path section
above, to add the entry you simply need to supply the project
relative path, "includes/" in this case, when prompted by the add
command.
If at any point you would like to remove a value, you can move the
cursor over the line of the value you would like to remove and hit D
(shift-d) to delete the entry.
vim:ft=eclimhelp

View file

@ -0,0 +1,131 @@
*vim-c-search.html*
C/C++ Search
************
*:CSearch*
Pattern Search
==============
Pattern searching provides a means to widen a search beyond a single
element. A pattern search can be executed using the command
:CSearch -p <pattern> [-t <type> -s <scope> -x <context> -i -a
<action>]
When there is more than 1 result, those results will be placed into
vim's quickfix list (:help quickfix) so that you can easily navigate
them using vim's quickfix commands.
Vim command completion is supported through out the command with the
exception of the pattern to search for.
>
:CSearch <Tab>
:CSearch -p MyClass* <Tab>
:CSearch -p MyClass* -t <Tab>
:CSearch -p MyClass* -t class <Tab>
:CSearch -p MyClass* -t class -s <Tab>
:CSearch -p MyClass* -t class -s project
:CSearch -p MyClass* -t class -s project <Tab>
:CSearch -p MyClass* -t class -s project -x <Tab>
:CSearch -p MyClass* -t class -s project -x declarations
<
- -p <pattern>: The pattern to search for.
Ex.
>
MyClass
myFunction
my*
<
- -t <type> (Default: all): The type of element to search for where
possible types include
- class_struct
- function
- variable
- union
- method
- field
- enum
- enumerator
- namespace
- typedef
- macro
- -s <scope> (Default: all): The scope of the search where possible
scope values include
- all - Search the whole workspace.
- project - Search the current project, dependent projects, and
include paths.
- -x <context> (Default: declarations): The context of the search,
where possible context values include
- all - Search for declarations and references.
- declarations - Search for declarations only.
- references - Search for all references.
- -i: Ignore case when searching.
- -a: The vim command to use to open the result (edit, split,
vsplit, etc).
Element Search
==============
Element searching allows you to place the cursor over just about any
element in a source file (method call, class name, constant) and
perform a search for that element. Performing an element search is
the same as performing a pattern search with the exception that you do
not specify the -p option since the element under the cursor will be
searched for instead.
If only one result is found and that result is in the current source
file, the cursor will be moved to the element found. Otherwise, on
single result matches, the value of |g:EclimCSearchSingleResult| will
be consulted for the action to take. If there are multiple results,
the quickfix list will be opened with the list of results.
*:CSearchContext*
As a convenience eclim also provides the command :CSearchContext. This
command accepts only the optional -a argument described above, and
will perform the appropriate search depending on the context of the
element under the cursor.
- If the cursor is on an #include name, it will search the
configured include path for the file.
- Otherwise, it will search for the definition of the element (if
the cursor is on the definition, then it will search for the
declaration).
Configuration
=============
Vim Settings (vim-settings)
*g:EclimCSearchSingleResult*
- g:EclimCSearchSingleResult (Default: 'split') - Determines what
action to take when a only a single result is found.
Possible values include:
- 'split' - open the result in a new window via "split".
- 'edit' - open the result in the current window.
- 'tabnew' - open the result in a new tab.
This setting overrides the global default for all supported language
types which can be set using the g:EclimDefaultFileOpenAction
setting which accepts the same possible values.
- g:EclimQuickFixOpen (Default: 'botright copen') Specifies the
command used to open the quickfix window when multiple results are
found.
- g:EclimQuickFixHeight (Default: 10) - Sets the height, in lines,
of the quickfix window when eclim opens it to display search
results.
vim:ft=eclimhelp

View file

@ -0,0 +1,48 @@
*vim-c-validate.html*
*:Validate_c*
C/C++ Validation
****************
When saving a c/c++ source file that resides in a project, eclim will
update that source file in Eclipse and will report any validation
errors found. Any errors will be placed in the current window's
location list (:help location-list) and the corresponding lines in the
source file will be marked via Vim's :sign functionality with '>>'
markers in the left margin.
Automatic validation of c/c++ source files can be disabled via the
g:EclimCValidate variable (described below). If you choose to disable
automatic validation, you can still use the :Validate command to
manually validate the current file.
Configuration
=============
Vim Settings (vim-settings)
*g:EclimCValidate*
- g:EclimCValidate (Default: 1) - If set to 0, disables source code
validation.
Note: When enabled, syntastic
(https://github.com/scrooloose/syntastic) is disabled so that
eclim and syntastic don't step on each other. If you'd like to use
syntastic over eclim for validation, then simply disable eclim's
validation.If you'd like to disable eclim's source code validation
for all languages, eclim provides a global variable for that as
well:>
let g:EclimFileTypeValidate = 0
<
- g:EclimValidateSortResults (Default: 'occurrence') - If set to
'severity', the validation results will be sorted by severity
(errors > warnings > info > etc.)
vim:ft=eclimhelp