All Questions

Tagged with
Filter by
Sorted by
Tagged with
337 votes
11 answers
483k views

Autocompletion in Vim

I'm having trouble with autocompletion. How can I get a code suggestion while I'm typing? I usually develop in PHP, Ruby, HTML, C and CSS.
diegocstn's user avatar
  • 4,547
265 votes
7 answers
129k views

Autocompletion in Vim

In a nutshell, I'm searching for a working autocompletion feature for the Vim editor. I've argued before that Vim completely replaces an IDE under Linux and while that's certainly true, it lacks one ...
Konrad Rudolph's user avatar
142 votes
14 answers
65k views

UltiSnips and YouCompleteMe

I have bundles ultisnips and youcompleteme installed on my macvim. The problem is that ultisnips doesn't work because tab is bound by ycm. I tried putting let g:UltiSnipsExpandTrigger = "<s-tab>"...
pvinis's user avatar
  • 4,069
127 votes
11 answers
67k views

How can one close HTML tags in Vim quickly?

It's been a while since I've had to do any HTML-like code in Vim, but recently I came across this again. Say I'm writing some simple HTML: <html><head><title>This is a title</...
wds's user avatar
  • 32.1k
99 votes
20 answers
98k views

Automatically insert a matching brace in Vim

I spend way too much time fumbling around because Vim doesn't handle closing braces like most IDEs do. Here's what I want to happen: Type this: if( whatever ) { <CR> and get this: if( ...
Bob's user avatar
  • 3,313
93 votes
7 answers
25k views

How do you automatically remove the preview window after autocompletion in Vim?

I'm using omnifunc=pythoncomplete. When autocompleting a word (e.g., os.<something>), I get the list of eligible class members and functions, as expected, as well as a scratch buffer preview ...
Ben Davini's user avatar
  • 1,033
91 votes
5 answers
38k views

When in Vim insert mode, is there a way to add filepath autocompletion?

I write a lot of shell scripts and I am constantly having to enter in filepaths. I am wondering if anyone knows of a way to get Vim to autocomplete filepaths while in insert mode, just like when you ...
stephenmm's user avatar
  • 2,650
74 votes
7 answers
24k views

Vim: Making Auto-Completion Smarter

I use ctags, taglist, etc., to have auto completion in Vim. However, it is very limited compared to Visual Studio intellisense or Eclipse auto-completion. I am wondering whether it is possible to tune ...
Rafid's user avatar
  • 19.6k
70 votes
3 answers
15k views

Vim's autocomplete is excruciatingly slow

Most of the time the autocomplete feature in Vim works nicely for me, but sometimes it seems to be scanning files which the current file references, and then it becomes painfully slow, sometimes ...
jnicklas's user avatar
  • 2,175
57 votes
12 answers
36k views

Vim auto-generate ctags

Right now I have the following in my .vimrc: au BufWritePost *.c,*.cpp,*.h !ctags -R There are a few problems with this: It's slow -- regenerates tags for files that haven't changed since the last ...
cdleary's user avatar
  • 70.6k
53 votes
10 answers
23k views

Vim's Omnicompletion with Python just doesn't work

I've searched around for an hour, both on Stack Overflow and elsewhere. Alas! Please help. Vim's omnicompletion just doesn't work. I have Vim 7.2 compiled with Python support. filetype plugin on is ...
a paid nerd's user avatar
  • 31.2k
40 votes
3 answers
20k views

How can I change the keybinding used to autocomplete in vim?

I'm not a big fan of Ctrl-n, I'd like to be able to use Ctrl-Space. Any ideas how I can do that?
Geo's user avatar
  • 94.9k
39 votes
2 answers
19k views

How can I disable scratch preview window?

While coding Python, I like Vim's omnicompletion function, but I don't want Scratch Window to pop up at top. How can I disable it? (I'm using gVim 7.3)
neolei's user avatar
  • 1,898
36 votes
11 answers
14k views

How do I get Vim to automatically put ending braces?

While editing .scm files it would be great if Vim would automatically put the ending brace ) as soon as I start (. How do I do this?
unj2's user avatar
  • 52.8k
34 votes
9 answers
25k views

Vim PHP omni completion

I'm trying to get PHP autocompletion right in Vim. Right now when I do a $blog = new Blog(); $blog-> and then hit CTRL+X CTRL+O I'd expect omnicompletion to return all the functions in the class ...
Karl's user avatar
  • 341
28 votes
3 answers
7k views

Scrolling in vim autocomplete box with jk movement keys

In vim you can start typing a word, hit ctrl-n, and a box will popup with suggested completions. I don't like having to move my hands away to the arrow keys to scroll through this list. Is there some ...
krashalot's user avatar
  • 1,091
28 votes
2 answers
5k views

Vim case-insensitive filename completion

I recently noticed how to configure bash to do case-insensitive filename completion (in /etc/inputrc, add: set completion-ignore-case on), now how do I get this in vim?
Vincent Scheib's user avatar
28 votes
2 answers
12k views

Install Ruby support for VIM on Mac OS X

Mac OS X 10.6 (Snow Leopard) has VIM pre-installed (version 7.2), which is great. It also has Ruby pre-installed (version 1.8.7) which is great too. However, I want Ruby autocompletion in VIM. ...
JoHaan's user avatar
  • 283
24 votes
5 answers
48k views

Vim YouCompleteMe configuration

i just installed YouCompleteMe for Vim through vundle. It works, but it shows only the words contained in the current file. I want to use it to develop c++ programs, how can i configure it to show ...
mastergap's user avatar
  • 375
24 votes
3 answers
21k views

How to trigger omnicomplete/auto-completion on keystrokes in INSERT mode?

VIM's omnicomplete autocompletion is not really working as expected. Is there a way to make it smarter? Like, to monitor the context of surround text? (e.g. don't trigger if within comments or ...
eduncan911's user avatar
  • 17.4k
23 votes
3 answers
8k views

Vim: How to set up an efficient autocomplete configuration?

I've been using Vim for a while now and love it, but one thing I've noticed when I use other editors is that I've never really got autocomplete working with much efficiency. I have supertab & ...
PlankTon's user avatar
  • 12.5k
22 votes
4 answers
12k views

How to accept a suggestion from Vim YouCompleteMe plugin

When there are multiple complete suggestions from Vim plugin YouCompleteMe, how do I accept the one I want ? What I currently do is pressing Esc key, I just want to know if I got it right.
Ask and Learn's user avatar
22 votes
3 answers
6k views

No auto-complete on HTML and CSS files in VIM (YouCompleteMe)

For some reason, I get no autocomplete on html and css files. All works well with other languages, for example JS, Ruby or Python. I've spent close to 2h today trying to fix it but to no avail. I use ...
user3056783's user avatar
  • 2,446
20 votes
1 answer
5k views

Disable omnicomplete or ftplugin or something in vim

I am trying to disable (auto-/omni-/whichever-) completion in sql. It is a problem for me because I used <C-c> for escape and when the file end in .sql it seems to initiate some search with a ...
enfascination's user avatar
18 votes
4 answers
6k views

Vim autocomplete: Cancelling autocomplete popup

If I hit ctrl+n in vim, I'll get a list of suggested autocomplete options in a popup box. This is fine...but if I decide I don't want to autocomplete after all, I'm not quite sure what to press to ...
PlankTon's user avatar
  • 12.5k
18 votes
2 answers
7k views

How to autocomplete file paths in Vim, just like in zsh?

In Zsh, I can use filename completion with slashes to target a file deep in my source tree. For instance if I type: vim s/w/t/u/f >TAB< zsh replaces the pattern with: vim src/wp-contents/...
Mykle Hansen's user avatar
17 votes
1 answer
16k views

C-family Semantic Autocompletion Plugins for Vim (C/C++ completion) using Clang (clang_complete, YouCompleteMe)

I am using 64-bit Vim on windows, this version by Haroogan: +python27 +python33 +huge I am trying to use clang_complete, so I took the libclang.dll library here and I set up my vimrc correctly. ...
statquant's user avatar
  • 14k
17 votes
3 answers
5k views

How to fix absent Python autocompletion on object instances in Vim?

I have found a strange behavior in Vim when I attempt to use autocompletion on objects. If I instantiate the objects on a module level, the Vim autocompletion will work on the instance I create: If I ...
BergmannF's user avatar
  • 10k
16 votes
1 answer
4k views

Figuring out JavaScript libraries for Vim autocompletion with TernJS in .tern_project file

I love vim and want to keep using it to do web development although I am struggling setting up my .tern_project file with the correct libraries I need to do autocompletion. I am relatively new to ...
Mathew Szymanowski's user avatar
16 votes
1 answer
5k views

Vim Directory Completion

I like Vim's Directory Completion when I'm normal mode, for example I do something like :cd ~/Desktop it actually autocompletes the name When I hit tab. So here's my question is there something like ...
Rigel Glen's user avatar
  • 1,289
16 votes
2 answers
3k views

Runtime Error with Vim Omnicompletion

I was trying to use Vim's omnicompletion with my Python code, but whenever I try C-x + C-o, it prompts the following error message: Runtime Error! Program E:\Vim\vim73\gvim.exe R6034 An application ...
nemo931102's user avatar
16 votes
3 answers
7k views

With VIM, use both snipMate and pydiction together (share the <tab> key?)

I am trying to use snipMate and pydiction in vim together - however, both use the <tab> key to perform their genius-auto-completion-snippet-rendering-goodness-that-I-so-desire. When pydiction ...
thornomad's user avatar
  • 6,757
16 votes
3 answers
2k views

Prevent vim from opening binary files accidentally?

I frequently accidentally open a binary executable, i.e. "foo", when I mean to open the associated source code "foo.cpp". The root of the problem is that tab completion, i.e. :e fo<tab> ...
Andrew Wagner's user avatar
14 votes
2 answers
1k views

Vim's Ctrl+P autocomplete for identifiers with dash '-'

In Lispy code there can be identifiers with dash signs instead of underscores, like that: (defn create-something ...) (defn create-anything ...) (defn create-nothing ...) If type crea^P, Vim shows ...
Vi.'s user avatar
  • 37.9k
14 votes
4 answers
16k views

Using VIM for C++/Qt development w/ Autocomplete

At work, I mainly program in C++ and when it needs to be graphical/multi-threaded/network enabled use Qt. Our environment is windows and I currently program w/ a combination of Visual Studio(debuggin ...
g19fanatic's user avatar
  • 10.7k
14 votes
1 answer
3k views

How can I configure vim so that movement commands will include underscores and CamelCase, but completion will ignore them?

For example, I currently have this: set iskeyword-=_ This has the effect of making this work: foo_bar If cursor is on "f", pressing w moves cursor to the underscore. Pressing again moves to the "...
user avatar
13 votes
2 answers
21k views

Vim - Auto-complete Java

I find myself wanting to auto-complete things that I import in the .java file I'm editing. So for example I'm working on Test.java, and inside I have import java.util.List;. Can I auto-complete (Ctrl+...
Luca Matteis's user avatar
  • 29.2k
12 votes
5 answers
18k views

Insert comments automatically in Vim

My SAS code requires this style of comment: /* * This is the comment */ I've been able to type this command (From the Vim Comment Howto): :set comments=sl:/*,mb:*,elx:*/ The problem is that once I ...
Dan's user avatar
  • 10.1k
12 votes
2 answers
6k views

YouCompleteme works but can not complete using TAB

I installed YouCompleteMe using vundle. Then installed all plugins and installed YCM using ./install.sh --clang-completer This is how my vimrc looks: syntax on set expandtab set cindent set ...
comrad's user avatar
  • 759
11 votes
4 answers
31k views

How to trigger autocomplete suggestion box in vim or neovim (Plugin neoclide/coc.vim)

I'm Neovim user and I use Plugin neoclide/coc.vim for autocompletion but when my cursor focus out, I can not get suggestion box again (How can I call this box? suggest box or hint box? I want to know ...
devstefancho's user avatar
  • 2,432
11 votes
3 answers
6k views

Case insensitivity on autocomplete

I have searched a lot over the internet and Vim's help, so I hope this is not a duplicate question… Anyway: Is there any manner to turn on case insensitivity in Vim's autocomplete feature? I'm not ...
sidyll's user avatar
  • 58.5k
11 votes
4 answers
14k views

Vim omnicompletion for Java

I've read heaps of blogs on Vim's supposedly great omnicompletion, and yet no matter what I do I can't get it to work satisfactorily. It took me ages to figure discover that the version of ctags that ...
Robbie's user avatar
  • 111
11 votes
2 answers
2k views

How do I get auto-suggestions for array options when typing in Vim?

Let's say I type a = [1, 2] in a .py file in vim and when I type "a." and hit TAB, I would like to get suggestion menu that is related to lists. Edit 1 in response to Robin's comment: I think it's ...
user avatar
11 votes
2 answers
6k views

Vim function hints for C

I'm trying to achieve something simple, usually called "function hints". For example, scintilla-based editors have it: You type a name, and just get the prototype. There are a few problems with that ...
user1497069's user avatar
11 votes
1 answer
2k views

Why does SuperTab output self when I press <tab>?

The Setup In my .vimrc I have the following lines: " .vimrc let g:virtualenv_directory="/Users/Kit/Development/virtualenv" Then in ~/.vim/ftplugin/python/virtualenv.vim I have these: py << ...
Kit's user avatar
  • 31k
10 votes
5 answers
16k views

vim-go autocompletion not working

I recently installed vim-go using pathogen, but the autocompletion feature is not working. If I am using it only shows commands I've already used. My .vimrc has filetype plugin on " Enable ...
Gregsen's user avatar
  • 471
10 votes
2 answers
6k views

What is the best way to get Python auto-completions/intellisense in Vim dynamically?

I have looked at pydiction, pysmell and vim-ipython. Both pydiction and pysmell require generating the index before we can use it, and vim-ipython requires loading back and forth before the ...
hllau's user avatar
  • 10.2k
10 votes
1 answer
3k views

Vim path separator & auto-completion

Working on web stuff, in windows, to be hosted on linux. Completing paths with ^X^F automatically inserts "\" as the path separator on windows, which is quite correct, but not what I want, so: Is ...
sjh's user avatar
  • 2,256
10 votes
2 answers
760 views

How to call js completion in html file instead of js file?

I had installed tern_for_vim and YouCompleteMe for js completion this way. 1 install node curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash source ~/.nvm/nvm.sh nvm ...
user avatar
10 votes
3 answers
15k views

Better autocomplete in VIM

All, I have been working with vim for some time now, and love everything about it - there is only one thing I really miss from IDEs like RubyMine, and that is advanced autocompletion. For reference, ...
Warren Wright's user avatar

1
2 3 4 5
7