Add GoToInclude subcommand to documentation

This commit is contained in:
micbou 2015-10-20 15:06:49 +02:00
parent 76ff85bf75
commit 570444fc5a
2 changed files with 41 additions and 21 deletions

View File

@ -505,7 +505,7 @@ Quick Feature Summary
* Semantic auto-completion * Semantic auto-completion
* Real-time diagnostic display * Real-time diagnostic display
* Go to declaration/definition (`GoTo`, etc.) * Go to include/declaration/definition (`GoTo`, etc.)
* Semantic type information for identifiers (`GetType`) * Semantic type information for identifiers (`GetType`)
* Automatically fix certain errors (`FixIt`) * Automatically fix certain errors (`FixIt`)
* View documentation comments for identifiers (`GetDoc`) * View documentation comments for identifiers (`GetDoc`)
@ -855,6 +855,12 @@ The various `GoTo*` subcommands add entries to Vim's `jumplist` so you can use
`CTRL-O` to jump back to where you where before invoking the command (and `CTRL-O` to jump back to where you where before invoking the command (and
`CTRL-I` to jump forward; see `:h jumplist` for details). `CTRL-I` to jump forward; see `:h jumplist` for details).
### The `GoToInclude` subcommand
Looks up the current line for a header and jumps to it.
Supported in filetypes: `c, cpp, objc, objcpp`
### The `GoToDeclaration` subcommand ### The `GoToDeclaration` subcommand
Looks up the symbol under the cursor and jumps to its declaration. Looks up the symbol under the cursor and jumps to its declaration.
@ -877,8 +883,9 @@ Supported in filetypes: `c, cpp, objc, objcpp, python, cs, typescript`
This command tries to perform the "most sensible" GoTo operation it can. This command tries to perform the "most sensible" GoTo operation it can.
Currently, this means that it tries to look up the symbol under the cursor and Currently, this means that it tries to look up the symbol under the cursor and
jumps to its definition if possible; if the definition is not accessible from jumps to its definition if possible; if the definition is not accessible from
the current translation unit, jumps to the symbol's declaration. For C#, the current translation unit, jumps to the symbol's declaration. For
implementations are also considered and preferred. C/C++/Objective-C, it first tries to look up the current line for a header and
jump to it. For C#, implementations are also considered and preferred.
Supported in filetypes: `c, cpp, objc, objcpp, python, cs` Supported in filetypes: `c, cpp, objc, objcpp, python, cs`

View File

@ -37,21 +37,22 @@ Contents ~
5. The |:YcmDebugInfo| command 5. The |:YcmDebugInfo| command
6. The |:YcmCompleter| command 6. The |:YcmCompleter| command
7. YcmCompleter subcommands |youcompleteme-ycmcompleter-subcommands| 7. YcmCompleter subcommands |youcompleteme-ycmcompleter-subcommands|
1. The |GoToDeclaration| subcommand 1. The |GoToInclude| subcommand
2. The |GoToDefinition| subcommand 2. The |GoToDeclaration| subcommand
3. The |GoTo| subcommand 3. The |GoToDefinition| subcommand
4. The |GoToImprecise| subcommand 4. The |GoTo| subcommand
5. The |ClearCompilationFlagCache| subcommand 5. The |GoToImprecise| subcommand
6. The |GetType| subcommand 6. The |ClearCompilationFlagCache| subcommand
7. The |GetParent| subcommand 7. The |GetType| subcommand
8. The |FixIt| subcommand 8. The |GetParent| subcommand
9. The |GetDoc| subcommand 9. The |FixIt| subcommand
10. The |StartServer| subcommand 10. The |GetDoc| subcommand
11. The |StopServer| subcommand 11. The |StartServer| subcommand
12. The |RestartServer| subcommand 12. The |StopServer| subcommand
13. The |ReloadSolution| subcommand 13. The |RestartServer| subcommand
14. The |GoToImplementation| subcommand 14. The |ReloadSolution| subcommand
15. The |GoToImplementationElseDeclaration| subcommand 15. The |GoToImplementation| subcommand
16. The |GoToImplementationElseDeclaration| subcommand
8. Options |youcompleteme-options| 8. Options |youcompleteme-options|
1. The |g:ycm_min_num_of_chars_for_completion| option 1. The |g:ycm_min_num_of_chars_for_completion| option
2. The |g:ycm_min_num_identifier_candidate_chars| option 2. The |g:ycm_min_num_identifier_candidate_chars| option
@ -671,7 +672,7 @@ C-family languages (C, C++, Objective C, Objective C++) ~
- Semantic auto-completion - Semantic auto-completion
- Real-time diagnostic display - Real-time diagnostic display
- Go to declaration/definition (|GoTo|, etc.) - Go to include/declaration/definition (|GoTo|, etc.)
- Semantic type information for identifiers (|GetType|) - Semantic type information for identifiers (|GetType|)
- Automatically fix certain errors (|FixIt|) - Automatically fix certain errors (|FixIt|)
- View documentation comments for identifiers (|GetDoc|) - View documentation comments for identifiers (|GetDoc|)
@ -1063,6 +1064,13 @@ The various 'GoTo*' subcommands add entries to Vim's 'jumplist' so you can use
'CTRL-O' to jump back to where you where before invoking the command (and 'CTRL-O' to jump back to where you where before invoking the command (and
'CTRL-I' to jump forward; see ':h jumplist' for details). 'CTRL-I' to jump forward; see ':h jumplist' for details).
-------------------------------------------------------------------------------
The *GoToInclude* subcommand
Looks up the current line for a header and jumps to it.
Supported in filetypes: 'c, cpp, objc, objcpp'
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
The *GoToDeclaration* subcommand The *GoToDeclaration* subcommand
@ -1088,8 +1096,9 @@ The *GoTo* subcommand
This command tries to perform the "most sensible" GoTo operation it can. This command tries to perform the "most sensible" GoTo operation it can.
Currently, this means that it tries to look up the symbol under the cursor and Currently, this means that it tries to look up the symbol under the cursor and
jumps to its definition if possible; if the definition is not accessible from jumps to its definition if possible; if the definition is not accessible from
the current translation unit, jumps to the symbol's declaration. For C#, the current translation unit, jumps to the symbol's declaration. For
implementations are also considered and preferred. C/C++/Objective-C, it first tries to look up the current line for a header and
jump to it. For C#, implementations are also considered and preferred.
Supported in filetypes: 'c, cpp, objc, objcpp, python, cs' Supported in filetypes: 'c, cpp, objc, objcpp, python, cs'
@ -2273,6 +2282,10 @@ list "Exuberant Ctags".
Ctags needs to be called with the '--fields=+l' (that's a lowercase 'L', not a Ctags needs to be called with the '--fields=+l' (that's a lowercase 'L', not a
one) option because YCM needs the 'language:<lang>' field in the tags output. one) option because YCM needs the 'language:<lang>' field in the tags output.
NOTE: Exuberant Ctags [38] by default sets language tag for '*.h' files as
'C++'. If you have C (not C++) project, consider giving parameter '--
langmap=c:.c.h' to ctags to see tags from '*.h' files.
NOTE: Mac OS X comes with "plain" ctags installed by default. 'brew install NOTE: Mac OS X comes with "plain" ctags installed by default. 'brew install
ctags' will get you the Exuberant Ctags version. ctags' will get you the Exuberant Ctags version.