GithubHelp home page GithubHelp logo

ycm-core / youcompleteme Goto Github PK

View Code? Open in Web Editor NEW
25.4K 559.0 2.8K 36.02 MB

A code-completion engine for Vim

Home Page: http://ycm-core.github.io/YouCompleteMe/

License: GNU General Public License v3.0

Shell 0.47% Python 68.26% Makefile 0.02% Dockerfile 0.31% Vim Script 30.94%
vim code-completion code-analysis semantic-engine

youcompleteme's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

youcompleteme's Issues

doesn't recognise vim 7.3.669 and I have 'YouCompleteMe unavailable: requires Vim 7.3.584+' error

version: VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Feb 3 2013 23:40:35)
Included patches: 1-121, 123-224, 226-234, 236-245, 248-251, 254-335, 337-385, 388-399, 401-433
, 435-486, 488-490, 492-526, 528-568, 570-577, 582, 585-602, 604-610, 612-628, 630-639, 641-649
, 651-653, 661-669

If I put down patch which I have:
if exists( "g:loaded_youcompleteme" )
finish
elseif v:version < 703 || !has( 'patch661' )
echohl WarningMsg |
\ echomsg "YouCompleteMe unavailable: requires Vim 7.3.584+" |
\ echohl None
finish

It works fine. Is it necessary to have exact version !has( 'patch584' ) check?

Problem compiling ycm_core

I'm using Mac OSX 10.8.2.
Here is the problem:

[ 91%] Built target BoostParts
[ 92%] Building CXX object ycm/CMakeFiles/ycm_core.dir/LetterNode.cpp.o
In file included from /Users/mb985/.vim/bundle/YouCompleteMe/cpp/ycm/LetterNode.cpp:18:
/Users/mb985/.vim/bundle/YouCompleteMe/cpp/ycm/LetterNode.h:63:8: error: private field
      'is_root_node_' is not used [-Werror,-Wunused-private-field]
  bool is_root_node_;
       ^
1 error generated.
make[3]: *** [ycm/CMakeFiles/ycm_core.dir/LetterNode.cpp.o] Error 1
make[2]: *** [ycm/CMakeFiles/ycm_core.dir/all] Error 2
make[1]: *** [ycm/CMakeFiles/ycm_core.dir/rule] Error 2
make: *** [ycm_core] Error 2

This is the output of cmake command:

$ cmake -G "Unix Makefiles" . ~/.vim/bundle/YouCompleteMe/cpp                         
-- The C compiler identification is Clang 4.2.0
-- The CXX compiler identification is Clang 4.2.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
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Your C++ compiler supports C++11, compiling in that mode.
-- Found PythonLibs: /usr/lib/libpython2.7.dylib (found suitable version "2.7.2", minimum required is "2") 
NOT using libclang, no semantic completion for C/C++/ObjC will be available
-- Found PythonInterp: /usr/bin/python (found version "2.7.2") 
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/mb985/ycm_build

Consider using jedi instead of rope for python completion

jedi is an autocompletion library for Python that has it's own vim plugin (jedi-vim). I use it and find it to be quite good and more reliable than rope-based Python completion plugins.

FWIW, I might have time to try and get this going myself, if it's not too early to start using/extending the API's used by the existing semantic completer.

Probably user stupidity, but it doesn't seem to work?

I've installed MacVim, symlinked mvim properly so I get to use the correct vi version in terminal. I've installed Vundle, and added the default required things, plus YouCompleteMe into ~/.vimrc

set nocompatible               " be iMproved
filetype off                   " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required! 
Bundle 'gmarik/vundle'
Bundle 'https://github.com/Valloric/YouCompleteMe.git'
set completeopt+=preview

I've done the :BundleInstall, and it installed correctly. Built ymc, and was told it was installed successfully. But when I start using vim to type, I get these at the status area:

-- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)
-- User defined completion (^U^N^P) Pattern not found

No auto complete box or anything coming up.

For reference, vim --version shows: VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Dec 12 2012 16:22:25)

Reconsider all bindings

The assumption that i_<Tab>, i_<S-Tab>, <Leader>d, etc., are all available to a new plugin is going to slow adoption. Many other tools already make use of these.

I think we should figure out if there is a less-prominent set of bindings to use by default, and relegate the existing ones to the README.

YCM should query Vim's omnicomplete system if available

Currently, YCM seems to only support keyword completion for languages outside the C Family (tested with PHP, JS, CSS and Python). While this completion mechanism may have its merits it is quite dumb. Omni completion generally provides much more useful suggestions. You can compare these two screenshots to get an idea…

YCM:
image 2013-02-01 a 23 14 19
Omni completion:
image 2013-02-01 a 23 14 27

Additionally, the message in the command-line says "User defined completion" but :set completefunc=javascriptcomplete#CompleteJS (tested to work with <C-x><C-u>) doesn't seem to have any effect whatsoever: only keyword completion is used.

Thanks for your attention.

YouCompleteMe config not used for initial syntastic pass.

Each time I open a file, I get a compilation errors that disappear after a short while.

It seems that the error are there because syntastic is making an initial checking without using the config options that I have in .ycm_extra_conf.py and which are required to compile the source.

I guess that could be somehow improved. Ideally the let g:syntastic_check_on_open=1 should take into account the things that are in .ycm_extra_conf.py.

Error loading ycm_core in python

Using the current version, I get this error when running vim:

Error importing ycm_core. Are you sure you have placed a version 3.2+ libclang.[... the docs. Full error: dynamic module does not define init function (initycm_core)

I looked into where this is coming from, and it's just python trying to import the ycm_core module. I've tried to manually import this from the python shell, and I get the same error:

ImportError: dynamic module does not define init function (initycm_core)

First of all, this isn't the bug that YCM reports (which has something to do with clang). But I can't figure out what is causing this error.

I compiled a test boost_python library, and found that it exports the functions _init and init_module_MODULENAME, and there is an init_module_ycm_core function exported from ycm_core.so. Not sure if that's helpful, but it is something I found.

Any help with this? I'm more than welcome to provide any information that you need.

For reference, I'm running:
Arch Linux 3.7.5
I have both python2 and python3 installed, vim has +python and -python3
I'm using my system clang, which I built from svn, but I've tried it with the ubuntu release clang, and it fails then too

Error with syntastic integration

Syntastic works fine with .py and .js file, but fails with .c file. When I input :w command to check the c file, it fails with such errors:

处理 function 37_UpdateErrors..37_CacheErrors..5 时发生错误:
第 1 行:
E15:Invalid expression : self._locListFunc()
第 2 行:
E121:Unknown variable: list
E116:Invalid arguments for function 8
E15:Invalid expression: g:SyntasticLoclist.New(list)
处理 function 37_UpdateErrors..37_CacheErrors..5 时发生错误:
第 19 行:
E117: Unknown function: isEmpty
E15: Invalid expression: !loclist.isEmpty()

No completion available for Go Lang

It doesn't complete anything for a file with ft:go. If I changed it than the completion doesn't complete any words that are already written in the file.

CMake fails on second run if directory is not emptied

Lets say I run cmake for a first time with cmake -G "Unix Makefiles" -DPATH_TO_LLVM_ROOT=/usr/lib/llvm . ~/local/share/vim/bundle/YouCompleteMe/cpp/ and it generates everything fine. Then I realize there's another flag for that and I run cmake -G "Unix Makefiles" -DEXTERNAL_LIBCLANG_PATH=/usr/lib/llvm/libclang.so . ~/local/share/vim/bundle/YouCompleteMe/cpp/. It fails with following message

Your C++ compiler supports C++11, compiling in that mode.
Using libclang to provide semantic completion for C/C++/ObjC
Using external libclang: TEMP-NOTFOUND
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
TEMP
    linked by target "ycm_core" in directory /home/nagisa/local/share/vim/bundle/YouCompleteMe/cpp/ycm

-- Configuring incomplete, errors occurred!

After a rm -rf ./* ($PWD is build directory) and cmake -G "Unix Makefiles" -DEXTERNAL_LIBCLANG_PATH=/usr/lib/llvm/libclang.so . ~/local/share/vim/bundle/YouCompleteMe/cpp/ works fine.

ycm_core.so built against wrong python lib when using homebrewed pythons and custom macvim builds

Problem

I use a homebrewed python2.7, and a custom homebrewed MacVIM (to include the split-browser frature).

With this setup, ycm_core.so is linked wrongly, causing a SIGABRT on vim startup:

$ otool -L ycm_core.so
ycm_core.so:
    /Users/seletz/.vim/bundle/YouCompleteMe/python/ycm_core.so (compatibility version 0.0.0, current version 0.0.0)
    /System/Library/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.2)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 65.1.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)

Homebrew recipe

Here's my hacked together homebrew recipe for building my version of MacVIM. Please
note the inreplace for the python link libs.

require 'formula'

class MacvimSeletz < Formula
  homepage 'https://github.com/seletz/macvim/'

  head 'https://github.com/seletz/macvim.git', :branch => 'split-browser'

  option "custom-icons", "Try to generate custom document icons"
  option "override-system-vim", "Override system vim"
  option "with-cscope", "Build with Cscope support"
  option "with-lua", "Build with Lua scripting support"

  depends_on 'cscope' if build.include? 'with-cscope'
  depends_on 'lua' if build.include? 'with-lua'

  depends_on :xcode # For xcodebuild.

  def install
    # Set ARCHFLAGS so the Python app (with C extension) that is
    # used to create the custom icons will not try to compile in
    # PPC support (which isn't needed in Homebrew-supported systems.)
    arch = MacOS.prefer_64_bit? ? 'x86_64' : 'i386'
    ENV['ARCHFLAGS'] = "-arch #{arch}"

    # If building for 10.8, make sure that CC is set to "clang".
    # Reference: https://github.com/b4winckler/macvim/wiki/building
    ENV['CC'] = "clang" if MacOS.version >= :mountain_lion

    args = %W[
      --with-features=huge
      --with-tlib=ncurses
      --enable-multibyte
      --with-macarchs=#{arch}
      --enable-perlinterp
      --enable-pythoninterp
      --enable-rubyinterp
      --enable-tclinterp
      --with-ruby-command=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
    ]

    args << "--enable-cscope" if build.include? "with-cscope"

    if build.include? "with-lua"
      args << "--enable-luainterp"
      args << "--with-lua-prefix=#{HOMEBREW_PREFIX}"
    end

    system "./configure", *args

    inreplace "src/auto/config.mk", /^PYTHON_CFLAGS.*$/,
                                "PYTHON_CFLAGS = -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -DNDEBUG -g -O3 -Wall -Wstrict-prototypes"
    inreplace "src/auto/config.mk", /^PYTHON_LIBS.*$/,
                                "PYTHON_LIBS = -L/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -ldl -framework CoreFoundation -lpython2.7"
    # Building custom icons fails for many users, so off by default.
    unless build.include? "custom-icons"
      inreplace "src/MacVim/icons/Makefile", "$(MAKE) -C makeicns", ""
      inreplace "src/MacVim/icons/make_icons.py", "dont_create = False", "dont_create = True"
    end

    # Reference: https://github.com/b4winckler/macvim/wiki/building
    cd 'src/MacVim/icons' do
      system "make getenvy"
    end

    system "make"

    prefix.install "src/MacVim/build/Release/MacVim.app"
    inreplace "src/MacVim/mvim", /^# VIM_APP_DIR=\/Applications$/,
                                 "VIM_APP_DIR=#{prefix}"
    bin.install "src/MacVim/mvim"

    # Create MacVim vimdiff, view, ex equivalents
    executables = %w[mvimdiff mview mvimex gvim gvimdiff gview gvimex]
    executables += %w[vi vim vimdiff view vimex] if build.include? "override-system-vim"
    executables.each {|f| ln_s bin+'mvim', bin+f}
  end

  def caveats; <<-EOS.undent
    MacVim.app installed to:
      #{prefix}

    To link the application to a normal Mac OS X location:
        brew linkapps
    or:
        ln -s #{prefix}/MacVim.app /Applications
    EOS
  end
end

Vim segfaults with plugin on Arch 64. :-/

I finished building the plugin correctly:

[ 85%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/thread/src/pthread/once.cpp.o
[ 86%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/thread/src/pthread/thread.cpp.o
Linking CXX static library libBoostParts.a
[ 86%] Built target BoostParts
Scanning dependencies of target ycm_core
[ 87%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Candidate.cpp.o
[ 88%] Building CXX object ycm/CMakeFiles/ycm_core.dir/CandidateRepository.cpp.o
[ 89%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/ClangCompleter.cpp.o
[ 89%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/ClangResultsCache.cpp.o
[ 91%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/ClangUtils.cpp.o
[ 92%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/CompilationDatabase.cpp.o
[ 93%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/CompletionData.cpp.o
[ 93%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ClangCompleter/TranslationUnit.cpp.o
[ 94%] Building CXX object ycm/CMakeFiles/ycm_core.dir/CustomAssert.cpp.o
[ 95%] Building CXX object ycm/CMakeFiles/ycm_core.dir/IdentifierCompleter.cpp.o
[ 96%] Building CXX object ycm/CMakeFiles/ycm_core.dir/IdentifierUtils.cpp.o
[ 96%] Building CXX object ycm/CMakeFiles/ycm_core.dir/LetterNode.cpp.o
[ 97%] Building CXX object ycm/CMakeFiles/ycm_core.dir/LetterNodeListMap.cpp.o
[ 98%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Result.cpp.o
[100%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Utils.cpp.o
[100%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ycm_core.cpp.o
Linking CXX shared library /home/ting/.vim/bundle/YouCompleteMe/python/ycm_core.so
[100%] Built target ycm_core
╭─ting@noa ~/build ‹python-2.7.3› ‹ruby-1.9.3› 
╰─➤  cd ~/.vim/bundle/YouCompleteMe
╭─ting@noa ~/.vim/bundle/YouCompleteMe ‹python-2.7.3› ‹ruby-1.9.3› ‹master› 
╰─➤  find . -iname "*.so"                                                                                                                        2013.02.05 00:20:12 CST 
./python/libclang.so
./python/ycm_core.so
╭─ting@noa ~/.vim/bundle/YouCompleteMe ‹python-2.7.3› ‹ruby-1.9.3› ‹master› 
╰─➤  \vim                                                                                                                                  139 ↵ 2013.02.05 00:21:33 CST 
Vim: Caught deadly signal SEGV
Vim: Finished.

[1]    18418 segmentation fault (core dumped)  \vim
                                                   %                                                                                                                      ╭─ting@noa ~/.vim/bundle/YouCompleteMe ‹python-2.7.3› ‹ruby-1.9.3› ‹master› 
╰─➤                                                                                                                                        139 ↵ 2013.02.05 00:21:48 CST 

open c languages file error

os environment:mac os x 10.8.2
error:
Error detected while processing function youcompleteme#Enable..78_OnBufferV
isit..78_SetCompleteFunc:
line 4:
E858: Eval did not return a valid python object
Error detected while processing function youcompleteme#Enable..78_OnBufferV
isit..78_OnFileReadyToParse:
line 1:
Traceback (most recent call last):
Error detected while processing function youcompleteme#Enable..78_OnBufferV
isit..78_OnFileReadyToParse:
line 1:
File "", line 1, in
Error detected while processing function youcompleteme#Enable..78_OnBufferV
isit..78_OnFileReadyToParse:
line 1:
File "/Users/luowei/.vim/bundle/YouCompleteMe/autoload/../python/ycm.py", line
116, in OnFileReadyToParse
Press ENTER or type command to continue
Error detected while processing function youcompleteme#Enable..78_OnBufferV
isit..78_OnFileReadyToParse:
line 1:
if self.FiletypeCompletionEnabledForCurrentFile():
Error detected while processing function youcompleteme#Enable..78_OnBufferV
isit..78_OnFileReadyToParse:
line 1:
File "/Users/luowei/.vim/bundle/YouCompleteMe/autoload/../python/ycm.py", line
110, in FiletypeCompletionEnabledForCurrentFile
Press ENTER or type command to continue
Error detected while processing function youcompleteme#Enable..78_OnBufferV
isit..78_OnFileReadyToParse:
line 1:
self.FiletypeCompletionAvailableForFile() )
Error detected while processing function youcompleteme#Enable..78_OnBufferV
isit..78_OnFileReadyToParse:
line 1:
File "/Users/luowei/.vim/bundle/YouCompleteMe/autoload/../python/ycm.py", line
101, in FiletypeCompletionAvailableForFile

thank you very much !!

Feature: Code Navigation

Great work on the plugin btw, works as advertised.

Once you have the semantic completion using libclang configured, you are getting almost for free the ability to do code navigation (Find declaration, references, call hierarchy and more).

Any chance this is on the plans or is there a way to extend your plugin to achieve this?

Error when compiling something related to gregorian/date_generators

~/ycm_build
[A13014@PC-4839]
> make ycm_core
[  0%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/date_time/src/gregorian/date_generators.cpp.o
In file included from /Users/gronblom_sam/.vim/bundle/YouCompleteMe/cpp/BoostParts/libs/date_time/src/gregorian/date_generators.cpp:14:
In file included from /Users/gronblom_sam/.vim/bundle/YouCompleteMe/cpp/BoostParts/boost/date_time/date_generators.hpp:16:
In file included from /usr/bin/../lib/c++/v1/stdexcept:46:
In file included from /usr/bin/../lib/c++/v1/exception:81:
/usr/bin/../lib/c++/v1/type_traits:165:12: error: unknown type name '_LIBCPP_CONSTEXPR'
    static _LIBCPP_CONSTEXPR const _Tp      value = __v;
           ^
/usr/bin/../lib/c++/v1/type_traits:165:30: error: expected member name or ';' after declaration specifiers
    static _LIBCPP_CONSTEXPR const _Tp      value = __v;
    ~~~~~~~~~~~~~~~~~~~~~~~~ ^
/usr/bin/../lib/c++/v1/type_traits:169:9: error: unknown type name '_LIBCPP_CONSTEXPR'
        _LIBCPP_CONSTEXPR operator value_type() const {return value;}
        ^
/usr/bin/../lib/c++/v1/type_traits:169:63: error: use of undeclared identifier 'value'
        _LIBCPP_CONSTEXPR operator value_type() const {return value;}
                                                              ^
/usr/bin/../lib/c++/v1/type_traits:173:1: error: unknown type name '_LIBCPP_CONSTEXPR'
_LIBCPP_CONSTEXPR const _Tp integral_constant<_Tp, __v>::value;
^
/usr/bin/../lib/c++/v1/type_traits:173:19: error: expected unqualified-id
_LIBCPP_CONSTEXPR const _Tp integral_constant<_Tp, __v>::value;
                  ^
/usr/bin/../lib/c++/v1/type_traits:730:2: error: is_base_of not implemented.
#error is_base_of not implemented.
 ^
/usr/bin/../lib/c++/v1/type_traits:400:56: error: no member named 'value' in 'std::__1::is_integral<void>'
    : public integral_constant<bool, is_integral<_Tp>::value      ||
                                     ~~~~~~~~~~~~~~~~~~^
/usr/bin/../lib/c++/v1/type_traits:941:19: note: in instantiation of template class 'std::__1::is_arithmetic<void>' requested here
                 (is_arithmetic<_A2>::value || is_void<_A2>::value) &&
                  ^
/usr/bin/../lib/c++/v1/type_traits:949:22: note: in instantiation of default argument for '__promote<type-parameter-0-0, void, void>' required here
    typedef typename __promote<_A1>::type __type1;
                     ^~~~~~~~~~~~~~
/usr/bin/../lib/c++/v1/type_traits:949:38: error: expected a qualified name after 'typename'
    typedef typename __promote<_A1>::type __type1;
                                     ^
/usr/bin/../lib/c++/v1/type_traits:949:42: error: expected ';' at end of declaration list
    typedef typename __promote<_A1>::type __type1;
                                         ^
/usr/bin/../lib/c++/v1/type_traits:941:39: error: no member named 'value' in 'std::__1::is_arithmetic<void>'
                 (is_arithmetic<_A2>::value || is_void<_A2>::value) &&
                  ~~~~~~~~~~~~~~~~~~~~^
/usr/bin/../lib/c++/v1/type_traits:950:22: note: in instantiation of default argument for '__promote<type-parameter-0-1, void, void>' required here
    typedef typename __promote<_A2>::type __type2;
                     ^~~~~~~~~~~~~~
/usr/bin/../lib/c++/v1/type_traits:950:38: error: expected a qualified name after 'typename'
    typedef typename __promote<_A2>::type __type2;
                                     ^
/usr/bin/../lib/c++/v1/type_traits:950:42: error: expected ';' at end of declaration list
    typedef typename __promote<_A2>::type __type2;
                                         ^
/usr/bin/../lib/c++/v1/type_traits:941:39: error: no member named 'value' in 'std::__1::is_arithmetic<void>'
                 (is_arithmetic<_A2>::value || is_void<_A2>::value) &&
                  ~~~~~~~~~~~~~~~~~~~~^
/usr/bin/../lib/c++/v1/type_traits:951:38: error: expected a qualified name after 'typename'
    typedef typename __promote<_A3>::type __type3;
                                     ^
/usr/bin/../lib/c++/v1/type_traits:951:42: error: expected ';' at end of declaration list
    typedef typename __promote<_A3>::type __type3;
                                         ^
/usr/bin/../lib/c++/v1/type_traits:953:22: error: use of undeclared identifier '__type1'
    typedef decltype(__type1() + __type2() + __type3()) type;
                     ^
/usr/bin/../lib/c++/v1/type_traits:953:34: error: use of undeclared identifier '__type2'
    typedef decltype(__type1() + __type2() + __type3()) type;
                                 ^
/usr/bin/../lib/c++/v1/type_traits:953:46: error: use of undeclared identifier '__type3'
    typedef decltype(__type1() + __type2() + __type3()) type;
                                             ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[3]: *** [BoostParts/CMakeFiles/BoostParts.dir/libs/date_time/src/gregorian/date_generators.cpp.o] Error 1
make[2]: *** [BoostParts/CMakeFiles/BoostParts.dir/all] Error 2
make[1]: *** [ycm/CMakeFiles/ycm_core.dir/rule] Error 2
make: *** [ycm_core] Error 2

I am quite poor at figuring out C++ errors

And here are some versions:
OSX 10.7.5
brew 0.9.4
cmake 2.8.10.1
make GNU Make 3.81
boost 1.53.0
vim 7.3 included patches 1-754 Huge version with MacVim GUI

Anything missing?

ycm and autoindent: whitespace sometimes not removed

Vim with autoindent on adds whitespace when starting a new line. When pressing <esc> without typing anything, the whitespace is removed again. When ycm is activated, sometimes this whitespace is not removed. Sometimes it is.

How to reproduce:

  1. Edit some file, e.g. vim foo.hs
  2. Have autoindent on, smartindent and cindent off. I'm not sure if other settings are relevant, the output of :set is added below.
  3. Type the following: i<space>``<space>hello<esc>o<esc>

Result: The first line consists of two spaces, followed by the word "hello". The second line consists of two spaces.
Expected: The second line is empty.

ycm version b7eded1

:version                                                                                                                              
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Feb  5 2013 08:59:41)
Included patches: 1-798
:set
--- Options ---
  autoindent          cscopeverbose       incsearch           shiftwidth=2        tabstop=2           ttyfast
  backspace=2         filetype=haskell    laststatus=2        showcmd             tags=tags           ttymouse=xterm2
  colorcolumn=+1      helplang=en         ruler               showmatch         notimeout             updatetime=2000
  cscopetag           hidden              scroll=15           spelllang=de        title               t_Co=255
  cscopetagorder=1    hlsearch            scrolloff=10        syntax=haskell      ttimeout
  comments=s1fl:{-,mb:-,ex:-},:--
  commentstring=-- %s
  completefunc=youcompleteme#Complete
  completeopt=menuone
  fileencoding=utf-8
  fileencodings=ucs-bom,utf-8,default,latin1
  formatoptions=croql
  include=^import\s*\(qualified\)\?\s*
  includeexpr=substitute(v:fname,'\.','/','g').'.'
  printoptions=paper:letter
  runtimepath=~/.vim,~/.vim/bundle/YouCompleteMe,~/.vim/bundle/notmuch,~/.vim/bundle/potwiki,~/.vim/bundle/vim-fugitive,/var/lib/vim/addons,/usr/
share/vim/vimfiles,/usr/share/vim/vim73,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after
  statusline=%t:%l,%v %L%m
  suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
  suffixesadd=hs,lhs,hsc
  wildmode=longest,list

Can't build YouCompleteMe with Clang

So I had Clang as my default compiler on my system. When I tried to build YouCompleteMe with Clang, it kept failing with it saying it couldn't find a header (<cstddef> to be exact). My result looked something like this (click to expand):

Snapshot of verbose build

I think it's something to do with Clang not using the includes provided by libstdc++6-4.7-dev (the one I use), only GCC seems able to finding this.

The following is my system specifications, just in case someone else runs into this issue.

$ uname -a
Linux laptop.jalcine.me 3.8.0-4-generic 8-Ubuntu SMP Fri Feb 1 18:02:56 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu Raring Ringtail (development branch)
Release: 13.04
Codename: raring

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.7.2-20ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --with-system-zlib --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-20ubuntu1)

$ clang -v
Ubuntu clang version 3.2-1~exp5ubuntu2 (tags/RELEASE_32/final) (based on LLVM 3.2)
Target: x86_64-pc-linux-gnu
Thread model: posix

$ llvm-clang -v
Ubuntu clang version 3.2-1~exp5ubuntu2 (tags/RELEASE_32/final) (based on LLVM 3.2)
Target: llvm
Thread model: posix

clang-c/Index.h error when running make ycm_core

YouCompleteMe/cpp/ycm/ClangCompleter/CompletionData.h:23:10: fatal error: 'clang-c/Index.h' file not found

include <clang-c/Index.h>

     ^

1 error generated.
make[3]: *** [ycm/CMakeFiles/ycm_core.dir/CandidateRepository.cpp.o] Error 1
make[2]: *** [ycm/CMakeFiles/ycm_core.dir/all] Error 2
make[1]: *** [ycm/CMakeFiles/ycm_core.dir/rule] Error 2
make: *** [ycm_core] Error 2

Homebrew Vim

FWIW, if people insist on using Homebrew Vim, installing macvim via Homebrew will give them a console Vim that works with this plugin.

Completion is "noisy".

image

YouCompleteMe seems to frequently print some stuff on commandline. This is distracting.

Conflict with restore_view plugin

I have discovered that the following plugin breaks YouCompleteMe:

https://github.com/vim-scripts/restore_view.vim

When it is installed (using Vundle), YCM autocomplete will work correctly on the first file that is loaded, and any subsequent file loaded will fail to work.

I don't care for the restore_view plugin particularly, or know which is at fault, but as I spent a half hour tracking it down I felt obliged to open an issue for it here.

Thanks for the great work on the plugin!

Gez

SnipMate/UltiSnips integration

A killer feature would be for YCM to include SnipMate snippets in its suggestions.

I'm making this an issue in case a contributor sees this. I unfortunately do not have the skills required to build this.

Sometimes breaks auto-removal of whitespace-only lines

First of all, I love YCM, thanks for making it! It is much more performant than any other autocomplete plugin I've used.

I think this is possibly but not definitely related to Issue #24.

Steps to reproduce:

  • Type in some code that will trigger auto-indenting as well as the autocomplete box, e.g. in Ruby
def thing
end
  • Position cursor such that a new line will auto-indent e.g. anywhere on line with def thing
  • Use o to go to insert mode on an indented new blank line
  • Press esc to go to normal mode

Result:
Cursor at indented location.

Expected result:
Cursor at the beginning of the line, whitespace removed.

Expected result occurs if I disable YCM. Given that the autocomplete box pops up almost anytime you type, this bug has the effect of almost completely disabling the default vim behavior of removing whitespace on blank, undedited lines.

<leader>d doesn't show detailed error

Thanks for the awesome plugin.

I'm experiencing two issues when editing a c file with syntastic installed.

  1. When the cursor is on a line with an error, the error only flashes for under a second
  2. Pressing d results in this error:

Error detected while processing function 36_ShowDetailedDiagnostic:
line 1:
Traceback (most recent call last):
File "", line 1, in
File "/Users/c/Dropbox/linux/dotfiles/vim/vim.symlink/bundle/YouCompleteMe/autoload/../p
ython/ycm.py", line 141, in ShowDetailedDiagnostic
return self.GetFiletypeCompleterForCurrentFile().ShowDetailedDiagnostic()
File "/Users/c/Dropbox/linux/dotfiles/vim/vim.symlink/bundle/YouCompleteMe/autoload/../p
ython/completers/cpp/clang_completer.py", line 166, in ShowDetailedDiagnostic
diagnostics = self.diagnostic_store[ current_file ][ current_line ]
AttributeError: 'ClangCompleter' object has no attribute 'diagnostic_store'

I was able to fix the detailed report error by initializing self.diagnostic_store to None and checking if it's been properly initialized before usage.

bug

Option to turn off complete as you type

Lovely plugin!

As requested in internal email, here is a bug report.

I hate to have the completion box open constantly - mainly because it hijacks my tab key which I cannot use for anything else anymore now. Would it be possible to start the YCM "mode" only when an initial tab is pressed?

Compiling on windows

Hi,

So, I have successfully compiled this on windows, and it works.

Here are some notes from my experience compiling it

  1. Add these defined to the project definitions
    BOOST_PYTHON_SOURCE
    BOOST_ALL_NO_LIB
  2. Add this somewhere to the ycm_core source (if you got tss_cleanup_implemented linking error)
    namespace boost {
    void tss_cleanup_implemented() {}
    };
  3. Python native libraries in windows uses .pyd not .dll extension, so change the extension in plugin/youcompleteme.vim @ line 38

`-DUSE_SYSTEM_LIBCLANG=ON` fails

I'm on Arch with LLVM v3.2.5. Using system clang fails, but using path_to_llvm_root to point at system clang works.

╭─ting@noa ~/build ‹python-2.7.3› ‹ruby-1.9.3› 
╰─➤  cmake -G "Unix Makefiles" -DUSE_SYSTEM_LIBCLANG=ON . ~/.vim/bundle/YouCompleteMe/cpp                                                       2013.02.05 00:05:50 CST 
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/lib/ccache/bin/cc
-- Check for working C compiler: /usr/lib/ccache/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/ccache/bin/c++
-- Check for working CXX compiler: /usr/lib/ccache/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Your C++ compiler supports C++11, compiling in that mode.
-- Found PythonLibs: /usr/lib64/libpython2.7.so (found suitable version "2.7.3", minimum required is "2") 
Using libclang to provide semantic completion for C/C++/ObjC
Using external libclang: TEMP-NOTFOUND
-- Found PythonInterp: /usr/bin/python (found version "2.7.3") 
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
TEMP
    linked by target "ycm_core" in directory /home/ting/.vim/bundle/YouCompleteMe/cpp/ycm

-- Configuring incomplete, errors occurred!
╭─ting@noa ~/build ‹python-2.7.3› ‹ruby-1.9.3› 
╰─➤  ..                                                                                                                                     1 ↵ 2013.02.05 00:05:56 CST 
╭─ting@noa ~ ‹python-2.7.3› ‹ruby-1.9.3› 
╰─➤  rm -fr build                                                                                                                               2013.02.05 00:06:35 CST 
╭─ting@noa ~ ‹python-2.7.3› ‹ruby-1.9.3› 
╰─➤  mkdir build                                                                                                                                2013.02.05 00:06:37 CST 
╭─ting@noa ~ ‹python-2.7.3› ‹ruby-1.9.3› 
╰─➤  cd build                                                                                                                                   2013.02.05 00:06:39 CST 
╭─ting@noa ~/build ‹python-2.7.3› ‹ruby-1.9.3› 
╰─➤  cmake -G "Unix Makefiles" -DPATH_TO_LLVM_ROOT=/usr/lib/llvm . ~/.vim/bundle/YouCompleteMe/cpp                                              2013.02.05 00:06:45 CST 
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/lib/ccache/bin/cc
-- Check for working C compiler: /usr/lib/ccache/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/ccache/bin/c++
-- Check for working CXX compiler: /usr/lib/ccache/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Your C++ compiler supports C++11, compiling in that mode.
-- Found PythonLibs: /usr/lib64/libpython2.7.so (found suitable version "2.7.3", minimum required is "2") 
Using libclang to provide semantic completion for C/C++/ObjC
-- Found PythonInterp: /usr/bin/python (found version "2.7.3") 
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ting/build
╭─ting@noa ~/build ‹python-2.7.3› ‹ruby-1.9.3› 
╰─➤                                                                                                                                             2013.02.05 00:06:53 CST 

Repeated 'No .ycm_extra_conf.py file detected' message

Using vim with ycm in a directory with no .ycm_extra_conf.py file, results in this message being seen repeatedly in the status line:
"
No .ycm_extra_conf.py file detected, so no compile flags are available. Thus no semantic support for C/C++/ObjC/ObjC++.
"
It seems to happen every time the display refreshes.

It should only display once, to stop the spam. It's legitimate to have your vim configured with ycm, but not all of your sandboxes.

"libclang.dylib" disappeared after compilation

Run into source loading error after completing all steps required and when opened vim.

Figured out it's because libclang.dylib was missing in the .vim/bundle/YouCompleteMe/python directory. Double-checked my cmd history and pretty sure I did copy the dylib into python before the compilation.

Fixed by copying it again. But you should either take a look at the issue or add a watch-out at the end of installation instruction.

Problems compiling the plugin

Hi, I am having little success with compiling the ycm_core plugin:

[ 96%] Building CXX object ycm/tests/CMakeFiles/ycm_core_tests.dir/IdentifierUtils_test.cpp.o
[ 97%] Building CXX object ycm/tests/CMakeFiles/ycm_core_tests.dir/IdentifierCompleter_test.cpp.o
Linking CXX executable ycm_core_tests
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_CompileCommand_getArg'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_CompileCommands_getSize'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_CompileCommand_getNumArgs'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_defaultCodeCompleteOptions'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_CompilationDatabase_fromDirectory'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_CompileCommands_getCommand'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_disposeTranslationUnit'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_defaultEditingTranslationUnitOptions'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_getNumCompletionChunks'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_codeCompleteAt'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_getFileName'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_CompileCommands_dispose'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_CompileCommand_getDirectory'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_parseTranslationUnit'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_getDiagnosticInSet'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_getCString'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_getNumDiagnostics'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_getCompletionChunkCompletionString'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_getCompletionAvailability'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_getSpellingLocation'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_getNumDiagnosticsInSet'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_getChildDiagnostics'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_disposeIndex'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_getDiagnosticLocation'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_createIndex'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_getDiagnostic'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_disposeDiagnostic'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_reparseTranslationUnit'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_getDiagnosticSeverity'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_disposeCodeCompleteResults'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_defaultDiagnosticDisplayOptions'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_CompilationDatabase_getCompileCommands'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_getCompletionChunkText'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_formatDiagnostic'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_disposeString'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_getCompletionChunkKind'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_getDiagnosticSpelling'
/home/kongo/.plugins/YouCompleteMe/python/ycm_core.so: undefined reference to `clang_CompilationDatabase_dispose'
collect2: ld returned 1 exit status
make[2]: *** [ycm/tests/ycm_core_tests] Error 1
make[1]: *** [ycm/tests/CMakeFiles/ycm_core_tests.dir/all] Error 2
make: *** [all] Error 2

I am running on x86_64 gentoo linux with gcc 4.4.7. I tried the system installed clang 3.2 and the binaries on http://llvm.org/releases/download.html#3.2 without success.

Even passing the full path to libclang.so via -DEXTERNAL_LIBCLANG_PATH did not work either.

Any ideas?

Cheers,
Gregor

Extra whitespace added when changing a line

I noticed a lot of white-space in my diffs after using this plugin. It is adding space characters to match the formatting even if there is a blank line. To reproduce:

  1. Set your filetype to something, such as c so that it indents blocks.

  2. Enter the following text:

    if (foo) {
      bar;
    
      baz;
    }
    
  3. Move the cursor to the first character of the empty line. Note that it is an empty character.

  4. Type cc to change the line.

  5. Press esc to exit insert mode.

Expected: The line stays empty.
Actual: The line turns into two spaces.

No .ycm_extra_conf.py file detected, so no compile flags are available. thus no semantic support

Hello this happened when I started it up for the first time. I have found the file ~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py so I wonder if it should reside somewhere else?

Ok, that error was due to having an assignment to d in my .vimrc.

It seems to work like a charm now, once I get used to it, and have read your docs. This is something I have craved.

Thanks a whole lot!

Tommy/McUsr

Return to vim normal mode immediately after pressing ESC key

Currently, Vim returns to edit mode after pressing ESC key when the YCM's auto-complete popup is displaying. I'm used to SuperTab's behavior, so I find it a litte inconvenient to have to press ESC key 2 times to return to normal mode. Is there an option in YCM that help me change this behavior?

Getting "Vim: Caught deadly signal ABRT" after install.

I'm on OSX 10.8.2.

Steps I followed:

cd ~/.vim/bundle
git clone https://github.com/Valloric/YouCompleteMe.git
mkdir ~/dev/ycm_build
cd ~/dev/ycm_build
cmake -G "Unix Makefiles" . ~/.vim/bundle/YouCompleteMe/cpp

Got this output.

Now when I start vim, I get this:

➜  ycm_build  vim
Vim: Caught deadly signal ABRT
Vim: Finished.
[1]    10720 abort      vim

 ➜  ycm_build  vim
Vim: Caught deadly signal ABRT
Vim: Finished.
[1]    10740 abort      vim
vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jan 21 2013 00:59:00)
MacOS X (unix) version
Included patches: 1-772

If you need any more info, let me know. :)

Can't run MacVim after installing YCM

I installed YCM as per the instructions on the readme, and now MacVim crashes immediately after starting.

Running it in the terminal I get—

Fatal Python error: PyThreadState_Get: no current thread
Vim: Caught deadly signal ABRT
Vim: Finished.

I'm running MacVim 7.3 (snapshot 66) for OS X 10.8 (Mountain Lion), as downloaded from the official Google Code project page.

Running plain old Vim (which IIRC I brew installed), I get—

Vim: Caught deadly signal ABRT
Vim: Finished.
Abort trap: 6

When I ran :BundleInstall Valloric/YouCompleteMe, MacVim didn't crash—but then I'm not sure if it required an reboot to fully "install".

YouCompleteMe breaks ^u

With YouCompleteMe enabled, Ctrl+u no longer removes text from cursor to the beginning of line, as it does in regular vim. Instead it cycles through completion possibilities, like Ctrl+n does.

Characters get deleted as you type in vim files after saving

Hi, I noticed a strange behavior while editing vim files with MacVim and with Vim that comes shipped with MacVim itself. After saving a vim file, whatever word I type gets deleted after the first character so writing becomes practically impossible.

I'm running MacVim 7.3 (snapshot 66) on Mac OS X Mountain Lion 10.8

Make sure you link against python2

On Archlinux the default python is 3.x and you need to use python2 to get 2.x. Also need to include from /usr/lib/python2.7 not /usr/lib/python3.3m. Interestingly the ycm_core module compiles and loads fine as Py3 but ycm.py won't as it uses Py2 syntax. The error message in vim for this case incorrectly suggests that a missing libclang.so is to blame.

Complete CTRL+X CTRL+O ?

When I press CTRL+X CTRL+O in insert mode, there will pops a list of method I can use.

Can this be implemented in YCM? (i.e. don't need to press CTRL+X CTRL+O)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.