Merge branch 'tabbar'
This branch adds support for having multiple tabs open, each viewing one
file. Use CtrlT to open a new tab empty tab and then CtrlO to open a
file in that tab. Use can also just open multiple files from the command
line: `micro file1.txt file2.txt ...`. Use Ctrl-] and Ctrl-\ to move
between the tabs, or simply click them with the mouse.
I forgot that when you remove lines[n] then lines[n+1] becomes lines[n]
so to remove the range lines[a:b] you need to remove lines[a] for a-b
times. In this case we should delete lines[start.Y + 1] over and over
instead of removing lines[i] because i is contantly increasing.
Fixes#166
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",
We don't have to clear the screen every time, we only have to make sure
that we erase the rest of the line that used to be on the current line.
We can still optimize a bit more by finding the longest line and drawing
to that length, but using the full width is fine for now.
We use a diff to be able to transform the buffer into an arbitrary
string (usually when we reread the file after an external program such
as gofmt has changed it) and still preserve undo/redo.
Fixes#136