Автозаполнение в Vim
Короче говоря, я ищуworking функция автозаполнения для редактора Vim. Я & APOS; веутверждал раньше что Vim полностью заменяет IDE под Linux, и, хотя это, безусловно, верно, в нем отсутствует одна важная функция: автозаполнение.
Я знаю оCtrl+N, Интеграция Exuberant Ctags, Taglist, cppcomplete а такжеOmniCppComplete, Увы, ни один из них не подходит под мое описание & # x201C; рабочего автозаполнения: & # x201D;
Ctrl+N works nicely (only) if you've forgotton how to spellclass
, or while
. Oh well.
Ctags gives you the rudiments but has a lot of drawbacks.
Taglist is just a Ctags wrapper and as such, inherits most of its drawbacks (although it works well for listing declarations).
cppcomplete simply doesn't work as promised, and I can't figure out what I did wrong, or if it's “working” correctly and the limitations are by design.
OmniCppComplete seems to have the same problems as cppcomplete, i.e. auto-completion doesn't work properly. Additionally, the tags
file once again needs to be updated manually.
Мне известно о том факте, что даже современные, полноценные интегрированные среды разработки не обеспечивают хорошего завершения кода C ++. Вот почему я до сих пор принимал недостаток Vim в этой области. Но я думаю, что фундаментальный уровень завершения кода - это не слишком большой вопрос, и он фактически необходим для продуктивного использования. Поэтому я ищу что-то, что может выполнить, по крайней мере, следующие вещи.
Syntax awareness. cppcomplete promises (but doesn't deliver for me), correct, scope-aware auto-completion of the following:
variableName.abc
variableName->abc
typeName::abc
And really, anything else is completely useless.
Configurability. I need to specify (easily) where the source files are, and hence where the script gets its auto-completion information from. In fact, I've got a Makefile in my directory which specifies the required include paths. Eclipse can interpret the information found therein, why not a Vim script as well?
Up-to-dateness. As soon as I change something in my file, I want the auto-completion to reflect this. I do not want to manually trigger ctags
(or something comparable). Also, changes should be incremental, i.e. when I've changed just one file it's completely unacceptable for ctags
to re-parse the whole directory tree (which may be huge).
Я что-нибудь забыл? Не стесняйтесь обновлять.
Мне удобно с большим количеством настроек и / или манипуляций, но я не хочу программировать решение с нуля, и я не очень хорош в отладке сценариев Vim.
И последнее замечание: мне действительно нравится что-то похожее для Java и C #, но я полагаю, что на это слишком много надежды:ctags
только анализирует файлы кода, и у Java и C # есть огромные, предварительно скомпилированные фреймворки, которые нужно будет проиндексировать. К несчастью,разработка .NET без IDE это даже больше PITA, чем C ++.