我正在使用Syntastic直到在终端vim中安装YouCompleteMe.所以,问题是YouCompleteMe不允许Syntastic检查错误,但我需要两个插件.
YouCompleteMe有一些错误检查器,但我没有找到一种方法使其工作lint Javascript错误.
我该如何解决?
.vimrc for Syntastic
let g:syntastic_always_populate_loc_list = 0
let g:syntastic_auto_loc_list = 2
let g:syntastic_loc_list_height = 8
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 1
let g:syntastic_aggregate_errors = 1
let g:syntastic_id_checkers = 1
let g:syntastic_error_symbol = "?"
let g:syntastic_warning_symbol = "?"
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_javascript_checkers = ['jslint', 'jsonlint', 'gjslint']
let g:syntastic_html_tidy_exec = 'tidy5'
Run Code Online (Sandbox Code Playgroud)
YCM的.vimrc:
" YouCompleteMe and UltiSnips compatibility, with the helper of supertab
let g:ycm_key_list_select_completion = ['<A-¶>', '<A-Space>', '<Down>']
let g:ycm_key_list_previous_completion = ['<A-§>', …
Run Code Online (Sandbox Code Playgroud) 我已按照https://github.com/Valloric/YouCompleteMe中的说明进行操作, 并已安装:
cmake的 sudo apt-get install build-essential cmake
和Python标题 sudo apt-get install python-dev python3-dev
然后我cd ~/.vim/bundle/YouCompleteMe
跑了:
./install.py --clang-completer
我得到了:
Searching Python 2.7 libraries...
ERROR: unable to find an appropriate Python library.
然后我试过
python3 install.py --clang-completer
但仍然得到:
Searching Python 3.4 libraries...
ERROR: unable to find an appropriate Python library.
有没有人知道发生了什么?谢谢
我想为Vim安装和使用YouCompleteMe插件.但是,安装的一部分意味着下载clang 3.7,这已经是我当前Ubuntu安装的一部分.一般来说,在我的文件系统上浪费相同应用程序的多个版本上的空间是我无视的东西,但现在我也在运行双启动,并且没有那么多空间留给"偶然"下载的clang副本只是为了利用这个插件.
如果可能的话,如何使YouCompleteMe能够使用我已有的安装/库?
谢谢.
根据这篇文章,代码完成应适用于任何带有youcompleteme插件的语言.我在Debian Jessie中将其设置如下:
- 从存储库安装vim
- 从存储库安装youcompleteme
- 在cli发布'vam install youcompleteme'
在最后一步之后vim启动明显变慢,这意味着它正在加载插件.但是,完成不起作用.的输出
$ vam status
Name User Status System Status
editexisting removed removed
justify installed removed
matchit removed removed
youcompleteme installed removed
Run Code Online (Sandbox Code Playgroud)
为了让你完成工作,还有什么我必须做的吗?
如果我问一个迟钝的问题,我道歉.Windows bash的新手,看到了vim插件"YouCompleteme"并试图用Vundle安装它.但是我得到了标题中所述的错误.我的vim当前版本是7.4.52,任何人都知道如何解决这个问题?
编辑:我刚刚意识到我只是打电话给vim它说7.4.52然而当我打电话:版本它说7.4这是否意味着我使用错误的vim?
目前,我在Vim中使用YouCompleteMe,然后我已安装带有vundler的UltiSnips和vim-snippets。UltiSnips和YouCompleteMe兼容并正常工作;但是,当我定义自己的代码段时就会出现问题,因为这些代码段无法识别。
我怀疑使用该UltiSnipsEdit
功能时会出现问题,因为它是UltiSnips
在我的主目录而不是.vim
文件夹内创建文件夹。例如,当我使用R脚本并使用时UltiSnipsEdit
,它将在r.snippets
内部创建文件/home/UltiSnips
。然后定义一个片段以进行测试:
snippet test "Testing snip for R."
# snipp is working
endsnippet
Run Code Online (Sandbox Code Playgroud)
保存文件后,该片段不会出现在YouCompleteMe列表上,也不会使用:UltiSnipsExpandTrigger
(<c-l>
在我的情况下)进行扩展。
如果可行,我的目标是通过 YouCompleteMe 在 Vim 中完成 Haskell 的命令完成。在这方面,正如您在下面看到的,我还没有找到关于如何让它工作的共识。
YouCompleteMe上相关问题的最新评论并没有那么旧,因此我从AUR安装了haskell-ide-engine(GitHub上的repo是here。
但是,由于它花了很长时间(花了 110 分钟!)我检查了PKGBUILD
文件只是为了发现这一点:
# ...
# Supported are '8.4.2' '8.4.3' '8.4.4' '8.6.4' '8.6.5' '8.8.1' '8.8.2' '8.8.3'
# activated by default are the ones also used in a stackage snapshot. Removing
# versions you do not use will greatly reduce the compilation time of this
# package
_enabled_ghc_versions=('8.4.4' '8.6.4' '8.6.5' '8.8.2' '8.8.3')
# ...
Run Code Online (Sandbox Code Playgroud)
够公平,我的坏。所以我在#haskell IRC 频道上寻找帮助,一位用户发表了这样的评论:
然后你会发现几乎没有人
haskell-ide-engine
再使用但haskell-language-server
. …
Searching Python 3.6 libraries...
Found Python library: /home/luan/anaconda3/envs/za/lib/libpython3.6m.so
Found Python headers folder: /home/luan/anaconda3/envs/za/include/python3.6m
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check …
Run Code Online (Sandbox Code Playgroud) 所以我真的很想尝试YCM,据说它是Vim的一个很好的插件.我已经花了几个小时安装,由于错误而无法成功E887: Sorry, this command is disabled, the Python's site module could not be loaded.
我使用Homebrew安装了MacVim,Vim和Python.我重新安装了它们很多次但仍然无法完成它 - 正如许多人在YCM GitHub页面上的问题中所建议的那样.
我的操作系统版本是MacOS Sierra(10.12).
which python
返回/usr/local/bin/python
并python --version
给出Python 2.7.12
.键入:echo has('python')
返回1.
有什么建议?谢谢!
我是vim和shell脚本的新手.我不确定是否存在真正的问题,或者只是我不理解vim或shell脚本,但我确实搜索了谷歌并没有得到答案.无论如何,这是我在vim中做shell脚本时得到的.我认为语法高亮不能正常工作.
filename=$(basename $file)
Run Code Online (Sandbox Code Playgroud)
Vim高亮$(
和)
红色的颜色.
顺便说一句:我在Mac上使用gvim 8.0并安装了YCM,如果它是相关的.
我使用 Manjaro(5.6.7 内核),我正在尝试在 neovim 上安装 YCM。之前做过,但是是vim,我用的是vundle,这次用的是vim-plug。我在启动 newvim 时收到此消息。
YouCompleteMe 不可用:需要使用 Python (3.5.1+) 支持编译的 Vim。
谢谢!
\xe2\x9e\x9c YouCompleteMe git:(master) ./install.py --clang-completer\nSearching Python 3.7 libraries...\nERROR: Python headers are missing in /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Headers.\n
Run Code Online (Sandbox Code Playgroud)\n我使用brew安装python,没有下载Xcode
\n