-
Notifications
You must be signed in to change notification settings - Fork 1
Run variable types of code against current buffer
vim-scripts/Rcode
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a mirror of http://www.vim.org/scripts/script.php?script_id=3705 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 (中文版文档) http://lilydjwg.is-programmer.com/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"
About
Run variable types of code against current buffer
Resources
Stars
Watchers
Forks
Packages 0
No packages published