sponsor Vim development Vim logo Vim Book Ad

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

 script karma  Rating 5/2, Downloaded by 705  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: 54.198.200.128

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github