sponsor Vim development Vim logo Vim Book Ad

vim-surround-funk : Delete/Change/Yank/Paste surrounding functions (based on tpope's surround.vim)

 script karma  Rating 37/10, Downloaded by 54  Comments, bugs, improvements  Vim wiki

created by
Matthew Bennett
 
script type
utility
 
description
This plugin was inspired by tpope's surround.vim and allows you to delete, change and yank a surrounding function along with its additional arguments.

It defines a couple of text objects for targeting an entire function or just its name and also defines a new command to 'grip' any text object (include another function, since now there's a text object for that). 'Gripping' will wrap/encompass text object or motion with the function that you previously deleted/yanked (For full details and demos, see https://github.com/Matt-A-Bennett/vim-surround-funk).
 
install details
Use your favourite plugin manager. See Installation instructions at https://github.com/Matt-A-Bennett/vim-surround-funk
 

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
vim-surround-funk.tar.gz 2.1.1 2022-01-25 7.0 Matthew Bennett Bug Fix:
Fail gracefully when the gs operator is used, but a function call has not been previously deleted/yanked in the first place (hence the gs operator is not valid).
vim-surround-funk.tar.gz 2.1.0 2022-01-25 7.0 Matthew Bennett Add the gS operator, which allows you to grip a text object or motion with a function specified on the command line. The cursor is left in insert mode just before the last parenthesis in case you want to start adding trailing arguments.
vim-surround-funk.tar.gz 2.0.0 2022-01-21 7.0 Matthew Bennett No code changes here: Just renaming the plugin to be consistent with tpope's vim-surround (which was the plugin directly inspiring this one)
surround-funk.tar.gz 2.0.0 2022-01-19 7.0 Matthew Bennett Add full text object support:

Two new text objects for entire functions and just their names (accessible from anywhere on the function).

New operator pending command for gripping any text object (including function text objects, see above) with a previously deleted/yanked function.
surround-funk.tar.gz 1.1.1 2022-01-17 7.0 Matthew Bennett Fix bug: I misspelled the global variable name in the plugin compared to the README and doc files. This would have prevented users from disabling the default mappings as per the instructions in the README and doc files.
surround-funk.tar.gz 1.1.0 2022-01-16 7.0 Matthew Bennett Add support for multi-line functions
surround-funk.vim 1.0.0 2022-01-09 7.0 Matthew Bennett Initial upload
ip used for rating: 3.87.33.97

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.
   
OSDN