VIM and C++
Since I started programming using Qt, C++ is the main language in my day-by-day work. Some of my co-workers recently moved from VIM to QtCreator alleging the code auto-completion (some may call this feature “intellisense”, if they are familiar to MS Visual Studio) in QtCreator is a killer feature.
VIM extension Omni Completion can handle nicely the task when programming using C, but I’m not used to such “technology”: ctags + glancing headers files sounds fine to me, until now, when Qt and it’s classes with tons of attributes and methods came to my life. Today I was trying to remember a method name of a QSomething class and I had the brilliant idea to use VIM auto-completion. So disappointing, I just figured out that there is no native C++ support in Omni Completion.
The Oracle told me about a OmniCppComplete add-on. It took me just few minutes to install and see how cool the plugin is. The automatic “suggestions pop-up” is annoying, but happily you can disable and use on-demand with the old and good ^X^O.
Of course there is nothing new here (first OmniCpp version dates from 2006), but you may be like me and be a bit afraid of waste time testing new VIM add-ons, because most of then are crappy hacks. Only few deserves the honor to be in my .vimrc. So, this is all about encouraging VIM users to give OmniCpp a try and be more effective.

OmniCppComplete in action

on April 22, 2009 at 20:24
· Permalink
Rato, esqueceu de colocar na categoria ‘nerd’, não apareceu nem no meu nem no planet do salveti.
L
on April 22, 2009 at 20:25
· Permalink
Just testing gravatar stuff, seems cool
on April 23, 2009 at 10:34
· Permalink
O Qt Creator possui um plugin muito bacana, para quem é acostumado a utilizar o Vim: Fakevim. Ele simula os comandos de teclado que estamos acostumados a utilizar no vim dentro do editor
Eu particularmente gostei do Qt Creator pelos seguintes fatores:
1. Auto-completion: Rápido, prático e simples.
2. Compilation warnings: Toda vez que a compilação aponta um warning ou error, um link é criado diretamente para a posição no código onde esse erro ocorreu, agilizando o trabalho de depuração e conserto do erro.
3. Integração com o GDB: Para ativar um breakpoint, basta dar um clique no início da linha no código e depois rodar a aplicação. Além disso, o debugger integrado é otimizado para mostrar a hierarquia interna do Qt (QObjects).
4. Integração com suporte a documentação: Toda vez que eu quero a documentação sobre um determinado método, atributo ou classe, eu simplesmente pressiono F1 em cima da palavra e um pop-up lateral é aberto contendo a documentação relacionada
5. Facilidade na geração de builds e runs customizados: O Qt Creator facilita o processo de build, como a customização das variáveis de ambiente e parâmetros passados para o qmake e make.
on April 26, 2009 at 14:34
· Permalink
Publica o seu vimrc então!
on April 29, 2009 at 04:06
· Permalink
O mandark não larga mesmo o Vim ! hehe!
on July 3, 2009 at 13:24
· Permalink
@jorgepereira Só a parte que interessa então
augroup cpp
au BufRead,BufNewFile *.cpp set tags+=$HOME/.vim/qt.tags
au BufRead,BufNewFile *.cpp let OmniCpp_MayCompleteDot = 0
au BufRead,BufNewFile *.cpp let OmniCpp_MayCompleteArrow = 0
augroup end