Re: vi editor c++ code completion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



omnicppcomplete.txt

[[
3. Installation~
                                                *omnicpp-installation*
3.1. Script installation~

Unzip the downloaded file in your personal |vimfiles| directory (~/.vim under 
unix or %HOMEPATH%\vimfiles under windows). The 'omnifunc' will be 
automatically set for C and C++ files.

You also have to enable plugins by adding these two lines in your|.vimrc|file: >

        set nocp
        filetype plugin on
<
Please see |cp| and |filetype-plugin-on| sections for more details.

3.1.1. Files~

After installation you should find these files :

    after\ftplugin\cpp.vim
    after\ftplugin\c.vim

    autoload\omni\common\debug.vim
                        \utils.vim

    autoload\omni\cpp\complete.vim
                     \includes.vim
                     \items.vim
                     \maycomplete.vim
                     \namespaces.vim
                     \settings.vim
                     \tokenizer.vim
                     \utils.vim

    doc\omnicppcomplete.txt

3.2. Building the Exuberant Ctags database~

To extract C/C++ symbols information, the script needs an |Exuberant_ctags|
database.

You have to build your database with at least the following options:
        --c++-kinds=+p  : Adds prototypes in the database for C/C++ files.
        --fields=+iaS   : Adds inheritance (i), access (a) and function 
                          signatures (S) information.
        --extra=+q      : Adds context to the tag name. Note: Without this
                          option, the script cannot get class members.

Thus to build recursively a ctags database from the current directory, the
command looks like this:
>
        ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .
<
You can add a map in your |.vimrc| file, eg: >

        map <C-F12> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
<
]]

Here
set nocp
filetype plugin on
what are nocp and,filetype,plugin?



      

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux