YouCompleteMe: a code-completion engine for Vim
===============================================
[![Gitter room](https://img.shields.io/gitter/room/Valloric/YouCompleteMe.svg)](https://gitter.im/Valloric/YouCompleteMe)
[![Build status](https://dev.azure.com/YouCompleteMe/YCM/_apis/build/status/ycm-core.YouCompleteMe?branchName=master)](https://dev.azure.com/YouCompleteMe/YCM/_build?definitionId=3&branchName=master)
[![Coverage status](https://img.shields.io/codecov/c/github/ycm-core/YouCompleteMe/master.svg)](https://codecov.io/gh/ycm-core/YouCompleteMe)
Help, Advice, Support
---------------------
Looking for help, advice or support? Having problems getting YCM to work?
First carefully read the [installation instructions](#installation) for your OS.
We recommend you use the supplied `install.py` - the "full" installation guide
is for rare, advanced use cases and most users should use `install.py`.
If the server isn't starting and you're getting a "YouCompleteMe unavailable"
error, check the [Troubleshooting][wiki-troubleshooting] guide.
Next check the [User Guide](#user-guide) section on the semantic completer that
you are using. For C/C++/Objective-C/Objective-C++/CUDA, you _must_ read [this
section](#c-family-semantic-completion).
Finally, check the [FAQ][wiki-faq].
If, after reading the installation and user guides, and checking the FAQ, you're
still having trouble, check the [contacts](#contact) section below for how to
get in touch.
Please do **NOT** go to #vim on Freenode for support. Please contact the
YouCompleteMe maintainers directly using the [contact details](#contact) below.
# Vundle
Please note that the below instructions suggest using Vundle. Currently there
are problems with Vundle, so here are some [alternative instructions](https://github.com/ycm-core/YouCompleteMe/issues/4134#issuecomment-1446235584) using Vim packages.
Contents
--------
- [Intro](#intro)
- [Installation](#installation)
- [Requirements](#requirements)
- [macOS](#macos)
- [Linux 64-bit](#linux-64-bit)
- [Windows](#windows)
- [FreeBSD/OpenBSD](#freebsdopenbsd)
- [Full Installation Guide](#full-installation-guide)
- [Quick Feature Summary](#quick-feature-summary)
- [User Guide](#user-guide)
- [General Usage](#general-usage)
- [Client-Server Architecture](#client-server-architecture)
- [Completion String Ranking](#completion-string-ranking)
- [General Semantic Completion](#general-semantic-completion)
- [Signature Help](#signature-help)
- [Semantic Highlighting](#semantic-highlighting)
- [Inlay Hints](#inlay-hints)
- [C-family Semantic Completion](#c-family-semantic-completion)
- [Java Semantic Completion](#java-semantic-completion)
- [C# Semantic Completion](#c-semantic-completion)
- [Python Semantic Completion](#python-semantic-completion)
- [Rust Semantic Completion](#rust-semantic-completion)
- [Go Semantic Completion](#go-semantic-completion)
- [JavaScript and TypeScript Semantic Completion](#javascript-and-typescript-semantic-completion)
- [Semantic Completion for Other Languages](#semantic-completion-for-other-languages)
- [LSP Configuration](#lsp-configuration)
- [Writing New Semantic Completers](#writing-new-semantic-completers)
- [Diagnostic Display](#diagnostic-display)
- [Diagnostic Highlighting Groups](#diagnostic-highlighting-groups)
- [Symbol Search](#symbol-search)
- [Commands](#commands)
- [YcmCompleter subcommands](#ycmcompleter-subcommands)
- [GoTo Commands](#goto-commands)
- [Semantic Information Commands](#semantic-information-commands)
- [Refactoring Commands](#refactoring-commands)
- [Miscellaneous Commands](#miscellaneous-commands)
- [Functions](#functions)
- [Autocommands](#autocommands)
- [Options](#options)
- [FAQ](#faq)
- [Contributor Code of Conduct](#contributor-code-of-conduct)
- [Contact](#contact)
- [License](#license)
- [Sponsorship](#sponsorship)
Intro
-----
YouCompleteMe is a fast, as-you-type, fuzzy-search code completion,
comprehension and refactoring engine for [Vim][].
It has several completion engines built in and supports any protocol-compliant
Language Server, so can work with practically any language. YouCompleteMe
contains:
- an identifier-based engine that works with every programming language,
- a powerful [clangd][]-based engine that provides native semantic code
completion for C/C++/Objective-C/Objective-C++/CUDA (from now on referred to
as "the C-family languages"),
- a [Jedi][]-based completion engine for Python 2 and 3,
- an [OmniSharp-Roslyn][]-based completion engine for C#,
- a [Gopls][]-based completion engine for Go,
- a [TSServer][]-based completion engine for JavaScript and TypeScript,
- a [rust-analyzer][]-based completion engine for Rust,
- a [jdt.ls][]-based completion engine for Java.
- a [generic Language Server Protocol implementation for any language](#plugging-an-arbitrary-lsp-server)
- and an omnifunc-based completer that uses data from Vim's omnicomplete system
to provide semantic completions for many other languages (Ruby, PHP etc.).
![YouCompleteMe GIF completion demo](https://i.imgur.com/0OP4ood.gif)
Here's an explanation of what happens in the last GIF demo above.
First, realize that **no keyboard shortcuts had to be pressed** to get the list
of completion candidates at any point in the demo. The user just types and the
suggestions pop up by themselves. If the user doesn't find the completion
suggestions relevant and/or just wants to type, they can do so; the completion
engine will not interfere.
When the user sees a useful completion string being offered, they press the TAB
key to accept it. This inserts the completion string. Repeated presses of the
TAB key cycle through the offered completions.
If the offered completions are not relevant enough, the user can continue typing
to further filter out unwanted completions.
A critical thing to notice is that the completion **filtering is NOT based on
the input being a string prefix of the completion** (but that works too). The
input needs to be a _[subsequence][] match_ of a completion. This is a fancy way
of saying that any input characters need to be present in a completion string in
the order in which they appear in the input. So `abc` is a subsequence of
`xaybgc`, but not of `xbyxaxxc`. After the filter, a complicated sorting system
ranks the completion strings so that the most relevant ones rise to the top of
the menu (so you usually need to press TAB just once).
**All of the above works with any programming language** because of the
identifier-based completion engine. It collects all of the identifiers in the
current file and other files you visit (and your tags files) and searches them
when you type (identifiers are put into per-filetype groups).
The demo also shows the semantic engine in use. When the user presses `.`, `->`
or `::` while typing in insert mode (for C++; different triggers are used for
other languages), the semantic engine is triggered (it can also be triggered
with a keyboard shortcut; see the rest of the docs).
The last thing that you can see in the demo is YCM's diagnostic display features
(the little red X that shows up in the left gutter; inspired by [Syntastic][])
if you are editing a C-family file. As the completer engine compiles your file
and detects warnings or errors, they will be presented in various ways. You
don't need to save your file or press any keyboard shortcut to trigger this, it
"just happens" in the background.
**And that's not all...**
YCM might be the only Vim completion engine with the correct Unicode support.
Though we do assume UTF-8 everywhere.
![YouCompleteMe GIF unicode demo](https://user-images.githubusercontent.com/10026824/34471853-af9cf32a-ef53-11e7-8229-de534058ddc4.gif)
YCM also provides [semantic IDE-like features](#quick-feature-summary) in a
number of languages, including:
- displaying signature help (argument
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
linux-的.vim文件-旧 (2000个子文件)
_regex_unicode.c 1.67MB
_regex_unicode.c 1.67MB
_regex.c 807KB
_regex.c 800KB
watchdog_fsevents.c 33KB
whereami.c 13KB
lang_c.c 3KB
lang_c.c 3KB
gccgo_c.c 1KB
cpu_gccgo_x86.c 1KB
module.c 294B
foo.c 173B
hello.c 77B
Character_test.cpp 20KB
TranslationUnit.cpp 19KB
IdentifierCompleter_test.cpp 11KB
ycm_core.cpp 10KB
Word.cpp 10KB
ClangCompleter.cpp 10KB
ClangHelpers.cpp 9KB
Candidate_test.cpp 9KB
CompletionData.cpp 9KB
TranslationUnit_test.cpp 8KB
CodePoint_test.cpp 8KB
ClangCompleter_test.cpp 7KB
IdentifierDatabase.cpp 6KB
Result.cpp 5KB
TranslationUnitStore.cpp 4KB
Candidate.cpp 4KB
PythonSupport.cpp 4KB
IdentifierUtils.cpp 4KB
PythonSupport_bench.cpp 4KB
TestUtils.cpp 4KB
CodePoint.cpp 4KB
Character.cpp 3KB
IdentifierUtils_test.cpp 3KB
IdentifierCompleter.cpp 3KB
CompilationDatabase.cpp 3KB
Word_test.cpp 3KB
Normalization_test.cpp 3KB
CandidateRepository_test.cpp 2KB
ClangUtils.cpp 2KB
FixIt_Clang_cpp11.cpp 2KB
IdentifierCompleter_bench.cpp 2KB
FixIt_Clang_cpp11.cpp 2KB
CharacterRepository_test.cpp 2KB
CodePointRepository_test.cpp 2KB
Documentation.cpp 2KB
Utils_test.cpp 1KB
Utils.cpp 1KB
BenchUtils.cpp 1KB
Range.cpp 944B
main.cpp 935B
main.cpp 925B
Repository.cpp 899B
versioning.cpp 829B
some_cpp.cpp 757B
main.cpp 443B
basic.cpp 430B
main.cpp 273B
basic.cpp 269B
virtual.cpp 218B
goto.cpp 175B
driver_mode_cl.cpp 158B
driver_mode_cl.cpp 158B
driver_mode_cl.cpp 158B
driver_mode_cl.cpp 158B
macro.cpp 131B
basic.cpp 129B
basic.cpp 129B
main.cpp 109B
bar.cpp 73B
foo.cpp 73B
test.cpp 58B
fixit.cpp 52B
test.cpp 48B
a.cpp 31B
include.cpp 11B
foo.cpp 4B
main.css 132KB
style.css 14KB
styles.css 10KB
markdown.css 5KB
github-gist.css 4KB
color-brewer.css 3KB
jquery.treeview.css 3KB
hybrid.css 3KB
grayscale.css 3KB
default.css 3KB
railscasts.css 3KB
monokai_sublime.css 2KB
darkula.css 2KB
dir.css 2KB
article.css 2KB
sunburst.css 2KB
obsidian.css 2KB
xcode.css 2KB
arta.css 2KB
googlecode.css 2KB
atelier-savanna.light.css 2KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
Hesec
- 粉丝: 4
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功