blockit : a vim plugin to wrap lines in a block
| script karma
Downloaded by 223
Comments, bugs, improvements
script versions (upload new version)
Project hosted at Github: https://github.com/sk1418/blockit
screenshot and demo animation can be found at the link above.
When we are coding or editing text in vim, sometimes we want to wrap some lines of text (or in visual selections) in a block, which built by ascii chars. blockit is the vim plugin, to make this work easily to be done. One can "draw" block in different style. Please read next section for detailed features.
- horizontal/vertical char of the block border could be defined separately
- margin between text and block border can be customized
- block width can be dynamic (auto fit text width) or fixed
- supports 4 in-block text alignment (No align., left-align., right align. center align.)
- supports line-wise and block-wise visual selection text blocking (via key-mapping)
- provide command to block line range
There are 5 variables could be customized to configurate block style: (more detailed information please check the plugin doc.)
varialbe values default
g:blockit_H_char string: horizontal border char(s) '-'
g:blockit_V_char string: vertical border char(s) '|'
g:blockit_margin int: margin between text and border 1
*g:blockit_fixed_length int: if you want the block has fixed width, value >=5 0
g:blockit_align string: one of 'c','l','r','n' 'n' (no alignment)
* for the fixed length, please read the plugin docs for details.
It is easy to use the blockit plugin. There are two commands and one mapping ready to use.
[range]:Block: This command will block the line range, with the settings in "Configuration" section.
:BlockitVersion will print the current version info of installed blockit
Mapping is only available in line-wise or block-wise visual selection mode.
This mapping will block the visual selected text.
You can of course customize the mapping in this way:
vmap (Your_Mapping) <Plug>BlockitVisual
|extract the archive into ~/.vim
or use plugin management like Vundle: add
Click on the package to download.
ip used for rating: 126.96.36.199