sponsor Vim development Vim logo Vim Book Ad

AutoCpp : AutoCpp types complex C++ typenames for you.

 script karma  Rating 5/2, Downloaded by 916  Comments, bugs, improvements  Vim wiki

created by
Dmitry Ermolov
 
script type
utility
 
description
USAGE

Type something like

    it = mapIntToString.find(3);

then hit <C-J> (Ctrl + J). If declaration of myMap is availible inside
current function, AutoCpp will insert typename of iterator (for now
AutoCpp only supports const_iterator / iterator).

If myMap is declared in that way

    std::map<int, std::string> mapIntToString;

line with iterator turns into

    std::map<int, std::string>::const_iterator it = mapIntToString.find(3);

Hit <C-J> one more time and line becomes

    std::map<int, std::string>::iterator it = mapIntToString.find(3);

To get an idea of how it works, you can watch a short video:
http://www.youtube.com/watch?v=uTqnQEuUSL4


SOURCE CODE

You can find all sources here:
https://github.com/9uMaH/autocpp
 
install details
just copy autocpp.vim to your plugin directory (usualy $HOME/.vim/plugin/)
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
autocpp.vim 0.1.1 2011-06-30 7.0 Dmitry Ermolov Repeating <C-J> allows you to insert ::const_iterator / ::iterator
autocpp.vim 0.1 2011-06-28 7.0 Dmitry Ermolov Initial upload
ip used for rating: 216.73.216.4

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github