vim-scripts / omap.vim Goto Github PK
View Code? Open in Web Editor NEWcreate user-defined operator mappings
Home Page: http://www.vim.org/scripts/script.php?script_id=1246
create user-defined operator mappings
Home Page: http://www.vim.org/scripts/script.php?script_id=1246
This is a mirror of http://www.vim.org/scripts/script.php?script_id=1246 Omap.vim provides the :Omap command, among others, which creates user-defined operator commands (like y c d and g?, see :help operator for more info). To demonstrate, this command can be used to add functionality to other scripts. You can use Omap.vim in conjuction with EnhancedCommentify.vim (vimscript #23) to create a commenting operator. Assuming both EnhancedCommentify.vim and Omap.vim are installed in your vim plugin directory, add the following commands to your .vimrc file: let g:EnhCommentifyUserBindings = 'yes' runtime plugin/Omap.vim Omap <silent> <unique> <leader>c <Plug>Commentj Omap <silent> <unique> <leader>u <Plug>DeCommentj This will stop the default mappings being defined by EnhancedCommentify.vim and in their place create comment (\c) and uncomment (\u) operators. This allows commenting to be carried out over areas defined by vim motions and text objects. For example: \cc -- comments a line . -- comments the next line (repeats last command) 3\cc -- comments three lines \uu -- uncomments a line \c4j -- comments the current line and the four following lines \caB -- comments a block of code Note that the dot (.) command (see :help .) works to repeat Omaps even though they are mappings. A command, :DotCommandSet, is defined by Omap.vim which allows other mappings to similarly be repeated using the dot command. For more detailed help see the help documentation in the archive below.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.