vim-runscript is a Vim plugin that allows you to execute script files and process text content through custom commands.
- Automatically scans script directory and registers available scripts
- Supports text selection processing
- Supports parameter passing and result insertion
Recommended Vim 8.1+
" Using Vundle
Plugin 'bleakwind/vim-runscript'And Run:
:PluginInstallAdd these to your .vimrc:
" Set 1 enable runscript (default: 0)
let g:runscript_enabled = 1
" Specifies the directory path for user-defined custom scripts (default: '')
let g:runscript_inpscpt = '/pub/_program/vim/_tool/runscript/script'
" Set runscript inputdata place (default: $HOME.'/.vim/runscript')
let g:runscript_inppath = g:config_dir_data.'runscript'
" Set runscript command (default: php)
let g:runscript_runcomm = 'php -d html_errors=0'Put these to your .vimrc for quick access:
map <Leader>r :<C-\>erunscript#ReadyComm()<CR>
vmap <Leader>r :<C-\>erunscript#ReadyComm()<CR>- Select text in visual mode
- Press
<Leader>r, and presstabselect command and runscript - Selected text will be replaced with script output
BSD 2-Clause - See LICENSE file
