Rcode : Run various types of code against current buffer
script karma |
Rating 3/3,
Downloaded by 1642 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
lilydjwg |
|
script type |
utility |
|
description |
Rcode enables you to write short script to handle your text. It supports
VimScript, Awk (via external command), Perl, Python 2 & 3, Ruby and Lua.
Usage:
See also at the top of the plugin file as it's formatted better.
Chinese Version (中文版文档) https://blog.lilydjwg.me/2011/12/21/rcode-vim-2-0-released.31390.html
Commands And Maps:
:Rcode Start Rcode. Accept an argument as the language, eg:
vim, awk, etc. Use <C-D> to see all available ones.
A new buffer will be opened for you. Write your code
in it.
You can give a range.
:RcLoad {name} Load a previous saved code snippet.
"name" should be in the form "{lang}/{filename}" so
that the script knows which language it's in. This is
different from ":Save" command.
You can give a range.
:RcSelect List all available code snippets and you can choose
one by number
In Rcode buffer:
<C-CR>
:Run Run your code against the buffer you were.
:Save {name} Save your code so you can later load it with
":RcLoad"
Shortcut:
in Python, 'v' is the 'vim' module, and 'b' is the current buffer,
in Lua, 'b' is the current buffer.
Settings:
g:Rcode_after what to do after running your code.
0 means to do noting, 1 means to close the code buffer
and 2 will throw away your code besides closing the
buffer, or you code will be loaded next time you use
":Rcode".
Default is 1.
g:Rcode_snippet_path Where you saved code snippets will lie.
Default is "$HOME/.vim/rcode"
|
|
install details |
Put it in your ~/.vim/plugin. |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 3.142.135.246
|