Closes#270
CtrlU to toggle recording and CtrlJ to playback.
You can also rebind using the "ToggleMacro" and "PlayMacro"
actions.
Note that recursive macros are not yet supported.
This commit changes the default keybindings for Home and End. It
also changes the InsertEnter action to InsertNewline (a better name)
although InsertEnter is still valid for backwards compatibility.
Closes#206
I was under the impression that tcell couldn't detect shift tab
key presses, but this was incorrect. It turns out that tcell just
calls it backtab. This commit makes backtab the default binding
for OutdentSelection.
See #203
Tab is now bound to both IndentSelection and InsertTab.
There is currently no binding for OutdentSelection (the user can
bind that to their liking). Hopefully in the future it can be bound
to shift-tab but tcell does currently support that.
Closes#203
This commits adds split navigation with the mouse and the ability to
close splits. You can now also open a file directly with the hsplit
and vsplit commands.
If you are editing a read-only file and forgot to open micro with sudo
so you could write to it, when saving the file, micro will now give you
the option to save with sudo.
This little hack is used by vim users to achieve the same behavior, but
micro makes it nicer to use. Here is an explanation for how it works:
http://stackoverflow.com/questions/2600783/how-does-the-vim-write-with-sudo-trick-workFixes#158
Doesn't work quite right yet, but the idea is to support
arbitrary modifiers without having to hardcode in all the permutations
of alt/shift/ctrl for every key, along with chainable actions,
so this can be configured:
"AltBackspace": "SelectWordLeft,Backspace",
Plugins can now create their own commands using the `MakeCommand`
function. Plugins can also now create their own keybindings with the
`BindKey` function. See the go plugin for an example of `MakeCommand`.
This adds the `savecursor` option which will remember where the cursor
was when the file was closed and put it back when the file is opened
again. The option is off by default so that people aren't confused as to
why the cursor isn't at the start of a file when they open it.
This commit also adds a more general ability to serialize a buffer so
various components can be saved (which could also be useful for persistent
undo).
Fixes#107
This commit puts in place the ability for multiple views (splits).
This commit also removes the editor bindings so that all bindings can be
rebound by the user.
I also added some more comments
This fixes#109
This lets you bind keys like Alt-b or Alt-f.
This commit also adds some new default keybindings in emacs style, so
alt-a is beginning of line and alt-e is end etc...
This is better design because the cursor and eventhandler are things the
buffer should know about directly but the view shouldn't. This should
make it easier to add persistent undo or location saving between
sessions (see #107).