Skip to content

Commit 681ab23

Browse files
authored
Update vim docs
1 parent e35c131 commit 681ab23

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

doc/youcompleteme.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2182,6 +2182,11 @@ See the file type feature summary for an overview of the features available for
21822182
each file type. See the _YcmCompleter subcommands_ section for more information
21832183
on the available subcommands and their usage.
21842184

2185+
Some commands, like |Format| accept a range, like ':%YcmCompleter Format'.
2186+
2187+
Some commands like |GetDoc| and the various |GoTo| commands respect modifiers,
2188+
like ':rightbelow YcmCompleter GetDoc', ':vertical YcmCompleter GoTo'.
2189+
21852190
-------------------------------------------------------------------------------
21862191
*youcompleteme-ycmcompleter-subcommands*
21872192
YcmCompleter Subcommands ~
@@ -2418,6 +2423,25 @@ under the cursor. Depending on the file type, this includes things like:
24182423
- Python docstrings,
24192424
- etc.
24202425

2426+
The documentation is opened in the preview window, and options like
2427+
'previewheight' are respected. If you would like to customise the height and
2428+
position of this window, we suggest a custom command that:
2429+
2430+
- Sets 'previewheight' temporarily
2431+
- Runs the |GetDoc| command with supplied modifiers
2432+
- Restores 'previewheight'.
2433+
2434+
For example:
2435+
>
2436+
command -count ShowDocWithSize
2437+
\ let g:ph=&previewheight
2438+
\ <bar> set previewheight=<count>
2439+
\ <bar> <mods> YcmCompleter GetDoc
2440+
\ <bar> let &previewheight=g:ph
2441+
<
2442+
You can then use something like ':botright vertical 80ShowDocWithSize'. Here's
2443+
an example of that: https://asciinema.org/a/hE6Pi1gU6omBShwFna8iwGEe9
2444+
24212445
Supported in filetypes: 'c, cpp, objc, objcpp, cuda, cs, go, java, javascript,
24222446
python, typescript, rust'
24232447

0 commit comments

Comments
 (0)