Commit Graph

422 Commits

Author SHA1 Message Date
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
3f0c5791b4 Update readme 2016-06-03 11:14:11 -04:00
Zachary Yedidia
3d62a1baa0 Don't display cursorline if there is a selection 2016-06-02 13:15:47 -04:00
Zachary Yedidia
7e218562a3 Remove "Applying Diff" message on reopen
Fixes #160
2016-06-02 13:05:57 -04:00
Zachary Yedidia
e6c6c7f47d Merge 2016-06-02 13:04:11 -04:00
Zachary Yedidia
1d52ef6c54 Add simple way to save with sudo if you forgot to open micro with sudo
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-work

Fixes #158
2016-06-02 13:01:13 -04:00
Zachary Yedidia
119c05a170 Merge pull request #154 from jtolds/master
chainable actions and flexible modifiers
2016-06-02 11:22:19 -04:00
Zachary Yedidia
931a895406 Merge pull request #159 from onodera-punpun/syntax_cleanup
Clean up shell and fish syntax files
2016-06-02 10:15:02 -04:00
Camille Scholtz
2583f52c8f Clean up shell and fish syntax files 2016-06-02 14:35:09 +02: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
98b006d0be Merge pull request #153 from aerth/simplify-go-get
Simplify go get command
2016-06-01 07:45:19 -04:00
Zachary Yedidia
5e83b2c99a Fix redraw glitch 2016-06-01 07:45:01 -04:00
aerth
ccd3050361 Simplify go get command 2016-05-31 21:23:48 -07:00
Zachary Yedidia
cd6389c49e Make CursorPageUp and CursorPageDown default
This commit also fixes the documentation for PageUp and PageDown.

See #149
2016-05-31 19:45:19 -04:00
Zachary Yedidia
312595ba4f Merge 2016-05-31 19:25:35 -04:00
Zachary Yedidia
64c0446b8d Fix redraw glitch 2016-05-31 19:25:32 -04:00
Zachary Yedidia
2ed62509a8 Merge pull request #150 from jtolds/master
Add CursorPageUp and CursorPageDown actions
2016-05-31 18:15:22 -04:00
JT Olds
8bd23a575f Add CursorPageUp and CursorPageDown actions 2016-05-31 16:02:42 -06: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
ef17306f8b Allow changes from external programs to be undone
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
2016-05-30 21:01:40 -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
e3e50dd6f6 Add DeleteWordRight and DeleteWordLeft bindings 2016-05-29 19:09:27 -04:00
Zachary Yedidia
9252be6d3b Update readme 2016-05-29 18:20:43 -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
ee9f2a3d9c Add persistent undo as the option 2016-05-29 11:02:56 -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
1c127a6c3f Merge 2016-05-28 17:32:13 -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
82594b9beb Merge pull request #133 from onodera-punpun/packages
Add Arch and CRUX installation guides.
2016-05-28 15:53:48 -04:00
Zachary Yedidia
96c7bc67c0 Make Quit() close help if its open and not the whole editor
Fixes #146
2016-05-28 14:53:48 -04:00
Zachary Yedidia
87d147cf92 Indicate correct help binding in status line 2016-05-28 13:58:42 -04:00
Zachary Yedidia
a08f457cd0 Allow users to insert \t and \n in replace commands
Fixes #144
2016-05-28 11:40:22 -04:00
Zachary Yedidia
b641d67561 Rematch every time a replacement is made 2016-05-28 11:36:48 -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
d9d0af4a99 Merge pull request #139 from onodera-punpun/undo_option
make undothresthold a setting and add stackundo option
2016-05-27 18:05:37 -04:00
Camille
00fe82e9c7 Fix typo 2016-05-27 23:39:53 +02:00
Camille Scholtz
1806ef3ad0 Remove undo options, make stackundo default behavior 2016-05-27 23:39:27 +02:00
Camille Scholtz
007ece1e78 Add stackundo option 2016-05-26 19:36:59 +02:00
Zachary Yedidia
66d448a59c Fix highlighting and searching with unicode characters
Fixes #134
Fixes #138
2016-05-25 11:49:04 -04:00
Zachary Yedidia
ca58fc949e Make sure there is a selection before deleting it
Fixes #140
2016-05-24 17:46:46 -04:00
Camille Scholtz
e553815501 make undothresthold a setting (part 2) 2016-05-24 21:40:05 +02:00
Camille Scholtz
3da2a870b6 make undothresthold a setting 2016-05-24 21:38:46 +02:00
Zachary Yedidia
f730864e9f Do a bounds check for charpos function 2016-05-24 09:15:01 -04:00
Zachary Yedidia
55a6b6701d Fix crash 2016-05-22 20:59:31 -04:00