0

这似乎是在我安装 YCM 之后发生的。我还安装了 Python 模式插件,因为我喜欢 lint 和“在 vim 中运行”功能,但我关闭了“绳索”。我的 YCM 设置如下所示。

31 " Use gcc syntastic checker
30 let g:ycm_show_diagnostics_ui = 0
29
28 " Skip checking of ycm config file at vim startup
27 let g:ycm_confirm_extra_conf=0
26
25 " Includes tags in completion
24 let g:ycm_collect_identifiers_from_tags_files=1
23
22 " Include text in comments and strings
21 let g:ycm_collect_identifiers_from_comments_and_strings = 0
20
19 " Start completion from second char
18 let g:ycm_min_num_of_chars_for_completion=2
17
16 " Disable chache, rebuild every time
15 let g:ycm_cache_omnifunc=1
14
13 " Enable syntax based completion
12 let g:ycm_seed_identifiers_with_syntax=1
11
10 " Enable completion while in comments
9 let g:ycm_complete_in_comments = 1
8
7 " Enable completion while in strings
6 let g:ycm_complete_in_strings = 1

我试图分析 vim,但我没有从结果中得到任何线索。以下是我的分析报告。

    0 FUNCTIONS SORTED ON SELF TIME
    1 count  total (s)   self (s)  function
    2    60   0.883352   0.782989  <SNR>93_GetCompletions()
    3  2967   0.905869   0.579009  pymode#folding#expr()
    4  1997              0.275032  <SNR>110_BlockStart()
    5   302              0.168611  <SNR>93_Pyeval()
    6   120   0.968933   0.066387  youcompleteme#Complete()
    7  1997              0.051828  <SNR>110_BlockEnd()
    8    76   0.030649   0.028957  <SNR>97_GetNearbyTag()
    9   154              0.026513  <SNR>69_Highlight_Matching_Pair()
   10    61              0.025747  <SNR>93_InsideCommentOrString()
   11    61   0.057955   0.016587  <SNR>93_IdentifierFinishedOperations()
   12     6   0.013762   0.013707  <SNR>93_OnFileReadyToParse()
   13    60              0.012566  <SNR>93_OnCompleteDone()
   14     4              0.011961  <SNR>143_SearchParensPair()
   15    74   0.040687   0.010170  Powerline#Functions#fugitive#GetBranch()
   16    76   0.114571   0.009806  <SNR>93_OnCursorMovedInsertMode()
   17     2   0.006829   0.006792  SyntasticRefreshCursor()
   18    61   0.040498   0.005477  <SNR>93_InvokeCompletion()
   19    74              0.005211  308()
   20    91              0.004580  Pl#Statusline()
   21    74   0.005954   0.004241  <SNR>59_buffer_spec()
4

1 回答 1

1

Vim 不支持异步作业控制,基本上是单线程的,所以只能做一件接一件的事情。在 YCM 工作时,您不能输入文本。

你应该试试能忍受它的 NeoVim,它不会解决你的问题,但会最小化它。

于 2016-04-17T12:29:51.390 回答