Autocompletion in Vim
You can use a plugin like AutoComplPop to get automatic code completion as you type.
2015 Edit: I personally use YouCompleteMe now.
Better autocomplete in VIM
Relatively satisfied with stock Vim's omnicomplete + vim-ruby and vim-rails having completion abilities on par with NetBeans but with all the bells&whistles of Vim and much lower resource requirements, of course.
From my .vimrc concerning completion options :
autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1
autocmd FileType ruby,eruby let g:rubycomplete_rails = 1
How to efficiently undo an autocomplete in vim
There are 2 native ways to do this in vim. If you know right way that the item is not in the completion menu you can use <c-y>
. <c-y>
accepts the current match which if you didn't move though any completions will send you back to only the text you inserted. (Second way) However if you did move through the completion menu you can move though until you get back to the original text.
However I imagine it isn't too hard to simply accept the longest matching and edit the word. You could also use <c-g>u
to break up the undo block by working it into your <tab>
mapping. Although that may break the history up more than you want.
Autocompletion in Vim
Try YouCompleteMe. It uses Clang through the libclang interface, offering semantic C/C++/Objective-C completion. It's much like clang_complete, but substantially faster and with fuzzy-matching.
In addition to the above, YCM also provides semantic completion for C#, Python, Go, TypeScript etc. It also provides non-semantic, identifier-based completion for languages for which it doesn't have semantic support.
Why we need autocomplete plugin for Vim since we have omni completion?
The most probable reason you were recommended to use the delplete
plugin is that it performs its autocompletion actions asynchronously. This can be a great benefit over native Vim autocompletion, which I believe still performs those actions synchronously.
The benefit lies in the case where the action to complete is long & slow: an asynchronous task will allow for other tasks to run alongside it while it works, while a synchronous task will block other tasks and make them wait for it to finish. Having "asynchronicity" will provide a smoother experience and shorter overall wait times.
Autocompletion tasks definitely have the capacity to be slower, but if you don't notice any slowdowns there's no pressing reason to switch to delplete
if you don't want to.
Related Topics
Add Current Time Before Log Message
Ruby Gem Installation Error After Osx Yosemite and Xcode 6 Installation
Using CSS to Style Ruby Objects in Erb
Best Way to Remove File Extension
Gemfile.Lock Always Has Changes Not Staged for Commit
Ruby: How to Join Elements of an Array Together with a Prefix
How Do Enumerators Work in Ruby 1.9.1
Is There an Easy-To-Use Ftp Library for Ruby
How to Make Block Local Variables the Default in Ruby 1.9
Trying to Get Svn2Git Working on Windows
How to Do Fuzzy Substring Matching in Ruby
Best Way to Use HTML5 Data Attributes with Rails Content_Tag Helper
Failure to Install Old MySQL2 Gem
What's The Most Efficient Way Get The First Day of The Current Month
How to "Nest" the Inclusion of Modules When Using the Ruby on Rails Activesupport::Concern Feature