Built-In Vim Autocomplete
github.com
Built-In Vim Autocomplete
1–10 of 30 posts
Re: Built-In Vim Autocomplete
#2Re: Built-In Vim Autocomplete
#3See ':help cpt' and ':help ins-completion'
YouCompleteMe is a good plugin for expanding out autocompletion for a lot more languages, but the built-in autocompletion is remarkably good out of the box.
Re: Built-In Vim Autocomplete
#4This whole time I had no idea vim could autocomplete
:help new-omni-completionRe: Built-In Vim Autocomplete
#5Bonus: If you have set up a tags file, the symbols there will also be available by default with autocomplete. This can help fill out a lot of potential functions and keywords which might not normally be set up (for Python, I set up a tagfile for both the standard library and site packages). See ':help cpt' and ':help ins-completion' YouCompleteMe is a good plugin for expanding out autocompletion for a lot more langua…
Additionally, I set the user complete mode () to use vim's built in syntax complete (`:set completefunc=syntaxcomplete#Complete`), which is super helpful with e.g. config files because Vim is aware of all the available completion options.
Of course there's filename complete too ().
These three modes can get some intelligent completion done but quite frankly the default local keyword completion covers 90% of my use cases.
Re: Built-In Vim Autocomplete
#6 function! InsertTabWrapper()
let col = col('.') - 1
if !col || getline('.')[col - 1] !~ '\k'
return "\"
else
return "\"
endif
endfunction
inoremap =InsertTabWrapper()Re: Built-In Vim Autocomplete
#7Re: Built-In Vim Autocomplete
#8Vim-autocomplpop is a fairly old plugin, but it still works just fine. It automatically shows autocompletion options as you type like an IDE. This is very handy.
The only downside is that external autocompletion engines like ctags and rope can sometimes cause performance issues. For example, python.vim uses rope to analyze a file, but that can take a while to initialize and crawl directories if you're editing a file in your home directory. Since it's a plugin written before Vim/Neovim's async code, it tends to make Vim unresponsive, so I only enable vim-autocomplpop on projects I'm working on. This isn't an issue if you use Vim's built-in autocomplete (instead of python.vim). I'll get around to rewriting autocomplpop someday and working on a solution to mitigate external autocomplete providers slowing down Vim.
0: https://github.com/othree/vim-autocomplpop 1: https://github.com/racer-rust/vim-racer
Re: Built-In Vim Autocomplete
#9Vim's autocomplete is alright, but it can definitely be super-charged by plugins like vim-autocomplpop[0], superTab, and language specific plugins like vim-racer[1]. Vim-autocomplpop is a fairly old plugin, but it still works just fine. It automatically shows autocompletion options as you type like an IDE. This is very handy. The only downside is that external autocompletion engines like ctags and rope can sometimes…
Re: Built-In Vim Autocomplete
#10What is xctrl?