zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
24.84k stars 1.17k forks source link

Output pane #867

Open ghost opened 6 years ago

ghost commented 6 years ago

I like how Zachary solved showing keybindings using Alt+G shortcut. Not because I need these shortcuts, but it reminds me the output window in Sublime Text. What if micro would have such output pane? Where command outputs by example build results instead of switching to terminal?

I have something like "runner" plugin, this is part of it:

function mode1()
    local buf = CurView().Buf -- The current buffer
    if buf:FileType() == "go" then
        HandleShellCommand("go run " .. buf.Path, true, true)
    elseif buf:FileType() == "php" then
        HandleShellCommand("php " .. buf.Path, true, true)
    elseif buf:FileType() == "tcl" then
        HandleShellCommand("jimsh " .. buf.Path, true, true)
    elseif buf:FileType() == "lisp" then
        HandleShellCommand("newlisp " .. buf.Path, true, true)
    elseif buf:FileType() == "lua" then
        HandleShellCommand("lua " .. buf.Path, true, true)
    end
end

Than I run appropriate program using shortcut: "Alt-r": "Save,runner.mode1"

Having scrollable output directly in micro pane would be perfect. It works particularly when I set openTerm param to false but whole output is in single line (in command line)

As a bonus horizontal or vertical orientation of the output pane would be configurable.

ghost commented 6 years ago

something along those lines is now in the making

I like how Zachary solved showing keybindings using Alt+G shortcut. Not because I need these shortcuts, but it reminds me the output window in Sublime Text.

this is actually already working