Results 1 to 1 of 1

Thread: Vim + omnicppcomplete + ctags [Solved]

  1. #1
    Join Date
    Jan 2006
    Posts
    75
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Vim + omnicppcomplete + ctags [Solved]

    I just got smart and put this on the wiki:

    http://wiki.qtcentre.org/index.php?title=Vim

    -- Getting nice autocompletion for QT classes in VIM

    This actually is a note to self post and hopefully it will help others.

    I use vim. I love it. I used Emacs for a couple years but my pinky finger wanted to fall off and that is when I switched to vim.

    - Install ctags (sudo apt-get install ctags)
    - Get the latest omnicppcomplete http://www.vim.org/scripts/script.php?script_id=1520
    - Install QT

    Qt Code:
    1. cd ~
    2. mkdir .vim
    3. cd .vim
    4. cp ~/Desktop/omni*.zip .
    5. unzip omni*.zip
    6. vim ~/.vimrc
    7.  
    8. While editing .vimrc:
    9. -----------------------
    10. syntax enable
    11. filetype on
    12. filetype plugin on
    13. set nocp
    14. set tags +=~/qtsdk-2009.03/qt/include/tags
    15. -----------------------
    16.  
    17. cd qtsdk-2009.03/qt/include/
    18. ctags -R --c++-kinds=+p --fields=+iaS --extra=+q -I Q_REQUIRED_RESULT
    To copy to clipboard, switch view to plain text mode 

    So this assumes that you have the qt sdk installed in your home directory. Make sure that the tags file generated by the ctags command is pointed to correctly in the .vimrc file.

    There is quite a bit more that you can do here and I'm sure I will come back to edit this later as my setup evolves.
    Last edited by kroenecker; 10th October 2009 at 04:38.

Similar Threads

  1. Steps to configure Ctags with QDevelop
    By gmx234 in forum Qt-based Software
    Replies: 7
    Last Post: 11th June 2008, 22:41
  2. QDevelop and CTags -> Not working
    By philwinder in forum Qt-based Software
    Replies: 13
    Last Post: 9th May 2008, 21:40
  3. Handcoder's IDE for Qt
    By magland in forum Qt-based Software
    Replies: 55
    Last Post: 7th September 2007, 15:09

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.