Commit Graph

100 Commits

Author SHA1 Message Date
Zachary Yedidia
bcbef1c633 Add horizontal splits 2016-07-02 17:41:23 -04:00
Zachary Yedidia
7e0286b621 Fix redrawing for splits 2016-07-02 17:41:23 -04:00
Zachary Yedidia
9b9ae89e59 Quick first try at vertical splits 2016-07-02 17:41:23 -04:00
Zachary Yedidia
47efea6501 Add onRune(r string) callback for plugins
Define this function in a plugin (which takes one argument) to be
notified whenever a character is typed, and the character will be passed
as the argument.
2016-06-21 17:57:25 -04:00
Zachary Yedidia
77b6c2c486 Auto prefix for plugin functions
YOu no longer have to prefix all functions in a plugin with the plugin
name (linter_onSave). This will now be done automatically using lua's
setfenv. When passing a function as a callback to a editor function,
make sure to prefix the plugin name (linter.onExit, or go.goimports) so
that micro knows which plugin to call the function from.
2016-06-21 17:49:57 -04:00
Zachary Yedidia
4a860625af Also allow ModShift to be on for windows terminals
Fixes #165
2016-06-11 19:41:37 -04:00
Zachary Yedidia
cdfea45a49 Fix cursor line in true color colorschemes
Ref #171
2016-06-09 16:00:43 -04:00
Zachary Yedidia
e2079ac88e Add file completion to OpenFile (CtrlO) with tab 2016-06-09 10:03:50 -04:00
Zachary Yedidia
1f89b41070 Fix mouse coordinates when tabbar is open
Fixes #170
2016-06-09 09:29:23 -04:00
Zachary Yedidia
059a5c3b89 Resize the view correctly when there is only one tab left 2016-06-08 14:38:15 -04:00
Zachary Yedidia
57f769c9a1 Don't display the tab bar if only one tab is open 2016-06-08 13:29:24 -04:00
Zachary Yedidia
40affa56c7 Create tab struct and reorganize tab bar 2016-06-08 13:26:50 -04:00
Zachary Yedidia
5f19f69681 Tab bar and support for opening multiple files 2016-06-08 12:19:36 -04:00
Zachary Yedidia
72f5808025 Replace rope with lineArray 2016-06-07 11:43:28 -04:00
Zachary Yedidia
d6307b2718 Proper support for double width characters
Fixes #99
2016-06-04 16:25:11 -04:00
Zachary Yedidia
852bd2c904 Fix redraw bug
Fixes #162
2016-06-04 16:00:53 -04:00
Zachary Yedidia
3d62a1baa0 Don't display cursorline if there is a selection 2016-06-02 13:15:47 -04:00
JT Olds
646cdd6a9f chainable actions and flexible modifiers
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",
2016-06-01 19:43:30 -06:00
Zachary Yedidia
9e96623725 Small improvement to line selection 2016-06-01 18:00:49 -04:00
Zachary Yedidia
742370646f Add cursorline option 2016-06-01 10:05:17 -04:00
Zachary Yedidia
5e83b2c99a Fix redraw glitch 2016-06-01 07:45:01 -04:00
Zachary Yedidia
64c0446b8d Fix redraw glitch 2016-05-31 19:25:32 -04:00
Zachary Yedidia
74cac8291a Screen redraw optimization
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.
2016-05-31 17:23:08 -04:00
Zachary Yedidia
d4caf4510c Fix bug with on reopen 2016-05-30 18:22:10 -04:00
Zachary Yedidia
b312e7c9ad Refactor ReOpen function 2016-05-30 17:48:33 -04:00
Zachary Yedidia
7adcb13c08 Add support for user-created commands
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`.
2016-05-30 13:38:50 -04:00
Zachary Yedidia
68189fd406 Add ability to bind lua functions defined in plugins 2016-05-30 09:12:04 -04:00
Zachary Yedidia
19717dd3ae Check if the file being edited has been modified by an external program 2016-05-29 17:58:06 -04:00
Zachary Yedidia
1fe18eecb7 Add history navigation with up and down arrows
Fixes #145
2016-05-28 18:41:53 -04:00
Zachary Yedidia
a92a7dc4e6 Add savecursor option
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
2016-05-28 17:29:49 -04:00
Zachary Yedidia
e8d8da1443 Refactor and clean up
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
2016-05-28 11:32:09 -04:00
Zachary Yedidia
55a6b6701d Fix crash 2016-05-22 20:59:31 -04:00
Zachary Yedidia
7d1d118fee Improve the scrollmargin behavior at the end of the buffer 2016-05-22 17:52:42 -04:00
Zachary Yedidia
74e55f03fe Merge pull request #130 from onodera-punpun/center_search
Add a bit of "padding" to relocate.
2016-05-22 15:35:29 -04:00
Zachary Yedidia
f9adcd525d Add ability to bind alt keys
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...
2016-05-22 15:33:40 -04:00
Zachary Yedidia
df684ec505 Store cursor and eventhandler in buffer instead of view
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).
2016-05-22 15:01:02 -04:00
Camille Scholtz
52f1be5725 simplify scrollmargins 2016-05-20 20:06:01 +02:00
Camille Scholtz
9791f192f8 Move scrollmargin declaration 2016-05-20 19:46:18 +02:00
Camille Scholtz
116b247439 Add scrollmargin option, rename scrollSpeed to scrollspeed for consistency, make help.md more consistent (replaced some spaces with tabs) 2016-05-20 19:44:16 +02:00
Camille Scholtz
096221fd0e Add padding to relocate func (fixes weird scrolling behavior) 2016-05-20 17:43:26 +02:00
Camille Scholtz
bbcd33d9fd Add a bit of "padding" to relocate 2016-05-20 17:34:20 +02:00
Zachary Yedidia
ebaad9b00c Use the new and updated version of tcell 2016-05-20 09:19:25 -04:00
Zachary Yedidia
77d8a2217f Fix selection graphics for indentchar 2016-05-18 09:33:49 -04:00
Zachary Yedidia
6d394efcd9 Remove some unnecessary code
Fixes #104
2016-05-17 13:39:27 -04:00
Zachary Yedidia
c727775557 Merge pull request #111 from onodera-punpun/fix_jump
Fix jumping in rxvt-unicode when switching focus
2016-05-17 13:38:59 -04:00
Camille
baddc4107e Change relocate from true to false 2016-05-17 19:31:36 +02:00
Zachary Yedidia
363697a657 Fix capitalization of scrollSpeed option
Closes #114
2016-05-17 12:53:46 -04:00
Zachary Yedidia
abddd6eecd Merge pull request #110 from onodera-punpun/indentchar
Add indentation character option(s).
2016-05-17 12:37:47 -04:00
Camille Scholtz
87a0c06197 Add scrollspeed option 2016-05-17 18:15:47 +02:00
Camille Scholtz
93927cf0f5 Rename indent-line to indent-char, change default value from | to 2016-05-17 18:09:49 +02:00