Instruct users to install MacVim with Homebrew

Replace Mac and Mac OS X with macOS and remove outdated entries about
Homebrew in the FAQ.
This commit is contained in:
micbou 2019-05-04 22:29:50 +02:00
parent d691404ae2
commit efdf6e034d
No known key found for this signature in database
GPG Key ID: C7E8FD1F3BDA1E05
2 changed files with 146 additions and 202 deletions

View File

@ -33,7 +33,7 @@ Contents
- [Intro](#intro)
- [Installation](#installation)
- [Mac OS X](#mac-os-x)
- [macOS](#macos)
- [Linux 64-bit](#linux-64-bit)
- [Windows](#windows)
- [FreeBSD/OpenBSD](#freebsdopenbsd)
@ -164,23 +164,18 @@ and a completer that integrates with [UltiSnips][].
Installation
------------
### Mac OS X
### macOS
These instructions (using `install.py`) are the quickest way to install
YouCompleteMe, however they may not work for everyone. If the following
instructions don't work for you, check out the [full installation
guide](#full-installation-guide).
Install the latest version of [MacVim][]. Yes, MacVim. And yes, the _latest_.
[MacVim][] is required. YCM won't work with the pre-installed Vim from Apple as
its Python support is broken. If you don't already use [MacVim][], install it
with [Homebrew][brew]. Install CMake as well:
If you don't use the MacVim GUI, it is recommended to use the Vim binary that is
inside the MacVim.app package (`MacVim.app/Contents/MacOS/Vim`). To ensure it
works correctly copy the `mvim` script from the [MacVim][] download to your
local binary folder (for example `/usr/local/bin/mvim`) and then symlink it:
ln -s /usr/local/bin/mvim vim
Install YouCompleteMe with [Vundle][].
brew install cmake macvim
**Remember:** YCM is a plugin with a compiled component. If you **update** YCM
using Vundle and the ycm_core library APIs have changed (happens
@ -192,12 +187,6 @@ installed along with the latest Command Line Tools (they are installed
automatically when you run `clang` for the first time, or manually by running
`xcode-select --install`)
Install CMake. Preferably with [Homebrew][brew], but here's the [stand-alone
CMake installer][cmake-download].
_If_ you have installed a Homebrew Python and/or Homebrew MacVim, see the _FAQ_
for details.
Compiling YCM **with** semantic support for C-family languages through
**libclang**:
@ -225,8 +214,8 @@ Compiling YCM **without** semantic support for C-family languages:
The following additional language support options are available:
- C# support: install Mono with [Homebrew][brew] or by downloading the [Mono Mac
package][mono-install-osx] and add `--cs-completer` when calling
- C# support: install Mono with [Homebrew][brew] or by downloading the [Mono
macOS package][mono-install-macos] and add `--cs-completer` when calling
`install.py`.
- Go support: install [Go][go-install] and add `--go-completer` when calling
`install.py`.
@ -616,12 +605,12 @@ process.
You will need to have `cmake` installed in order to generate the required
makefiles. Linux users can install cmake with their package manager (`sudo
apt-get install cmake` for Ubuntu) whereas other users can [download and
install][cmake-download] cmake from its project site. Mac users can also get
it through [Homebrew][brew] with `brew install cmake`.
install][cmake-download] cmake from its project site. macOS users can also
get it through [Homebrew][brew] with `brew install cmake`.
On a Unix OS, you need to make sure you have Python headers installed. On a
Debian-like Linux distro, this would be `sudo apt-get install python-dev
python3-dev`. On Mac they should already be present.
python3-dev`. On macOS they should already be present.
On Windows, you need to download and install [Python 2 or
Python 3][python-win-download]. Pick the version corresponding to your Vim
@ -700,7 +689,7 @@ process.
You could also force the use of a custom libclang library with
`-DEXTERNAL_LIBCLANG_PATH=/path/to/libclang.so` flag (the library would end
with `.dylib` on a Mac). Again, this flag would be used _instead of_ the
with `.dylib` on macOS). Again, this flag would be used _instead of_ the
other flags. **If you compiled LLVM from source, this is the flag you should
be using.**
@ -3088,7 +3077,7 @@ specific Python interpreter for `ycmd` is usually the easiest way to solve the
problem. Common values for that option are `/usr/bin/python` and
`/usr/bin/python3`.
### I get a linker warning regarding `libpython` on Mac when compiling YCM
### I get a linker warning regarding `libpython` on macOS when compiling YCM
If the warning is `ld: warning: path '/usr/lib/libpython2.7.dylib' following -L
not a directory`, then feel free to ignore it; it's caused by a limitation of
@ -3165,24 +3154,10 @@ Your system is too old for the precompiled binaries from llvm.org. Compile
Clang on your machine and then link against the `libclang.so` you just produced.
See the full installation guide for help.
### I'm trying to use a Homebrew Vim with YCM and I'm getting segfaults
Something (I don't know what) is wrong with the way that Homebrew configures and
builds Vim. I recommend using [MacVim][]. Even if you don't like the MacVim GUI,
you can use the Vim binary that is inside the MacVim.app package (it's
`MacVim.app/Contents/MacOS/Vim`) and get the Vim console experience.
### 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][issue18] for
suggestions.
### I get `LONG_BIT definition appears wrong for platform` when compiling
Look at the output of your CMake call. There should be a line in it like the
following (with `.dylib` in place of `.so` on a Mac):
following (with `.dylib` in place of `.so` on macOS):
```
-- Found PythonLibs: /usr/lib/libpython2.7.so (Required is at least version "2.5")
@ -3205,7 +3180,7 @@ version for the library. This is wrong. It can happen when you have multiple
versions of Python installed on your machine.
You should probably add the following flags to your cmake call (again, `dylib`
instead of `so` on a Mac):
instead of `so` on macOS):
```
-DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so
@ -3251,7 +3226,7 @@ The details aren't important.
The solution is that the version of Python linked and run against must be built
with either `--enable-shared` or `--enable-framework` (on OS X).
This is achieved as follows (**NOTE:** for Mac, replace `--enable-shared`
This is achieved as follows (**NOTE:** for macOS, replace `--enable-shared`
with `--enable-framework`):
- When building python from source: `./configure --enable-shared {options}`
@ -3281,7 +3256,7 @@ one) option because YCM needs the `language:<lang>` field in the tags output.
`*.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:** macOS comes with "plain" ctags installed by default. `brew install
ctags` will get you the Exuberant Ctags version.
Also make sure that your Vim `tags` option is set correctly. See `:h 'tags'` for
@ -3426,7 +3401,7 @@ This is caused by an issue with libclang that only affects some operating
systems. Compiling with `clang` the binary will use the correct default header
search paths but compiling with `libclang.so` (which YCM uses) does not.
Mac OS X is normally affected, but there's a workaround in YCM for that specific
macOS is normally affected, but there's a workaround in YCM for that specific
OS. If you're not running that OS but still have the same problem, continue
reading.
@ -3593,7 +3568,7 @@ This software is licensed under the [GPL v3 license][gpl].
[clang-download]: http://llvm.org/releases/download.html
[brew]: http://brew.sh
[cmake-download]: https://cmake.org/download/
[macvim]: https://github.com/macvim-dev/macvim/releases
[macvim]: https://macvim-dev.github.io/macvim/
[vimrc]: http://vimhelp.appspot.com/starting.txt.html#vimrc
[gpl]: http://www.gnu.org/copyleft/gpl.html
[vim]: http://www.vim.org/
@ -3634,7 +3609,7 @@ This software is licensed under the [GPL v3 license][gpl].
[python-win-download]: https://www.python.org/downloads/windows/
[visual-studio-download]: https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=15
[7z-download]: http://www.7-zip.org/download.html
[mono-install-osx]: http://www.mono-project.com/docs/getting-started/install/mac/
[mono-install-macos]: http://www.mono-project.com/docs/getting-started/install/mac/
[mono-install-linux]: https://www.mono-project.com/download/stable/#download-lin
[mono-install]: http://www.mono-project.com/docs/getting-started/install/
[go-install]: https://golang.org/doc/install

View File

@ -8,7 +8,7 @@ Contents ~
3. Contents |youcompleteme-contents|
4. Intro |youcompleteme-intro|
5. Installation |youcompleteme-installation|
1. Mac OS X |youcompleteme-mac-os-x|
1. macOS |youcompleteme-macos|
2. Linux 64-bit |youcompleteme-linux-64-bit|
3. Windows |youcompleteme-windows|
4. FreeBSD/OpenBSD |youcompleteme-freebsd-openbsd|
@ -149,44 +149,42 @@ Contents ~
13. FAQ |youcompleteme-faq|
1. I used to be able to 'import vim' in '.ycm_extra_conf.py', but now can't |youcompleteme-i-used-to-be-able-to-import-vim-in-.ycm_extra_conf.py-but-now-cant|
2. I get 'ImportError' exceptions that mention 'PyInit_ycm_core' or 'initycm_core' |youcompleteme-i-get-importerror-exceptions-that-mention-pyinit_ycm_core-or-initycm_core|
3. I get a linker warning regarding 'libpython' on Mac when compiling YCM |youcompleteme-i-get-linker-warning-regarding-libpython-on-mac-when-compiling-ycm|
3. I get a linker warning regarding 'libpython' on macOS when compiling YCM |youcompleteme-i-get-linker-warning-regarding-libpython-on-macos-when-compiling-ycm|
4. I get a weird window at the top of my file when I use the semantic engine |youcompleteme-i-get-weird-window-at-top-of-my-file-when-i-use-semantic-engine|
5. It appears that YCM is not working |youcompleteme-it-appears-that-ycm-is-not-working|
6. Sometimes it takes much longer to get semantic completions than normal |youcompleteme-sometimes-it-takes-much-longer-to-get-semantic-completions-than-normal|
7. YCM auto-inserts completion strings I don't want! |youcompleteme-ycm-auto-inserts-completion-strings-i-dont-want|
8. I get a 'E227: mapping already exists for <blah>' error when I start Vim |youcompleteme-i-get-e227-mapping-already-exists-for-blah-error-when-i-start-vim|
9. I get "'GLIBC_2.XX' not found (required by libclang.so)" when starting Vim |youcompleteme-i-get-glibc_2.xx-not-found-when-starting-vim|
10. I'm trying to use a Homebrew Vim with YCM and I'm getting segfaults |youcompleteme-im-trying-to-use-homebrew-vim-with-ycm-im-getting-segfaults|
11. I have a Homebrew Python and/or MacVim; can't compile/SIGABRT when starting |youcompleteme-i-have-homebrew-python-and-or-macvim-cant-compile-sigabrt-when-starting|
12. I get 'LONG_BIT definition appears wrong for platform' when compiling |youcompleteme-i-get-long_bit-definition-appears-wrong-for-platform-when-compiling|
13. I get 'libpython2.7.a [...] relocation R_X86_64_32' when compiling |youcompleteme-i-get-libpython2.7.a-...-relocation-r_x86_64_32-when-compiling|
14. I see 'undefined symbol: clang_getCompletionFixIt' in the server logs. |youcompleteme-i-see-undefined-symbol-clang_getcompletionfixit-in-server-logs.|
15. I get 'Fatal Python error: PyThreadState_Get: no current thread' on startup |youcompleteme-i-get-fatal-python-error-pythreadstate_get-no-current-thread-on-startup|
16. 'install.py' says python must be compiled with '--enable-framework'. Wat? |youcompleteme-install.py-says-python-must-be-compiled-with-enable-framework-.-wat|
17. YCM does not read identifiers from my tags files |youcompleteme-ycm-does-not-read-identifiers-from-my-tags-files|
18. 'CTRL-U' in insert mode does not work while the completion menu is visible |youcompleteme-ctrl-u-in-insert-mode-does-not-work-while-completion-menu-is-visible|
19. My 'CTRL-R' mapping does not work while the completion menu is visible |youcompleteme-my-ctrl-r-mapping-does-not-work-while-completion-menu-is-visible|
20. YCM conflicts with UltiSnips TAB key usage |youcompleteme-ycm-conflicts-with-ultisnips-tab-key-usage|
21. Snippets added with ':UltiSnipsAddFiletypes' do not appear in the popup menu |youcompleteme-snippets-added-with-ultisnipsaddfiletypes-do-not-appear-in-popup-menu|
22. Why isn't YCM just written in plain VimScript, FFS? |youcompleteme-why-isnt-ycm-just-written-in-plain-vimscript-ffs|
23. Why does YCM demand such a recent version of Vim? |youcompleteme-why-does-ycm-demand-such-recent-version-of-vim|
24. Nasty bugs happen if I have the 'vim-autoclose' plugin installed |youcompleteme-nasty-bugs-happen-if-i-have-vim-autoclose-plugin-installed|
25. Is there some sort of YCM mailing list? I have questions |youcompleteme-is-there-sort-of-ycm-mailing-list-i-have-questions|
26. I get an internal compiler error when installing |youcompleteme-i-get-an-internal-compiler-error-when-installing|
27. I get weird errors when I press 'Ctrl-C' in Vim |youcompleteme-i-get-weird-errors-when-i-press-ctrl-c-in-vim|
28. Why did YCM stop using Syntastic for diagnostics display? |youcompleteme-why-did-ycm-stop-using-syntastic-for-diagnostics-display|
29. Completion doesn't work with the C++ standard library headers |youcompleteme-completion-doesnt-work-with-c-standard-library-headers|
30. When I start vim I get a runtime error saying 'R6034 An application has made an
10. I get 'LONG_BIT definition appears wrong for platform' when compiling |youcompleteme-i-get-long_bit-definition-appears-wrong-for-platform-when-compiling|
11. I get 'libpython2.7.a [...] relocation R_X86_64_32' when compiling |youcompleteme-i-get-libpython2.7.a-...-relocation-r_x86_64_32-when-compiling|
12. I see 'undefined symbol: clang_getCompletionFixIt' in the server logs. |youcompleteme-i-see-undefined-symbol-clang_getcompletionfixit-in-server-logs.|
13. I get 'Fatal Python error: PyThreadState_Get: no current thread' on startup |youcompleteme-i-get-fatal-python-error-pythreadstate_get-no-current-thread-on-startup|
14. 'install.py' says python must be compiled with '--enable-framework'. Wat? |youcompleteme-install.py-says-python-must-be-compiled-with-enable-framework-.-wat|
15. YCM does not read identifiers from my tags files |youcompleteme-ycm-does-not-read-identifiers-from-my-tags-files|
16. 'CTRL-U' in insert mode does not work while the completion menu is visible |youcompleteme-ctrl-u-in-insert-mode-does-not-work-while-completion-menu-is-visible|
17. My 'CTRL-R' mapping does not work while the completion menu is visible |youcompleteme-my-ctrl-r-mapping-does-not-work-while-completion-menu-is-visible|
18. YCM conflicts with UltiSnips TAB key usage |youcompleteme-ycm-conflicts-with-ultisnips-tab-key-usage|
19. Snippets added with ':UltiSnipsAddFiletypes' do not appear in the popup menu |youcompleteme-snippets-added-with-ultisnipsaddfiletypes-do-not-appear-in-popup-menu|
20. Why isn't YCM just written in plain VimScript, FFS? |youcompleteme-why-isnt-ycm-just-written-in-plain-vimscript-ffs|
21. Why does YCM demand such a recent version of Vim? |youcompleteme-why-does-ycm-demand-such-recent-version-of-vim|
22. Nasty bugs happen if I have the 'vim-autoclose' plugin installed |youcompleteme-nasty-bugs-happen-if-i-have-vim-autoclose-plugin-installed|
23. Is there some sort of YCM mailing list? I have questions |youcompleteme-is-there-sort-of-ycm-mailing-list-i-have-questions|
24. I get an internal compiler error when installing |youcompleteme-i-get-an-internal-compiler-error-when-installing|
25. I get weird errors when I press 'Ctrl-C' in Vim |youcompleteme-i-get-weird-errors-when-i-press-ctrl-c-in-vim|
26. Why did YCM stop using Syntastic for diagnostics display? |youcompleteme-why-did-ycm-stop-using-syntastic-for-diagnostics-display|
27. Completion doesn't work with the C++ standard library headers |youcompleteme-completion-doesnt-work-with-c-standard-library-headers|
28. When I start vim I get a runtime error saying 'R6034 An application has made an
attempt to load the C runtime library incorrectly.' |youcompleteme-when-i-start-vim-i-get-runtime-error-saying-r6034-an-application-has-made-an-attempt-to-load-c-runtime-library-incorrectly.|
31. I hear that YCM only supports Python 2, is that true? |youcompleteme-i-hear-that-ycm-only-supports-python-2-is-that-true|
32. On Windows I get "E887: Sorry, this command is disabled, the Python's site
29. I hear that YCM only supports Python 2, is that true? |youcompleteme-i-hear-that-ycm-only-supports-python-2-is-that-true|
30. On Windows I get "E887: Sorry, this command is disabled, the Python's site
module could not be loaded" |youcompleteme-on-windows-i-get-e887-sorry-this-command-is-disabled-pythons-site-module-could-not-be-loaded|
33. I can't complete Python packages in a virtual environment. |youcompleteme-i-cant-complete-python-packages-in-virtual-environment.|
34. I want to defer loading of YouCompleteMe until after Vim finishes booting |i-want-to-defer-loading-of-youcompleteme-until-after-vim-finishes-booting|
35. YCM does not shut down when I quit Vim |youcompleteme-ycm-does-not-shut-down-when-i-quit-vim|
36. YCM does not work with my Anaconda Python setup |youcompleteme-ycm-does-not-work-with-my-anaconda-python-setup|
37. Automatic import insertion after selecting a completion breaks undo |youcompleteme-automatic-import-insertion-after-selecting-completion-breaks-undo|
38. 'TAB' is already mapped to trigger completion in the command-line window |youcompleteme-tab-is-already-mapped-to-trigger-completion-in-command-line-window|
31. I can't complete Python packages in a virtual environment. |youcompleteme-i-cant-complete-python-packages-in-virtual-environment.|
32. I want to defer loading of YouCompleteMe until after Vim finishes booting |i-want-to-defer-loading-of-youcompleteme-until-after-vim-finishes-booting|
33. YCM does not shut down when I quit Vim |youcompleteme-ycm-does-not-shut-down-when-i-quit-vim|
34. YCM does not work with my Anaconda Python setup |youcompleteme-ycm-does-not-work-with-my-anaconda-python-setup|
35. Automatic import insertion after selecting a completion breaks undo |youcompleteme-automatic-import-insertion-after-selecting-completion-breaks-undo|
36. 'TAB' is already mapped to trigger completion in the command-line window |youcompleteme-tab-is-already-mapped-to-trigger-completion-in-command-line-window|
14. Contributor Code of Conduct |youcompleteme-contributor-code-of-conduct|
15. Contact |youcompleteme-contact|
16. License |youcompleteme-license|
@ -227,7 +225,7 @@ Contents ~
- Intro
- Installation
- Mac OS X
- macOS
- Linux 64-bit
- Windows
- FreeBSD/OpenBSD
@ -367,24 +365,19 @@ and a completer that integrates with UltiSnips [23].
Installation ~
-------------------------------------------------------------------------------
*youcompleteme-mac-os-x*
Mac OS X ~
*youcompleteme-macos*
macOS ~
These instructions (using 'install.py') are the quickest way to install
YouCompleteMe, however they may not work for everyone. If the following
instructions don't work for you, check out the full installation guide.
Install the latest version of MacVim [24]. Yes, MacVim. And yes, the _latest_.
If you don't use the MacVim GUI, it is recommended to use the Vim binary that
is inside the MacVim.app package ('MacVim.app/Contents/MacOS/Vim'). To ensure
it works correctly copy the 'mvim' script from the MacVim [24] download to your
local binary folder (for example '/usr/local/bin/mvim') and then symlink it:
MacVim [24] is required. YCM won't work with the pre-installed Vim from Apple
as its Python support is broken. If you don't already use MacVim [24], install
it with Homebrew [25]. Install CMake as well:
>
ln -s /usr/local/bin/mvim vim
brew install cmake macvim
<
Install YouCompleteMe with Vundle [25].
**Remember:** YCM is a plugin with a compiled component. If you **update** YCM
using Vundle and the ycm_core library APIs have changed (happens rarely), YCM
will notify you to recompile it. You should then rerun the install process.
@ -394,12 +387,6 @@ installed along with the latest Command Line Tools (they are installed
automatically when you run 'clang' for the first time, or manually by running
'xcode-select --install')
Install CMake. Preferably with Homebrew [26], but here's the stand-alone CMake
installer [27].
_If_ you have installed a Homebrew Python and/or Homebrew MacVim, see the _FAQ_
for details.
Compiling YCM **with** semantic support for C-family languages through
**libclang**:
>
@ -425,19 +412,19 @@ Compiling YCM **without** semantic support for C-family languages:
<
The following additional language support options are available:
- C# support: install Mono with Homebrew [26] or by downloading the Mono Mac
package [28] and add '--cs-completer' when calling 'install.py'.
- C# support: install Mono with Homebrew [25] or by downloading the Mono
macOS package [26] and add '--cs-completer' when calling 'install.py'.
- Go support: install Go [29] and add '--go-completer' when calling
- Go support: install Go [27] and add '--go-completer' when calling
'install.py'.
- JavaScript and TypeScript support: install Node.js and npm [30] and add
- JavaScript and TypeScript support: install Node.js and npm [28] and add
'--ts-completer' when calling 'install.py'.
- Rust support: install Rust [31] and add '--rust-completer' when calling
- Rust support: install Rust [29] and add '--rust-completer' when calling
'install.py'.
- Java support: install JDK8 (version 8 required) [32] and add
- Java support: install JDK8 (version 8 required) [30] and add
'--java-completer' when calling 'install.py'.
To simply compile with everything enabled, there's a '--all' flag. Note that
@ -470,9 +457,9 @@ Make sure you have Vim 7.4.1578 with Python 2 or Python 3 support. The Vim
package on Fedora 27 and later and the pre-installed Vim on Ubuntu 16.04 and
later are 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 [33] (don't worry, it's easy).
source [31] (don't worry, it's easy).
Install YouCompleteMe with Vundle [25].
Install YouCompleteMe with Vundle [32].
**Remember:** YCM is a plugin with a compiled component. If you **update** YCM
using Vundle and the ycm_core library APIs have changed (happens rarely), YCM
@ -517,19 +504,19 @@ Compiling YCM **without** semantic support for C-family languages:
<
The following additional language support options are available:
- C# support: install Mono [34] and add '--cs-completer' when calling
- C# support: install Mono [33] and add '--cs-completer' when calling
'install.py'.
- Go support: install Go [29] and add '--go-completer' when calling
- Go support: install Go [27] and add '--go-completer' when calling
'install.py'.
- JavaScript and TypeScript support: install Node.js and npm [30] and add
- JavaScript and TypeScript support: install Node.js and npm [28] and add
'--ts-completer' when calling 'install.py'.
- Rust support: install Rust [31] and add '--rust-completer' when calling
- Rust support: install Rust [29] and add '--rust-completer' when calling
'install.py'.
- Java support: install JDK8 (version 8 required) [32] and add
- Java support: install JDK8 (version 8 required) [30] and add
'--java-completer' when calling 'install.py'.
To simply compile with everything enabled, there's a '--all' flag. Note that
@ -567,18 +554,18 @@ 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 installers of 32-bit and 64-bit Vim with
Python 2 and Python 3 support [35] are available.
Python 2 and Python 3 support [34] are available.
Add the line:
>
set encoding=utf-8
<
to your vimrc [36] if not already present. This option is required by YCM. Note
to your vimrc [35] if not already present. This option is required by YCM. Note
that it does not prevent you from editing a file in another encoding than
UTF-8. You can do that by specifying the '|++enc|' argument to the ':e'
command.
Install YouCompleteMe with Vundle [25].
Install YouCompleteMe with Vundle [32].
**Remember:** YCM is a plugin with a compiled component. If you **update** YCM
using Vundle and the ycm_core library APIs have changed (happens rarely), YCM
@ -586,7 +573,7 @@ will notify you to recompile it. You should then rerun the install process.
Download and install the following software:
- Python 2 or Python 3 [37]. Be sure to pick the version corresponding to
- Python 2 or Python 3 [36]. 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. Additionally,
the version of Python you install must match up exactly with the version of
@ -598,7 +585,7 @@ Download and install the following software:
Python 3.5. You'll need one or the other installed, matching the version
number exactly.
- CMake [27]. Add CMake executable to the PATH environment variable.
- CMake [37]. Add CMake executable to the PATH environment variable.
- Visual Studio Build Tools 2017 [38]. During setup, select _Visual C++ build
tools_ in _Workloads_.
@ -631,16 +618,16 @@ The following additional language support options are available:
- C# support: add '--cs-completer' when calling 'install.py'. Be sure that
the build utility 'msbuild' is in your PATH [39].
- Go support: install Go [29] and add '--go-completer' when calling
- Go support: install Go [27] and add '--go-completer' when calling
'install.py'.
- JavaScript and TypeScript support: install Node.js and npm [30] and add
- JavaScript and TypeScript support: install Node.js and npm [28] and add
'--ts-completer' when calling 'install.py'.
- Rust support: install Rust [31] and add '--rust-completer' when calling
- Rust support: install Rust [29] and add '--rust-completer' when calling
'install.py'.
- Java support: install JDK8 (version 8 required) [32] and add
- Java support: install JDK8 (version 8 required) [30] and add
'--java-completer' when calling 'install.py'.
To simply compile with everything enabled, there's a '--all' flag. Note that
@ -683,7 +670,7 @@ For FreeBSD 11.x, the requirement is cmake:
>
pkg install cmake
<
Install YouCompleteMe with Vundle [25].
Install YouCompleteMe with Vundle [32].
**Remember:** YCM is a plugin with a compiled component. If you **update** YCM
using Vundle and the ycm_core library APIs have changed (happens rarely), YCM
@ -722,16 +709,16 @@ The following additional language support options are available:
- C# support: install Mono and add '--cs-completer' when calling
'./install.py'.
- Go support: install Go [29] and add '--go-completer' when calling
- Go support: install Go [27] and add '--go-completer' when calling
'./install.py'.
- JavaScript and TypeScript support: install Node.js and npm [30] and add
- JavaScript and TypeScript support: install Node.js and npm [28] and add
'--ts-completer' when calling 'install.py'.
- Rust support: install Rust [31] and add '--rust-completer' when calling
- Rust support: install Rust [29] and add '--rust-completer' when calling
'./install.py'.
- Java support: install JDK8 (version 8 required) [32] and add
- Java support: install JDK8 (version 8 required) [30] and add
'--java-completer' when calling './install.py'.
To simply compile with everything enabled, there's a '--all' flag. Note that
@ -783,7 +770,7 @@ will notify you to recompile it. You should then rerun the install process.
higher.
If your version of Vim is not recent enough, you may need to compile Vim
from source [33] (don't worry, it's easy).
from source [31] (don't worry, it's easy).
After you have made sure that you have Vim 7.4.1578+, type the following
in Vim: ":echo has('python') || has('python3')". The output should be 1.
@ -793,9 +780,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 [25] (or Pathogen [40], but Vundle is a
2. **Install YCM** with Vundle [32] (or Pathogen [40], but Vundle is a
better idea). With Vundle, this would mean adding a "Plugin
'Valloric/YouCompleteMe'" line to your vimrc [36].
'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
@ -830,14 +817,14 @@ will notify you to recompile it. You should then rerun the install process.
You will need to have 'cmake' installed in order to generate the required
makefiles. Linux users can install cmake with their package manager
('sudo apt-get install cmake' for Ubuntu) whereas other users can
download and install [27] cmake from its project site. Mac users can also
get it through Homebrew [26] with 'brew install cmake'.
download and install [37] cmake from its project site. macOS users can
also get it through Homebrew [25] with 'brew install cmake'.
On a Unix OS, you need to make sure you have Python headers installed. On
a Debian-like Linux distro, this would be 'sudo apt-get install
python-dev python3-dev'. On Mac they should already be present.
python-dev python3-dev'. On macOS they should already be present.
On Windows, you need to download and install Python 2 or Python 3 [37].
On Windows, you need to download and install Python 2 or Python 3 [36].
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 Build Tools [38]. MSVC 14 (Visual Studio 2015)
@ -915,7 +902,7 @@ will notify you to recompile it. You should then rerun the install process.
You could also force the use of a custom libclang library with
'-DEXTERNAL_LIBCLANG_PATH=/path/to/libclang.so' flag (the library would
end with '.dylib' on a Mac). Again, this flag would be used _instead of_
end with '.dylib' on macOS). Again, this flag would be used _instead of_
the other flags. **If you compiled LLVM from source, this is the flag you
should be using.**
@ -957,7 +944,7 @@ will notify you to recompile it. You should then rerun the install process.
On Windows, be sure that the build utility 'msbuild' is in your PATH
[39].
- Go support: install Go [29] and add it to your path. Navigate to
- Go support: install Go [27] and add it to your path. Navigate to
'YouCompleteMe/third_party/ycmd/third_party/go' and in **both**
'src/github.com/mdempsky/gocode' and 'src/github.com/rogpeppe/godef'
run
@ -968,15 +955,15 @@ will notify you to recompile it. You should then rerun the install process.
'YouCompleteMe/third_party/ycmd/third_party/go' then run 'go build' in
the two directories above.
- JavaScript and TypeScript support: install Node.js and npm [30],
- JavaScript and TypeScript support: install Node.js and npm [28],
navigate to 'YouCompleteMe/third_party/ycmd' and run 'npm install -g
--prefix third_party/tsserver typescript'.
- Rust support: install Rust [31]. Navigate to
- Rust support: install Rust [29]. Navigate to
'YouCompleteMe/third_party/ycmd/third_party/racerd' and run 'cargo
build --release'.
- Java support: install JDK8 (version 8 required) [32]. Download a
- Java support: install JDK8 (version 8 required) [30]. Download a
binary release of eclipse.jdt.ls [45] and extract it to 'YouCompleteM
e/third_party/ycmd/third_party/eclipse.jdt.ls/target/repository'.
Note: this approach is not recommended for most users and is
@ -1667,7 +1654,7 @@ available on the wiki [67].
All JavaScript and TypeScript features are provided by the TSServer [17]
engine, which is included in the TypeScript SDK. To enable these features,
install Node.js and npm [30] and call the 'install.py' script with the
install Node.js and npm [28] and call the 'install.py' script with the
'--ts-completer' flag.
TSServer [17] relies on the 'jsconfig.json' file [68] for JavaScript and the
@ -2347,11 +2334,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 [36] 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 [36] you have to
Note that after changing an option in your vimrc script [35] you have to
restart ycmd [47] with the |:YcmRestartServer| command for the changes to take
effect.
@ -3303,8 +3290,8 @@ problem. Common values for that option are '/usr/bin/python' and
'/usr/bin/python3'.
-------------------------------------------------------------------------------
*youcompleteme-i-get-linker-warning-regarding-libpython-on-mac-when-compiling-ycm*
I get a linker warning regarding 'libpython' on Mac when compiling YCM ~
*youcompleteme-i-get-linker-warning-regarding-libpython-on-macos-when-compiling-ycm*
I get a linker warning regarding 'libpython' on macOS when compiling YCM ~
If the warning is "ld: warning: path '/usr/lib/libpython2.7.dylib' following -L
not a directory", then feel free to ignore it; it's caused by a limitation of
@ -3394,29 +3381,12 @@ Your system is too old for the precompiled binaries from llvm.org. Compile
Clang on your machine and then link against the 'libclang.so' you just
produced. See the full installation guide for help.
-------------------------------------------------------------------------------
*youcompleteme-im-trying-to-use-homebrew-vim-with-ycm-im-getting-segfaults*
I'm trying to use a Homebrew Vim with YCM and I'm getting segfaults ~
Something (I don't know what) is wrong with the way that Homebrew configures
and builds Vim. I recommend using MacVim [24]. Even if you don't like the
MacVim GUI, you can use the Vim binary that is inside the MacVim.app package
(it's 'MacVim.app/Contents/MacOS/Vim') and get the Vim console experience.
-------------------------------------------------------------------------------
*youcompleteme-i-have-homebrew-python-and-or-macvim-cant-compile-sigabrt-when-starting*
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 [76] for suggestions.
-------------------------------------------------------------------------------
*youcompleteme-i-get-long_bit-definition-appears-wrong-for-platform-when-compiling*
I get 'LONG_BIT definition appears wrong for platform' when compiling ~
Look at the output of your CMake call. There should be a line in it like the
following (with '.dylib' in place of '.so' on a Mac):
following (with '.dylib' in place of '.so' on macOS):
>
-- Found PythonLibs: /usr/lib/libpython2.7.so (Required is at least version "2.5")
<
@ -3435,7 +3405,7 @@ version for the library. This is wrong. It can happen when you have multiple
versions of Python installed on your machine.
You should probably add the following flags to your cmake call (again, 'dylib'
instead of 'so' on a Mac):
instead of 'so' on macOS):
>
-DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so
<
@ -3482,7 +3452,7 @@ The details aren't important.
The solution is that the version of Python linked and run against must be built
with either '--enable-shared' or '--enable-framework' (on OS X). This is
achieved as follows (**NOTE:** for Mac, replace '--enable-shared' with
achieved as follows (**NOTE:** for macOS, replace '--enable-shared' with
'--enable-framework'):
- When building python from source: './configure --enable-shared {options}'
@ -3502,19 +3472,19 @@ 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 [77] to produce your tags files since
Make sure you are using Exuberant Ctags [76] to produce your tags files since
the only supported tag format is the Exuberant Ctags format [75]. The format
from "plain" ctags is NOT supported. The output of 'ctags --version' should
list "Exuberant Ctags". See Universal Ctags [78] for a maintained version.
list "Exuberant Ctags". See Universal Ctags [77] for a maintained version.
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 [77] by default sets language tag for '*.h' files as
**NOTE:** Exuberant Ctags [76] 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:** macOS comes with "plain" ctags installed by default. 'brew install
ctags' will get you the Exuberant Ctags version.
Also make sure that your Vim 'tags' option is set correctly. See ":h 'tags'"
@ -3589,7 +3559,7 @@ asynchronicity. This feature is available since Vim 7.4.1578.
*youcompleteme-nasty-bugs-happen-if-i-have-vim-autoclose-plugin-installed*
Nasty bugs happen if I have the 'vim-autoclose' plugin installed ~
Use the delimitMate [79] plugin instead. It does the same thing without
Use the delimitMate [78] plugin instead. It does the same thing without
conflicting with YCM.
-------------------------------------------------------------------------------
@ -3597,7 +3567,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
[80] mailing list, _don't_ create issues on the tracker. The tracker is for bug
[79] mailing list, _don't_ create issues on the tracker. The tracker is for bug
reports and feature requests.
-------------------------------------------------------------------------------
@ -3651,7 +3621,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 [81]) and other problems, like random
Syntastic-Vim interactions (issue #593 [80]) 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).
@ -3677,9 +3647,9 @@ This is caused by an issue with libclang that only affects some operating
systems. Compiling with 'clang' the binary will use the correct default header
search paths but compiling with 'libclang.so' (which YCM uses) does not.
Mac OS X is normally affected, but there's a workaround in YCM for that
specific OS. If you're not running that OS but still have the same problem,
continue reading.
macOS is normally affected, but there's a workaround in YCM for that specific
OS. If you're not running that OS but still have the same problem, continue
reading.
The workaround is to call 'echo | clang -v -E -x c++ -' and look at the paths
under the '#include <...> search starts here:' heading. You should take those
@ -3687,7 +3657,7 @@ paths, prepend '-isystem' to each individual path and append them all to the
list of flags you return from your 'Settings' function in your
'.ycm_extra_conf.py' file.
See issue #303 [82] for details.
See issue #303 [81] for details.
-------------------------------------------------------------------------------
*youcompleteme-when-i-start-vim-i-get-runtime-error-saying-r6034-an-application-has-made-an-attempt-to-load-c-runtime-library-incorrectly.*
@ -3695,7 +3665,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. [83] Add the following to the very top of your vimrc to remove these
versions. [82] Add the following to the very top of your vimrc to remove these
entries from the path.
>
python << EOF
@ -3731,7 +3701,7 @@ 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 [84]. Follow this workaround [85] or use a different version (Python
a bug [83]. Follow this workaround [84] or use a different version (Python
2.7.12 does not suffer from the bug).
-------------------------------------------------------------------------------
@ -3817,17 +3787,17 @@ using this key to cycle through YCM's suggestions without changing the value of
Contributor Code of Conduct ~
Please note that this project is released with a Contributor Code of Conduct
[86]. By participating in this project you agree to abide by its terms.
[85]. 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 join the Gitter
room [1] or use the ycm-users [80] mailing list.
room [1] or use the ycm-users [79] mailing list.
If you have bug reports or feature suggestions, please use the issue tracker
[87]. Before you do, please carefully read CONTRIBUTING.md [62] as this asks
[86]. Before you do, please carefully read CONTRIBUTING.md [62] as this asks
for important diagnostics which the team will use to help get you going.
The latest version of the plugin is available at
@ -3842,7 +3812,7 @@ YouCompleteMe maintainers directly using the contact details.
*youcompleteme-license*
License ~
This software is licensed under the GPL v3 license [88]. © 2015-2018
This software is licensed under the GPL v3 license [87]. © 2015-2018
YouCompleteMe contributors
===============================================================================
@ -3872,20 +3842,20 @@ References ~
[21] https://en.wikipedia.org/wiki/Subsequence
[22] https://github.com/scrooloose/syntastic
[23] https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt
[24] https://github.com/macvim-dev/macvim/releases
[25] https://github.com/VundleVim/Vundle.vim#about
[26] http://brew.sh
[27] https://cmake.org/download/
[28] http://www.mono-project.com/docs/getting-started/install/mac/
[29] https://golang.org/doc/install
[30] https://docs.npmjs.com/getting-started/installing-node#1-install-nodejs--npm
[31] https://www.rust-lang.org/
[32] http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
[33] https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source
[34] https://www.mono-project.com/download/stable/#download-lin
[35] https://github.com/vim/vim-win32-installer/releases
[36] http://vimhelp.appspot.com/starting.txt.html#vimrc
[37] https://www.python.org/downloads/windows/
[24] https://macvim-dev.github.io/macvim/
[25] http://brew.sh
[26] http://www.mono-project.com/docs/getting-started/install/mac/
[27] https://golang.org/doc/install
[28] https://docs.npmjs.com/getting-started/installing-node#1-install-nodejs--npm
[29] https://www.rust-lang.org/
[30] http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
[31] https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source
[32] https://github.com/VundleVim/Vundle.vim#about
[33] https://www.mono-project.com/download/stable/#download-lin
[34] https://github.com/vim/vim-win32-installer/releases
[35] http://vimhelp.appspot.com/starting.txt.html#vimrc
[36] https://www.python.org/downloads/windows/
[37] https://cmake.org/download/
[38] https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=15
[39] http://stackoverflow.com/questions/6319274/how-do-i-run-msbuild-from-the-command-line-using-windows-sdk-7-1
[40] https://github.com/tpope/vim-pathogen#pathogenvim
@ -3924,18 +3894,17 @@ References ~
[73] https://github.com/itchyny/lightline.vim
[74] https://docs.python.org/2/library/re.html#regular-expression-syntax
[75] http://ctags.sourceforge.net/FORMAT
[76] https://github.com/Valloric/YouCompleteMe/issues/18
[77] http://ctags.sourceforge.net/
[78] https://github.com/universal-ctags/ctags
[79] https://github.com/Raimondi/delimitMate
[80] https://groups.google.com/forum/?hl=en#!forum/ycm-users
[81] https://github.com/Valloric/YouCompleteMe/issues/593
[82] https://github.com/Valloric/YouCompleteMe/issues/303
[83] http://stackoverflow.com/questions/14552348/runtime-error-r6034-in-embedded-python-application/34696022
[84] https://github.com/vim/vim/issues/717
[85] https://github.com/vim/vim-win32-installer/blob/a27bbdba9bb87fa0e44c8a00d33d46be936822dd/appveyor.bat#L86-L88
[86] https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md
[87] https://github.com/Valloric/YouCompleteMe/issues?state=open
[88] http://www.gnu.org/copyleft/gpl.html
[76] http://ctags.sourceforge.net/
[77] https://github.com/universal-ctags/ctags
[78] https://github.com/Raimondi/delimitMate
[79] https://groups.google.com/forum/?hl=en#!forum/ycm-users
[80] https://github.com/Valloric/YouCompleteMe/issues/593
[81] https://github.com/Valloric/YouCompleteMe/issues/303
[82] http://stackoverflow.com/questions/14552348/runtime-error-r6034-in-embedded-python-application/34696022
[83] https://github.com/vim/vim/issues/717
[84] https://github.com/vim/vim-win32-installer/blob/a27bbdba9bb87fa0e44c8a00d33d46be936822dd/appveyor.bat#L86-L88
[85] https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md
[86] https://github.com/Valloric/YouCompleteMe/issues?state=open
[87] http://www.gnu.org/copyleft/gpl.html
vim: ft=help