Update Vim documentation

This commit is contained in:
micbou 2016-06-11 05:19:22 +02:00
parent 4bbda99cc0
commit 6b6f326ffc

View File

@ -152,12 +152,14 @@ Contents ~
10. I get weird errors when I press 'Ctrl-C' in Vim |Ctrl-sub-C|
11. Why did YCM stop using Syntastic for diagnostics display? |youcompleteme-why-did-ycm-stop-using-syntastic-for-diagnostics-display|
12. Completion doesn't work with the C++ standard library headers |youcompleteme-completion-doesnt-work-with-c-standard-library-headers|
13. Install YCM with NeoBundle [56] |youcompleteme-install-ycm-with-neobundle-56|
13. Install YCM with NeoBundle [60] |youcompleteme-install-ycm-with-neobundle-60|
14. When I open a JavaScript file, I get an annoying warning about '.tern-project'
file |.tern-sub-project|
15. When I start vim I get a runtime error saying 'R6034 An application has made an
attempt to load the C runtime library incorrectly.' |R6034-An-application-has-made-an-attempt-to-load-the-C-runtime-library-incorrectly.|
16. I hear that YCM only supports Python 2, is that true? |youcompleteme-i-hear-that-ycm-only-supports-python-2-is-that-true|
17. On Windows I get "E887: Sorry, this command is disabled, the Python's site
module could not be loaded" |E887:-Sorry-this-command-is-disabled-the-Python-s-site-module-could-not-be-loaded|
12. Contributor Code of Conduct |youcompleteme-contributor-code-of-conduct|
13. Contact |youcompleteme-contact|
14. License |youcompleteme-license|
@ -360,23 +362,25 @@ Compiling YCM **without** semantic support for C-family languages:
<
The following additional language support options are available:
- C# support: add '--omnisharp-completer' when calling './install.py'.
- C# support: install Mono with Homebrew [20] or by downloading the Mono Mac
package [22] and add '--omnisharp-completer' when calling './install.py'.
- Go support: install go [22] and add '--gocode-completer' when calling
- Go support: install Go [23] and add '--gocode-completer' when calling
'./install.py'.
- TypeScript support: install nodejs and npm [23] then install the TypeScript
SDK with 'npm install -g typescript'.
- TypeScript support: install Node.js and npm [24] then install the
TypeScript SDK with 'npm install -g typescript'.
- JavaScript support: install nodejs and npm [23] and add '--tern-completer'
- JavaScript support: install Node.js and npm [24] and add '--tern-completer'
when calling './install.py'.
- Rust support: install rustc and cargo [24] and add '--racer-completer' when
calling './install.py'.
- Rust support: install Rust [25] and add '--racer-completer' when calling
'./install.py'.
To simply compile with everything enabled, there's a '--all' flag. So, to
install with all language features, ensure 'npm', 'go', 'mono', 'rust', and
'typescript' API are installed and in your 'PATH', then simply run:
install with all language features, ensure 'xbuild', 'go', 'tsserver', 'node',
'npm', 'rustc', and 'cargo' tools are installed and in your 'PATH', then simply
run:
>
cd ~/.vim/bundle/YouCompleteMe
./install.py --all
@ -400,7 +404,7 @@ provided on a best-effort basis and may not work for you.
Make sure you have Vim 7.3.598 with python2 or python3 support. Ubuntu 14.04
and later have a Vim that's recent enough. You can see the version of Vim
installed by running 'vim --version'. If the version is too old, you may need
to compile Vim from source [25] (don't worry, it's easy).
to compile Vim from source [26] (don't worry, it's easy).
Install YouCompleteMe with Vundle [19].
@ -426,23 +430,25 @@ Compiling YCM **without** semantic support for C-family languages:
<
The following additional language support options are available:
- C# support: add '--omnisharp-completer' when calling './install.py'.
- Go support: install go [22] and add '--gocode-completer' when calling
- C# support: install Mono [27] and add '--omnisharp-completer' when calling
'./install.py'.
- TypeScript support: install nodejs and npm [23] then install the TypeScript
SDK with 'npm install -g typescript'.
- Go support: install Go [23] and add '--gocode-completer' when calling
'./install.py'.
- JavaScript support: install nodejs and npm [23] and add '--tern-completer'
- TypeScript support: install Node.js and npm [24] then install the
TypeScript SDK with 'npm install -g typescript'.
- JavaScript support: install Node.js and npm [24] and add '--tern-completer'
when calling './install.py'.
- Rust support: install rustc and cargo [24] and add '--racer-completer' when
calling './install.py'.
- Rust support: install Rust [25] and add '--racer-completer' when calling
'./install.py'.
To simply compile with everything enabled, there's a '--all' flag. So, to
install with all language features, ensure 'npm', 'go', 'mono', 'rust', and
'typescript' API are installed and in your 'PATH', then simply run:
install with all language features, ensure 'xbuild', 'go', 'tsserver', 'node',
'npm', 'rustc', and 'cargo' tools are installed and in your 'PATH', then simply
run:
>
cd ~/.vim/bundle/YouCompleteMe
./install.py --all
@ -466,7 +472,7 @@ provided on a best-effort basis and may not work for you.
Make sure you have Vim 7.3.598 with Python 2 or Python 3 support. Fedora 21 and
later have a Vim that's recent enough. You can see the version of Vim installed
by running 'vim --version'. If the version is too old, you may need to compile
Vim from source [25] (don't worry, it's easy).
Vim from source [26] (don't worry, it's easy).
Install YouCompleteMe with Vundle [19].
@ -492,23 +498,25 @@ Compiling YCM **without** semantic support for C-family languages:
<
The following additional language support options are available:
- C# support: add '--omnisharp-completer' when calling './install.py'.
- Go support: install go [22] and add '--gocode-completer' when calling
- C# support: install Mono [28] and add '--omnisharp-completer' when calling
'./install.py'.
- TypeScript support: install nodejs and npm [23] then install the TypeScript
SDK with 'npm install -g typescript'.
- Go support: install Go [23] and add '--gocode-completer' when calling
'./install.py'.
- JavaScript support: install nodejs and npm [23] and add '--tern-completer'
- TypeScript support: install Node.js and npm [24] then install the
TypeScript SDK with 'npm install -g typescript'.
- JavaScript support: install Node.js and npm [24] and add '--tern-completer'
when calling './install.py'.
- Rust support: install rustc and cargo [24] and add '--racer-completer' when
calling './install.py'.
- Rust support: install Rust [25] and add '--racer-completer' when calling
'./install.py'.
To simply compile with everything enabled, there's a '--all' flag. So, to
install with all language features, ensure 'npm', 'go', 'mono', 'rust', and
'typescript' API are installed and in your 'PATH', then simply run:
install with all language features, ensure 'xbuild', 'go', 'tsserver', 'node',
'npm', 'rustc', and 'cargo' tools are installed and in your 'PATH', then simply
run:
>
cd ~/.vim/bundle/YouCompleteMe
./install.py --all
@ -538,7 +546,7 @@ Vim. Look at the features included: '+python/dyn' for Python 2 and
'+python3/dyn' for Python 3. Take note of the Vim architecture, i.e. 32 or
64-bit. It will be important when choosing the Python installer. We recommend
using a 64-bit client. Daily updated copies of 32-bit and 64-bit Vim with
Python 2 and Python 3 support [26] are available.
Python 2 and Python 3 support [29] are available.
Install YouCompleteMe with Vundle [19].
@ -548,16 +556,16 @@ will notify you to recompile it. You should then rerun the install process.
Download and install the following software:
- Python 2 or Python 3 [27]. Be sure to pick the version corresponding to
- Python 2 or Python 3 [30]. Be sure to pick the version corresponding to
your Vim architecture. It is _Windows x86_ for a 32-bit Vim and _Windows
x86-64_ for a 64-bit Vim. We recommend installing Python 3.
- CMake [21]. Add CMake executable to the PATH environment variable.
- Visual Studio [28]. Download the community edition. During setup, choose
- Visual Studio [31]. Download the community edition. During setup, choose
_Custom_ as the installation type and select the _Visual C++_ component.
- 7-zip [29]. Required to build YCM with semantic support for C-family
- 7-zip [32]. Required to build YCM with semantic support for C-family
languages.
Compiling YCM **with** semantic support for C-family languages:
@ -573,23 +581,23 @@ Compiling YCM **without** semantic support for C-family languages:
The following additional language support options are available:
- C# support: add '--omnisharp-completer' when calling |install.py|. Be sure
that the build utility 'msbuild' is in your PATH [30].
that the build utility 'msbuild' is in your PATH [33].
- Go support: install go [22] and add '--gocode-completer' when calling
- Go support: install Go [23] and add '--gocode-completer' when calling
|install.py|.
- TypeScript support: install nodejs and npm [23] then install the TypeScript
SDK with 'npm install -g typescript'.
- TypeScript support: install Node.js and npm [24] then install the
TypeScript SDK with 'npm install -g typescript'.
- JavaScript support: install nodejs and npm [23] and add '--tern-completer'
- JavaScript support: install Node.js and npm [24] and add '--tern-completer'
when calling |install.py|.
- Rust support: install rustc and cargo [24] and add '--racer-completer' when
calling |install.py|.
- Rust support: install Rust [25] and add '--racer-completer' when calling
|install.py|.
To simply compile with everything enabled, there's a '--all' flag. So, to
install with all language features, ensure 'npm', 'go', 'mono', 'rust', and
'typescript' API are installed and in your '%PATH%', then simply run:
install with all language features, ensure 'msbuild', 'go', 'tsserver', 'node',
'npm', and 'cargo' tools are installed and in your 'PATH', then simply run:
>
cd %USERPROFILE%/vimfiles/bundle/YouCompleteMe
python install.py --all
@ -645,23 +653,24 @@ Compiling YCM **without** semantic support for C-family languages:
<
The following additional language support options are available:
- C# support: add '--omnisharp-completer' when calling './install.py'.
- Go support: install go [22] and add '--gocode-completer' when calling
- C# support: install Mono and add '--omnisharp-completer' when calling
'./install.py'.
- TypeScript support: install nodejs and npm [23] then install the TypeScript
SDK with 'npm install -g typescript'.
- Go support: install Go [23] and add '--gocode-completer' when calling
'./install.py'.
- JavaScript support: install nodejs and npm [23] and add '--tern-completer'
- TypeScript support: install Node.js and npm [24] then install the
TypeScript SDK with 'npm install -g typescript'.
- JavaScript support: install Node.js and npm [24] and add '--tern-completer'
when calling './install.py'.
- Rust support: install rustc and cargo [24] and add '--racer-completer' when
calling './install.py'.
- Rust support: install Rust [25] and add '--racer-completer' when calling
'./install.py'.
To simply compile with everything enabled, there's a '--all' flag. So, to
install with all language features, ensure 'npm', 'go', 'mono', 'rust', and
'typescript' API are installed and in your 'PATH', then simply run:
install with all language features, ensure 'xbuild', 'go', 'tsserver', 'node',
'npm', and 'cargo' tools are installed and in your 'PATH', then simply run:
>
cd ~/.vim/bundle/YouCompleteMe
./install.py --all
@ -705,7 +714,7 @@ will notify you to recompile it. You should then rerun the install process.
1-Z', where Z will be some number. That number needs to be 598 or higher.
If your version of Vim is not recent enough, you may need to compile Vim
from source [25] (don't worry, it's easy).
from source [26] (don't worry, it's easy).
After you have made sure that you have Vim 7.3.598+, type the following
in Vim: ":echo has('python') || has('python3')". The output should be 1.
@ -715,9 +724,9 @@ will notify you to recompile it. You should then rerun the install process.
critical because it must match the Python and the YCM libraries
architectures. We recommend using a 64-bit Vim.
2. **Install YCM** with Vundle [19] (or Pathogen [31], but Vundle is a
2. **Install YCM** with Vundle [19] (or Pathogen [34], but Vundle is a
better idea). With Vundle, this would mean adding a "Plugin
'Valloric/YouCompleteMe'" line to your vimrc [32].
'Valloric/YouCompleteMe'" line to your vimrc [35].
If you don't install YCM with Vundle, make sure you have run 'git
submodule update --init --recursive' after checking out the YCM
@ -734,7 +743,7 @@ will notify you to recompile it. You should then rerun the install process.
You can use the system libclang _only if you are sure it is version 3.8
or higher_, otherwise don't. Even if it is, we recommend using the
official binaries from llvm.org [33] if at all possible. Make sure you
official binaries from llvm.org [36] if at all possible. Make sure you
download the correct archive file for your OS.
We **STRONGLY recommend AGAINST use** of the system libclang instead of
@ -754,10 +763,10 @@ will notify you to recompile it. You should then rerun the install process.
a Debian-like Linux distro, this would be 'sudo apt-get install python-
dev python3-dev'. On Mac they should already be present.
On Windows, you need to download and install Python 2 or Python 3 [27].
On Windows, you need to download and install Python 2 or Python 3 [30].
Pick the version corresponding to your Vim architecture. You will also
need Microsoft Visual C++ (MSVC) to build YCM. You can obtain it by
installing Visual Studio [28]. MSVC 11 (Visual Studio 2012), 12 (2013),
installing Visual Studio [31]. MSVC 11 (Visual Studio 2012), 12 (2013),
and 14 (2015) are officially supported.
Here we'll assume you installed YCM with Vundle. That means that the top-
@ -800,7 +809,7 @@ will notify you to recompile it. You should then rerun the install process.
extracted the archive file to folder '~/ycm_temp/llvm_root_dir' (with
'bin', 'lib', 'include' etc. folders right inside that folder). On
Windows, you can extract the files from the LLVM+Clang installer using
7-zip [29].
7-zip [32].
NOTE: This _only_ works with a _downloaded_ LLVM binary package, not a
custom-built LLVM! See docs below for 'EXTERNAL_LIBCLANG_PATH' when using
@ -841,24 +850,23 @@ will notify you to recompile it. You should then rerun the install process.
5. Set up support for additional languages, as desired:
6. C# support: Navigate to
6. C# support: install Mono on non-Windows platforms [37]. Navigate to
'YouCompleteMe/third_party/ycmd/third_party/OmniSharpServer' and run
'msbuild' (Windows) or 'xbuild' (other platforms, using mono) depending
on your platform. If mono is not installed, install it. When on Windows,
be sure that the build utility 'msbuild' is in your PATH [30].
'msbuild' (Windows) or 'xbuild' (other platforms, using Mono) depending
on your platform. On Windows, be sure that the build utility 'msbuild' is
in your PATH [33].
7. Go support: If go is not installed on your system, install it [22] and
add it to your path. Navigate to
7. Go support: install Go [23] and add it to your path. Navigate to
'YouCompleteMe/third_party/ycmd/third_party/gocode' and run 'go build'.
8. TypeScript support: As with the quick installation, simply 'npm install
-g typescript' after successfully installing nodejs and npm [23].
8. TypeScript support: as with the quick installation, simply 'npm install
-g typescript' after successfully installing Node.js and npm [24].
9. JavaScript support: Install nodejs and npm [23]. Then navigate to
9. JavaScript support: install Node.js and npm [24]. Then navigate to
'YouCompleteMe/third_party/ycmd/third_party/tern_runtime' and run 'npm
install --production'
10. Rust support: Install rustc and cargo [24]. Navigate to
10. Rust support: install Rust [25]. Navigate to
'YouCompleteMe/third_party/ycmd/third_party/racerd' and run 'cargo
build --release'.
@ -977,7 +985,7 @@ General Usage ~
through the completions. Use Shift-TAB to cycle backwards. Note that if
you're using console Vim (that is, not Gvim or MacVim) then it's likely
that the Shift-TAB binding will not work because the console will not pass
it to Vim. You can remap the keys; see the _Options [34]_ section below.
it to Vim. You can remap the keys; see the _Options [38]_ section below.
Knowing a little bit about how YCM works internally will prevent confusion. YCM
has several completion engines: an identifier-based completer that collects all
@ -1004,7 +1012,7 @@ and presents the results to you.
Client-Server Architecture ~
YCM has a client-server architecture; the Vim part of YCM is only a thin client
that talks to the ycmd HTTP+JSON server [35] that has the vast majority of YCM
that talks to the ycmd HTTP+JSON server [39] that has the vast majority of YCM
logic and functionality. The server is started and stopped automatically as you
start and stop Vim.
@ -1048,20 +1056,20 @@ This system was designed this way so that the user can perform any arbitrary
sequence of operations to produce a list of compilation flags YCM should hand
to Clang.
See YCM's own '.ycm_extra_conf.py' [36] for details on how this works. You
See YCM's own '.ycm_extra_conf.py' [40] for details on how this works. You
should be able to use it _as a starting point_. **Don't** just copy/paste that
file somewhere and expect things to magically work; **your project needs
different flags**. Hint: just replace the strings in the 'flags' variable with
compilation flags necessary for your project. That should be enough for 99% of
projects.
Yes, Clang's 'CompilationDatabase' system [37] is also supported. Again, see
Yes, Clang's 'CompilationDatabase' system [41] is also supported. Again, see
the above linked example file. You can get CMake to generate this file for you
by adding 'set( CMAKE_EXPORT_COMPILE_COMMANDS 1 )' to your project's
'CMakeLists.txt' file (if using CMake). If you're not using CMake, you could
use something like Bear [38] to generate the 'compile_commands.json' file.
use something like Bear [42] to generate the 'compile_commands.json' file.
Consider using YCM-Generator [39] to generate the 'ycm_extra_conf.py' file.
Consider using YCM-Generator [43] to generate the 'ycm_extra_conf.py' file.
If Clang encounters errors when compiling the header files that your file
includes, then it's probably going to take a long time to get completions. When
@ -1086,7 +1094,7 @@ Quick start ~
guide for details.
2. Create a '.tern-project' file in the root directory of your JavaScript
project, by following the instructions [40] in the Tern [12]
project, by following the instructions [44] in the Tern [12]
documentation.
3. Make sure that Vim's working directory is a descendent of that directory
@ -1097,13 +1105,13 @@ Quick start ~
Explanation ~
JavaScript completion is based on Tern [12]. This completion engine requires a
file named '.tern-project' [40] to exist in the current working directory or a
file named '.tern-project' [44] to exist in the current working directory or a
directory which is an ancestor of the current working directory when the tern
server is started. YCM starts the Tern server the first time a JavaScript file
is edited, so Vim's working directory at that time needs to be a descendent of
the directory containing the '.tern-project' file (or that directory itself).
Alternatively, as described in the Tern documentation [41], a global '.tern-
Alternatively, as described in the Tern documentation [45], a global '.tern-
config' file may be used.
Multiple Tern servers, are not supported. To switch to a different JavaScript
@ -1112,7 +1120,7 @@ project, you can do one of the following:
- start a new instance of Vim from the new project's directory
- change Vim's working directory (':cd /path/to/new/project') and restart the
ycmd server [35] (|:YcmRestartServer|)
ycmd server [39] (|:YcmRestartServer|)
- change Vim's working directory (':cd /path/to/new/project'), open a
JavaScript file (or set filetype to JavaScript) and restart the Tern server
@ -1125,9 +1133,9 @@ Tips and tricks ~
This section contains some advice for configuring '.tern-project' and working
with JavaScript files. The canonical reference for correctly configuring Tern
is the Tern documentation [41]. Any issues, improvements, advice, etc. should
is the Tern documentation [45]. Any issues, improvements, advice, etc. should
be sought from the Tern [12] project. For example, see the list of tern plugins
[42] for the list of plugins which can be enabled in the 'plugins' section of
[46] for the list of plugins which can be enabled in the 'plugins' section of
the '.tern-project' file.
-------------------------------------------------------------------------------
@ -1179,7 +1187,7 @@ Completions and GoTo commands within the current crate and its dependencies
should work out of the box with no additional configuration (provided that you
built YCM with the '--racer-completer' flag; see the _Installation_ section for
details). For semantic analysis inclusive of the standard library, you must
have a local copy of the rust source code [43]. You also need to set the
have a local copy of the rust source code [47]. You also need to set the
following option so YouCompleteMe can locate it.
>
" In this example, the rust source code zip has been extracted to
@ -1194,7 +1202,7 @@ Completion and GoTo commands work out of the box with no additional
configuration. Those features are provided by the jedi [6] library which
supports a variety of Python versions (2.6, 2.7, 3.2+) as long as it runs in
the corresponding Python interpreter. By default YCM runs jedi [6] with the
same Python interpreter used by the ycmd server [35], so if you would like to
same Python interpreter used by the ycmd server [39], so if you would like to
use a different interpreter, use the following option specifying the Python
binary to use. For example, to provide Python 3 completion in your project,
set:
@ -1215,7 +1223,7 @@ semantic completions if it does not have a native semantic completion engine
for your file's filetype. Vim comes with okayish omnifuncs for various
languages like Ruby, PHP etc. It depends on the language.
You can get stellar omnifuncs for Java and Ruby with Eclim [44]. Just make sure
You can get stellar omnifuncs for Java and Ruby with Eclim [48]. Just make sure
you have the _latest_ Eclim installed and configured (this means Eclim '>=
2.2.*' and Eclipse '>= 4.2.*').
@ -1233,7 +1241,7 @@ Writing New Semantic Completers ~
You have two options here: writing an 'omnifunc' for Vim's omnicomplete system
that YCM will then use through its omni-completer, or a custom completer for
YCM using the Completer API [45].
YCM using the Completer API [49].
Here are the differences between the two approaches:
@ -1252,7 +1260,7 @@ Here are the differences between the two approaches:
than VimScript.
If you want to use the 'omnifunc' system, see the relevant Vim docs with ':h
complete-functions'. For the Completer API, see the API docs [45].
complete-functions'. For the Completer API, see the API docs [49].
If you want to upstream your completer into YCM's source, you should use the
Completer API.
@ -1303,7 +1311,7 @@ current file in Vim's 'locationlist', which can be opened with the ':lopen' and
':lclose' commands (make sure you have set 'let
g:ycm_always_populate_location_list = 1' in your vimrc). A good way to toggle
the display of the 'locationlist' with a single key mapping is provided by
another (very small) Vim plugin called ListToggle [46] (which also makes it
another (very small) Vim plugin called ListToggle [50] (which also makes it
possible to change the height of the 'locationlist' window), also written by
yours truly.
@ -1345,7 +1353,7 @@ Commands ~
-------------------------------------------------------------------------------
The *:YcmRestartServer* command
If the ycmd completion server [35] suddenly stops for some reason, you can
If the ycmd completion server [39] suddenly stops for some reason, you can
restart it with this command.
-------------------------------------------------------------------------------
@ -1393,7 +1401,7 @@ semantic completion engine.
The *:YcmToggleLogs* command
This command automatically opens in windows the stdout and stderr logfiles
written by the ycmd server [35]. If one or both logfiles are already opened,
written by the ycmd server [39]. If one or both logfiles are already opened,
they are automatically closed. 'stderr' or 'stdout' can be specified as an
argument of this command to only open the corresponding logfile instead of
both. If this logfile is already opened, it will be closed. Only for debugging
@ -1764,7 +1772,7 @@ For example:
call youcompleteme#GetErrorCount()
<
Both this function and |youcompleteme#GetWarningCount| can be useful when
integrating YCM with other Vim plugins. For example, a lightline [47] user
integrating YCM with other Vim plugins. For example, a lightline [51] user
could add a diagnostics section to their statusline which would display the
number of errors and warnings.
@ -1784,11 +1792,11 @@ Options ~
All options have reasonable defaults so if the plug-in works after installation
you don't need to change any options. These options can be configured in your
vimrc script [32] by including a line like this:
vimrc script [35] by including a line like this:
>
let g:ycm_min_num_of_chars_for_completion = 1
<
Note that after changing an option in your vimrc script [32] you have to
Note that after changing an option in your vimrc script [35] you have to
restart Vim for the changes to take effect.
-------------------------------------------------------------------------------
@ -2109,7 +2117,7 @@ from the 'tagfiles()' Vim function which examines the 'tags' Vim option. See
YCM will re-index your tags files if it detects that they have been modified.
The only supported tag format is the Exuberant Ctags format [48]. The format
The only supported tag format is the Exuberant Ctags format [52]. The format
from "plain" ctags is NOT supported. Ctags needs to be called with the '--
fields=+l' option (that's a lowercase 'L', not a one) because YCM needs the
'language:<lang>' field in the tags output.
@ -2146,7 +2154,7 @@ handy; it's a way of sending data from Vim to your 'FlagsForFile' function in
your '.ycm_extra_conf.py' file.
This option is supposed to be a list of VimScript expression strings that are
evaluated for every request to the ycmd server [35] and then passed to your
evaluated for every request to the ycmd server [39] and then passed to your
'FlagsForFile' function as a 'client_data' keyword argument.
For instance, if you set this option to "['v:version']", your 'FlagsForFile'
@ -2175,7 +2183,7 @@ YCM will by default search for an appropriate Python interpreter on your
system. You can use this option to override that behavior and force the use of
a specific interpreter of your choosing.
NOTE: This interpreter is only used for the ycmd server [35]. The YCM client
NOTE: This interpreter is only used for the ycmd server [39]. The YCM client
running inside Vim always uses the Python interpreter that's embedded inside
Vim.
@ -2186,7 +2194,7 @@ Default: "''"
-------------------------------------------------------------------------------
The *g:ycm_server_keep_logfiles* option
When this option is set to '1', the ycmd completion server [35] will keep the
When this option is set to '1', the ycmd completion server [39] will keep the
logfiles around after shutting down (they are deleted on shutdown by default).
To see where the logfiles are, call |:YcmDebugInfo|.
@ -2198,7 +2206,7 @@ Default: '0'
-------------------------------------------------------------------------------
The *g:ycm_server_log_level* option
The logging level that the ycmd completion server [35] uses. Valid values are
The logging level that the ycmd completion server [39] uses. Valid values are
the following, from most verbose to least verbose: - 'debug' - 'info' -
'warning' - 'error' - 'critical'
@ -2476,7 +2484,7 @@ It's also possible to use a regular expression as a trigger. You have to prefix
your trigger with 're!' to signify it's a regex trigger. For instance,
're!\w+\.' would only trigger after the '\w+\.' regex matches.
NOTE: The regex syntax is **NOT** Vim's, it's Python's [49].
NOTE: The regex syntax is **NOT** Vim's, it's Python's [53].
Default: '[see next line]'
>
@ -2546,7 +2554,7 @@ The *g:ycm_python_binary_path* option
This option specifies the Python interpreter to use to run the jedi [6]
completion library. Specify the Python interpreter to use to get completions.
By default the Python under which ycmd [35] runs is used (ycmd [35] runs on
By default the Python under which ycmd [39] runs is used (ycmd [39] runs on
Python 2.6, 2.7 or 3.3+).
Default: "''"
@ -2562,7 +2570,7 @@ FAQ ~
I used to be able to 'import vim' in '.ycm_extra_conf.py', but now can't ~
YCM was rewritten to use a client-server architecture where most of the logic
is in the ycmd server [35]. So the magic 'vim' module you could have previously
is in the ycmd server [39]. So the magic 'vim' module you could have previously
imported in your '.ycm_extra_conf.py' files doesn't exist anymore.
To be fair, importing the magic 'vim' module in extra conf files was never
@ -2637,7 +2645,7 @@ to the message log if it encounters problems. It's likely you misconfigured
something and YCM is complaining about it.
Also, you may want to run the |:YcmDebugInfo| command; it will make YCM spew
out various debugging information, including the ycmd [35] logfile paths and
out various debugging information, including the ycmd [39] logfile paths and
the compile flags for the current file if the file is a C-family language file
and you have compiled in Clang support. Logfiles can be automatically opened in
the editor using the |:YcmToggleLogs| command.
@ -2702,7 +2710,7 @@ I have a Homebrew Python and/or MacVim; can't compile/SIGABRT when starting ~
You should probably run 'brew rm python; brew install python' to get the latest
fixes that should make YCM work with such a configuration. Also rebuild Macvim
then. If you still get problems with this, see issue #18 [50] for suggestions.
then. If you still get problems with this, see issue #18 [54] for suggestions.
-------------------------------------------------------------------------------
*youcompleteme-vim-segfaults-when-i-use-semantic-completer-in-ruby-files*
@ -2807,15 +2815,15 @@ YCM does not read identifiers from my tags files ~
First, put 'let g:ycm_collect_identifiers_from_tags_files = 1' in your vimrc.
Make sure you are using Exuberant Ctags [51] to produce your tags files since
the only supported tag format is the Exuberant Ctags format [48]. The format
Make sure you are using Exuberant Ctags [55] to produce your tags files since
the only supported tag format is the Exuberant Ctags format [52]. The format
from "plain" ctags is NOT supported. The output of 'ctags --version' should
list "Exuberant Ctags".
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.
NOTE: Exuberant Ctags [51] by default sets language tag for '*.h' files as
NOTE: Exuberant Ctags [55] 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.
@ -2886,7 +2894,7 @@ and similar, then just update to Vim 7.4.314 (or later) and they'll go away.
*vim-sub-autoclose*
Nasty bugs happen if I have the 'vim-autoclose' plugin installed ~
Use the delimitMate [52] plugin instead. It does the same thing without
Use the delimitMate [56] plugin instead. It does the same thing without
conflicting with YCM.
-------------------------------------------------------------------------------
@ -2894,7 +2902,7 @@ conflicting with YCM.
Is there some sort of YCM mailing list? I have questions ~
If you have questions about the plugin or need help, please use the ycm-users
[53] mailing list, _don't_ create issues on the tracker. The tracker is for bug
[57] mailing list, _don't_ create issues on the tracker. The tracker is for bug
reports and feature requests.
-------------------------------------------------------------------------------
@ -2948,7 +2956,7 @@ mismatch in assumptions causes performance problems since Syntastic code isn't
optimized for this use case of constant diagnostic refreshing.
Poor support for this use case also led to crash bugs in Vim caused by
Syntastic-Vim interactions (issue #593 [54]) and other problems, like random
Syntastic-Vim interactions (issue #593 [58]) and other problems, like random
Vim flickering. Attempts were made to resolve these issues in Syntastic, but
ultimately some of them failed (for various reasons).
@ -2984,13 +2992,13 @@ paths, prepend '-isystem' to each individual path and append them all to the
list of flags you return from your 'FlagsForFile' function in your
'.ycm_extra_conf.py' file.
See issue #303 [55] for details.
See issue #303 [59] for details.
-------------------------------------------------------------------------------
*youcompleteme-install-ycm-with-neobundle-56*
Install YCM with NeoBundle [56] ~
*youcompleteme-install-ycm-with-neobundle-60*
Install YCM with NeoBundle [60] ~
NeoBundle [56] can do the compilation for you; just add the following to your
NeoBundle [60] can do the compilation for you; just add the following to your
vimrc:
>
NeoBundle 'Valloric/YouCompleteMe', {
@ -3025,7 +3033,7 @@ When I start vim I get a runtime error saying 'R6034 An application has made ~
an attempt to load the C runtime library incorrectly.' ~
CMake and other things seem to screw up the PATH with their own msvcrXX.dll
versions. [57] Add the following to the very top of your vimrc to remove these
versions. [61] Add the following to the very top of your vimrc to remove these
entries from the path.
>
python << EOF
@ -3050,27 +3058,36 @@ entries from the path.
*youcompleteme-i-hear-that-ycm-only-supports-python-2-is-that-true*
I hear that YCM only supports Python 2, is that true? ~
**No.** Both the Vim client and the ycmd server [35] run on Python 2 or 3. If
**No.** Both the Vim client and the ycmd server [39] run on Python 2 or 3. If
you work on a Python 3 project, you may need to set |g:ycm_python_binary_path|
to the Python interpreter you use for your project to get completions for that
version of Python.
-------------------------------------------------------------------------------
*E887:-Sorry-this-command-is-disabled-the-Python-s-site-module-could-not-be-loaded*
On Windows I get "E887: Sorry, this command is disabled, the Python's site ~
module could not be loaded" ~
If you are running vim on Windows with Python 2.7.11, this is likely caused by
a bug [62]. Follow this workaround [63] or use a different version (Python
2.7.9 does not suffer from the bug).
===============================================================================
*youcompleteme-contributor-code-of-conduct*
Contributor Code of Conduct ~
Please note that this project is released with a Contributor Code of Conduct
[58]. By participating in this project you agree to abide by its terms.
[64]. By participating in this project you agree to abide by its terms.
===============================================================================
*youcompleteme-contact*
Contact ~
If you have questions about the plugin or need help, please use the ycm-users
[53] mailing list.
[57] mailing list.
If you have bug reports or feature suggestions, please use the issue tracker
[59].
[65].
The latest version of the plugin is available at
http://valloric.github.io/YouCompleteMe/.
@ -3081,10 +3098,10 @@ The author's homepage is http://val.markovic.io.
*youcompleteme-license*
License ~
This software is licensed under the GPL v3 license [60]. © 2015-2016
This software is licensed under the GPL v3 license [66]. © 2015-2016
YouCompleteMe contributors
Image: Bitdeli Badge [61]
Image: Bitdeli Badge [67]
===============================================================================
*youcompleteme-references*
@ -3111,46 +3128,52 @@ References ~
[19] https://github.com/VundleVim/Vundle.vim#about
[20] http://brew.sh
[21] https://cmake.org/download/
[22] https://golang.org/doc/install
[23] https://docs.npmjs.com/getting-started/installing-node
[24] https://www.rust-lang.org/
[25] https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source
[26] https://bintray.com/micbou/generic/vim
[27] https://www.python.org/downloads/windows/
[28] https://www.visualstudio.com/products/free-developer-offers-vs.aspx
[29] http://www.7-zip.org/download.html
[30] http://stackoverflow.com/questions/6319274/how-do-i-run-msbuild-from-the-command-line-using-windows-sdk-7-1
[31] https://github.com/tpope/vim-pathogen#pathogenvim
[32] http://vimhelp.appspot.com/starting.txt.html#vimrc
[33] http://llvm.org/releases/download.html
[34] https://github.com/Valloric/YouCompleteMe#options
[35] https://github.com/Valloric/ycmd
[36] https://github.com/Valloric/ycmd/blob/master/cpp/ycm/.ycm_extra_conf.py
[37] http://clang.llvm.org/docs/JSONCompilationDatabase.html
[38] https://github.com/rizsotto/Bear
[39] https://github.com/rdnetto/YCM-Generator
[40] http://ternjs.net/doc/manual.html#configuration
[41] http://ternjs.net/doc/manual.html#server
[42] http://ternjs.net/doc/manual.html#plugins
[43] https://www.rust-lang.org/downloads.html
[44] http://eclim.org/
[45] https://github.com/Valloric/ycmd/blob/master/ycmd/completers/completer.py
[46] https://github.com/Valloric/ListToggle
[47] https://github.com/itchyny/lightline.vim
[48] http://ctags.sourceforge.net/FORMAT
[49] https://docs.python.org/2/library/re.html#regular-expression-syntax
[50] https://github.com/Valloric/YouCompleteMe/issues/18
[51] http://ctags.sourceforge.net/
[52] https://github.com/Raimondi/delimitMate
[53] https://groups.google.com/forum/?hl=en#!forum/ycm-users
[54] https://github.com/Valloric/YouCompleteMe/issues/593
[55] https://github.com/Valloric/YouCompleteMe/issues/303
[56] https://github.com/Shougo/neobundle.vim
[57] http://stackoverflow.com/questions/14552348/runtime-error-r6034-in-embedded-python-application/34696022
[58] https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md
[59] https://github.com/Valloric/YouCompleteMe/issues?state=open
[60] http://www.gnu.org/copyleft/gpl.html
[61] https://bitdeli.com/free
[62] https://d2weczhvl823v0.cloudfront.net/Valloric/youcompleteme/trend.png
[22] http://www.mono-project.com/docs/getting-started/install/mac/
[23] https://golang.org/doc/install
[24] https://docs.npmjs.com/getting-started/installing-node
[25] https://www.rust-lang.org/
[26] https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source
[27] http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives
[28] http://www.mono-project.com/docs/getting-started/install/linux/#centos-7-fedora-19-and-later-and-derivatives
[29] https://bintray.com/micbou/generic/vim
[30] https://www.python.org/downloads/windows/
[31] https://www.visualstudio.com/products/free-developer-offers-vs.aspx
[32] http://www.7-zip.org/download.html
[33] http://stackoverflow.com/questions/6319274/how-do-i-run-msbuild-from-the-command-line-using-windows-sdk-7-1
[34] https://github.com/tpope/vim-pathogen#pathogenvim
[35] http://vimhelp.appspot.com/starting.txt.html#vimrc
[36] http://llvm.org/releases/download.html
[37] http://www.mono-project.com/docs/getting-started/install/
[38] https://github.com/Valloric/YouCompleteMe#options
[39] https://github.com/Valloric/ycmd
[40] https://github.com/Valloric/ycmd/blob/master/cpp/ycm/.ycm_extra_conf.py
[41] http://clang.llvm.org/docs/JSONCompilationDatabase.html
[42] https://github.com/rizsotto/Bear
[43] https://github.com/rdnetto/YCM-Generator
[44] http://ternjs.net/doc/manual.html#configuration
[45] http://ternjs.net/doc/manual.html#server
[46] http://ternjs.net/doc/manual.html#plugins
[47] https://www.rust-lang.org/downloads.html
[48] http://eclim.org/
[49] https://github.com/Valloric/ycmd/blob/master/ycmd/completers/completer.py
[50] https://github.com/Valloric/ListToggle
[51] https://github.com/itchyny/lightline.vim
[52] http://ctags.sourceforge.net/FORMAT
[53] https://docs.python.org/2/library/re.html#regular-expression-syntax
[54] https://github.com/Valloric/YouCompleteMe/issues/18
[55] http://ctags.sourceforge.net/
[56] https://github.com/Raimondi/delimitMate
[57] https://groups.google.com/forum/?hl=en#!forum/ycm-users
[58] https://github.com/Valloric/YouCompleteMe/issues/593
[59] https://github.com/Valloric/YouCompleteMe/issues/303
[60] https://github.com/Shougo/neobundle.vim
[61] http://stackoverflow.com/questions/14552348/runtime-error-r6034-in-embedded-python-application/34696022
[62] https://github.com/vim/vim/issues/717
[63] https://github.com/vim/vim-win32-installer/blob/master/appveyor.bat#L90
[64] https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md
[65] https://github.com/Valloric/YouCompleteMe/issues?state=open
[66] http://www.gnu.org/copyleft/gpl.html
[67] https://bitdeli.com/free
[68] https://d2weczhvl823v0.cloudfront.net/Valloric/youcompleteme/trend.png
vim: ft=help