expand.vim : method to simply an quickly post expand a cmd. "index ff<c-cr>" for example.
| script karma |
Rating -1/3,
Downloaded by 1437 |
Comments, bugs, improvements
|
Vim wiki
|
| created by |
| Robert KellyIV |
| |
| script type |
| utility |
| |
| description |
method to simply an quickly post expand a cmd. "index ff<c-cr>" for example.
(<c-cr> being mapped to this cmd.)
NOTE this is a QUICKY!
For what it is worth, hopefully useful to someone :)
The reason for this over a basic mapping, or DrC.Stubs is the ability to
specify the variable(s) to work on.
I.e.
iInd < m_array.size() for<c-cr>
for ( iInd = 0; iInd < m_array.size(); iInd++)
{
<cursor>
}
or
m_array ff<c-cr>
for(int i=0;i<m_array.length; i++){
<cursor>
}//end for loop over array m_array[i]
NOTE that the command function shold leave the cursor in a position that a
normal mode `o` will place the cursor at the desired location. Kind of a HACK
but good enough for now. |
| |
| install details |
| Drop in ~/.vim/plugin or the like. |
| |
script versions (upload new version)
Click on the package to download.
ip used for rating: 216.73.216.44
|