Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
11

I did the following to install (Although I could copy the whole ~/.vim directory to the new place instead of steps 3-6): Install vim 7.4: brew install vim Note: If you are using mac operating system, make sure you create an alias in your bash_profile pointing to macvim i.e. which mvim Install Vundle Add Plugin 'Valloric/YouCompleteMe' to ~/.vimrc and run :...


9

neovim version 0.1 has breaking changes. It uses directory ~/.config/nvim (On Mac OS X. Linux or Windows may use slightly different paths.) If you want your neovim configuration independent of vim configuration, you can rename .nvimrc to ~/.config/nvim/init.vim (See the docs here and here). Install vim-plug to ~/.config/nvim/autoload/plug.vim The ...


8

Finally found it! Completing parameters is not a part of the YCM behaviour. See this YCM issue. There's an old fork from oblitum which could grant this feature. That's what misled me. Unfortunately, this part of the fork seems unmaintained and after a few tries I couldn't make it work. So, I tried out clang_completer which has the parameter completion ...


8

The command g:ycm_filetype_whitelist was the one I needed! let g:ycm_filetype_whitelist = { 'cpp': 1, 'c': 1, 'python':1 } Finally, to get ride of this message altogether, the answer is in the FAQ. Basically, update to Vim 7.4.314 or later and it shall go away.


5

Install Vim 8 (released a few hours ago), and set signcolumn: set signcolumn=yes This is a actually available in Vim 7.4.2201 and later, but you really should go for the major release instead.


5

You could use this to tell Vim to look recursively for tags files under /usr/include/: set tags+=/usr/include/**/tags For the generation part, I'm afraid you will still have to generate tags files manually for each new library… or write a shell script. By the way, Vim comes with what it calls "include-search"; you will probably find the following help ...


5

With dynamic python, the name of the python DLL (or shared object on Unix) is defined at compile time. In your case it is python36.dll. As you now want to use a different python version, this name needs to be changed. For this Vim has the option pythonthreedll (and pythondll for python2). Set it to the name of DLL you want to load. Add the following to ...


4

Whether or not you display all of the suggestions probably won't affect the lag. YouCompleteMe will search through all of the possible completions anyway. There is no way to display the "10 top suggestions" without having considered all possible suggestions - at least with the way YCM works. If you still want to, pumheight sets the menu height.


4

If YCM uses the proper mechanisms, that message should be in either v:statusmsg or v:errmsg. You can put those values into the system clipboard via: :let @+ = v:statusmsg


4

In my understanding, that example creates a User autocommand named YouCompleteMe which will be fired by vim-plug itself, in order to load the plugin on demand. If I'm not mistaken, here's the place where vim-plug will run the custom autocommand: function! s:lod(names, types, ...) for name in a:names call s:remove_triggers(name) let s:loaded[name] ...


4

For anyone else stumbling upon this; the reason why :iunmap didn't work is found in :help E31: - If the mapping is buffer-local you need to use ":unmap <buffer>". YouCompleteMe seems to just set everything buffer-locally (after all, why shouldn't it?). When vim throws an error message like E31: No such mapping, you should always take a peek at the ...


4

The g:ycm_show_diagnostics_ui variable controls this: The *g:ycm_show_diagnostics_ui* option When set, this option turns on YCM's diagnostic display features. See the _Diagnostic display_ section in the _User Manual_ for more details. So, do: let g:ycm_show_diagnostics_ui = 0


4

Apart from the hack with adding a dummy sign (which is what most sign plugins do), there is nothing that can be done. If that bothers you, cheer at vim-dev, that my patch gets integraged. (Als available as issue 117)


4

The error message comes from the last line of your vimrc: Plug 'rdnetto/YCM-Generator' , { 'branch': 'stable'} This is a call to the Plug command of the Vim-plug plugin manager. To work, this line should be surrounded by the following lines as it's stated in the readme: call plug#begin('~/.vim/plugged') Plug 'rdnetto/YCM-Generator' , { 'branch': 'stable'} ...


3

You can do what some plugins do and create a dummy sign: sign define Dummy autocmd VimEnter,SessionLoadPost,BufRead * execute 'sign place 97349278 line=9999 name=Dummy buffer='.bufnr('%') All this does is creates an empty sign on line 9999, which should be far enough from valid lines in a file you actually want to see signs in. It has to be set on a far ...


3

I tried to update YCM and recompile it. Now, it is fine. Python3 support was added for last month and I just updated YCM last month.


3

After some tries, I finally find out what's going on with my installation of vim-youcompleteme, and I decided to answer my own question. First, building from source is not a good idea, unless you have to do it (just like my non-python support vim). Installing pre-built packages is always a good idea and a good starting point. Second, the dependencies are ...


3

The addon packages in Debian/Ubuntu are typically managed using the vim-addon-manager package. Once an addon package is installed, you run vam install <addon> to enable it in your user's config. In this case, you likely want to run vam install youcompleteme but vam list can confirm the addon name.


3

Based on tracyone's vim configuration I have created a fork of necovim that automatically registers as vim omnifunc. Just add the plugin with your favorite vim plugin manager and it will work out of the box with YouCompleteMe.


3

You could try and use DynamicSigns. The documentation includes an example to show relative line numbers every 5 lines. Maybe you can adopt the example and use this plugin combined with YCM.


3

Almost all Unix commandline programs end their output with a trailing newline, and Vim's system() doesn't remove this. This can be a difficult to spot with a regular :echo; the easiest way to check this from Vim is by piping the output to hexdump: :echo system('/usr/bin/which python3 | hexdump -C') 00000000 2f 75 73 72 2f 62 69 6e 2f 70 79 74 68 6f 6e 33 ...


2

I managed to install it. What I did was install python for neovim using pip install neovim The next thing I did was :PlugInstall YouCompleteMe from within neovim and it started installing as it normally does (if you have all the usual YCM dependencies installed). My .nvimrc still had the section for YCM in it and I guess vim-plug still uses those. ...


2

Unfortunately <c-i> and <tab> are parsed as the exact same key by most terminals. You can follow a discussion about this on this neovim issue: https://github.com/neovim/neovim/issues/176 The easiest solution is to pick a different mapping for jumping backwards, like <leader>i. If you really want this fixed, I suggest following the linked ...


2

So, after some iterations and tests, the answer to this is by using the g:ycm_semantic_triggers option as described here: https://github.com/Valloric/YouCompleteMe#the-gycm_semantic_triggers-option This has to be done via the regex mode. Here's the relevant config line from my .vimrc: let g:ycm_semantic_triggers = { 'cpp,objcpp' : ['->', '.', '::', 're!...


2

Digging through the ycm-users Google group, I found a post by someone else who was trying to debug their .ycm_extra_conf.py flag settings and was using :YcmDebugInfo to get information about the flags being used by YouCompleteMe to compile their file. As documented here, :YcmDebugInfo "...will print out various debug information for the current file. ...


2

You can always bypass the effects of a keypress by preceding it with a ctrl-v. For example, if you'd like to insert a literal escape character without returning to normal mode, you can do from insert mode: <C-v><esc> This also works on the command line. I don't have YouCompleteMe, or SuperTab installed so I haven't tested this solution, but it ...


2

Credit to: https://github.com/micbou — answer If what you want is inserting the ᐅ symbol when the completion menu is not visible, adding these lines to your vimrc should do the trick: " Remove <Tab> from the list of keys mapped by YCM. let g:ycm_key_list_select_completion = ['<Down>'] inoremap <expr> <Tab> pumvisible() ? "\<C-n&...


2

mkdir -p ~/.vim/pack/plugins/opt git clone https://github.com/Valloric/YouCompleteMe ~/.vim/pack/plugins/opt/YouCompleteMe cd ~/.vim/pack/plugins/opt/YouCompleteMe && git submodule update --init --recursive && ./install.py --all add following code to your vimrc execute 'packadd YouCompleteMe' or execute packadd YouCompleteMe when you ...


1

I had a similar problem with the same KeyError (although I don't know the exact error because I was not able to get the full traceback that you did) I managed to fix it by adding the zesty repo and installing a newer version of youcompleteme # add zesty repo echo deb http://archive.ubuntu.com/ubuntu/ zesty main restricted universe multiverse | sudo tee /...


1

I would just use a different key mapping for completion instead of hijacking the Tab key. Having one key to preform two actions and "guess" which one it should do is just a misguided approach IMHO. For SuperTab see :help supertab-forwardbackward: g:SuperTabMappingForward (default value: '<tab>') g:SuperTabMappingBackward (default value: '<s-tab&...


Only top voted, non community-wiki answers of a minimum length are eligible