Hello, "Oleksandr Manzyuk" <[email protected]> :
> I have a general question: Is there a way to create custom text > objects in Vim (or to redefine the existing text objects)? Yes, you will have to define an o-map that plays with visual selection. I can't tell whether this is a normal behaviour or just a temporary hack that will stop working eventually. On vim.wikia, there is a tip that shows how to define such a mapping. http://vim.wikia.com/wiki/Indent_text_object I've applied it to define a motion that select parameters (in function calls or definitions). http://code.google.com/p/lh-vim/source/browse/cpp/trunk/plugin/omap-param.vim NB: it requires my vim-library available on the same site. [...] > so I am thinking about writing my own plugin, but I am > confused: what are text objects from the point of view > of Vim script? Note that I want text objects to be used > both in Visual and Operator-pending mode. You will also have to define a separate visual mode mapping. HTH, -- Luc Hermitte http://lh-vim.googlecode.com/ http://hermitte.free.fr/vim/ --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
