SciTE-mruby is a SciTE based text editor with mruby scripting extension.
SciTE is a cross-platform text editor written by Neil Hodgson.
- All SciTE features :)
- Extendable by a mruby script code like a Lua script
- Embedded ExtMan rewritten in mruby
- Support to run mruby script without saving as a file (Alt+Ctrl+R key)
- (Not Yet)Visual mruby script debugger
(Not Yet)
git clone https://github.com/mruby/mruby.git
MRuby::Build.new do |conf|
# ... (snip) ...
conf.gem :core => 'mruby-eval'
conf.gem :git => 'https://github.com/iij/mruby-io.git'
conf.gem :git => 'https://github.com/iij/mruby-dir.git'
conf.gem :git => 'https://github.com/iij/mruby-regexp-pcre.git' # or conf.gem :git => 'https://github.com/mattn/mruby-onig-regexp.git'
conf.gem :git => 'https://github.com/sdottaka/mruby-bin-scite-mruby.git'
conf.gem :git => 'https://github.com/mattn/mruby-require.git' # or conf.gem :git => 'https://github.com/iij/mruby-require.git'
end
cd mruby
rake
Lua | mruby | |
---|---|---|
scite object |
scite |
SciTE or $scite |
editor object |
editor |
Editor or $editor |
output object |
output |
Output or $output |
scite/editor/output object method/property names | UpperCamelCase e.g.) editor.GetText |
snake_case or lowerCamelCase e.g.) Editor.get_text or Editor.getText |
event handler | OnOpen ... |
on_open or onOpen |
ExtMan event functions | scite_OnOpen |
SciTE.on_open(&block) or SciTE.onOpen(&block) |
ExtMan functions | scite_Command |
SciTE.command or SciTE.define_command(name, mode = nil, shortcut_key = nil, param = nil, &block) |
- Click [Options] -> [Open mruby startup script]
- Add the code below and save it
SciTE.define_command "Eval selected text as mruby script", "*", "Ctrl+9" do
if Editor.selectionStart == Editor.selectionEnd
p eval(Editor.getText)
else
p eval(Editor.getSelText)
end
end
SciTE.on_open_switch do |file|
Editor.mouseDwellTime = 300
end
SciTE.on_dwell_start do |pos, word|
if word != ""
Editor.callTipShow pos, word.upcase
else
Editor.callTipCancel
end
end
SciTE.define_command "Insert ABC", "*", "Ctrl+8" do
SciTE.userListShow ["A", "B", "C"] do |str|
Editor.insertText Editor.currentPos, str
end
end
See examples
directory
See *_License.txt