108 Commits

Author SHA1 Message Date
Zachary Yedidia
6f302826c8 Add bracket surround 2017-09-13 10:48:53 -04:00
Zachary Yedidia
202cfb574c Only write settings if no error when reading
This commit also switches from yosuke-furukawa/json5 to flynn/json5
because yosuke-furukawa/json5 does not provide a license.

Ref zyedidia/json5#1

Closes #775
2017-08-06 12:02:17 -04:00
Markus F.X.J. Oberhumer
d38055f825 Add support for xterm CtrlPgUp and CtrlPgDn keys. 2017-06-19 19:37:55 +02:00
Zachary Yedidia
00718f99cf Add ability to add cursors with Ctrl-MouseLeft
With the new code that allows binding mouse buttons this was remarkably
easy to add.

The new binding is:

    "Ctrl-MouseLeft": "MouseMultiCursor"

Note: A number of terminals don't support Ctrl-MouseLeft (macOS
especially) so you might want to rebind to MouseRight or MouseMiddle.
2017-06-12 20:25:10 -04:00
Zachary Yedidia
c45ff4dd4f Add multiple cursor support
This commit creates new keybindings and actions to handle multiple
cursors.

Here are the defaults:

    "Alt-n": "SpawnMultiCursor",
    "Alt-p": "RemoveMultiCursor",
    "Alt-c": "RemoveAllMultiCursors",
    "Alt-x": "SkipMultiCursor",
2017-06-12 20:25:10 -04:00
Zachary Yedidia
3270acdd00 Add functionality for binding mouse buttons
This commit enables users to bind the mouse buttons (left, middle,
right buttons and the scroll wheel).

The default bindings now include the mouse bindings:

    "MouseWheelUp":   "ScrollUp",
    "MouseWheelDown": "ScrollDown",
    "MouseLeft":      "MousePress",
    "MouseMiddle":    "PastePrimary",

Mouse buttons can now also be bound to normal actions. For example:

    "MouseLeft": "Backspace"

This also means that plugins can access mouse event callbacks in the
standard way ('onAction').

More documentation for this will be coming soon.

Fixes #542
2017-06-11 17:49:59 -04:00
Zachary Yedidia
d1e70b5abf Add suspend for linux only 2017-05-21 10:44:33 -04:00
Zachary Yedidia
a6ee75a9cf Add SaveAll command and display + for modified tabs
Closes #651
2017-05-05 11:05:23 -04:00
Nichlas Severinsen
5afda4e76c Added more default bindings:
- Shift+Home for selecting to start of line
- Shift+End for selecting to end of line
These already exist as Ctrl+Shift+Left/Right-arrow
2017-04-16 15:34:44 +02:00
CaptainMcClellan
c29e58e3d4 Syntax Highlight Overhaul (#568)
* Adds new syntax groups and docs
* Large refactor of syntax highlighting files

* Changed keybindings for changing tabs.

* Improved the documentation.

* Added F3 for find to default bindings.

* Massive overhaul of the syntax files

* Phase 1 color-scheme updates.

* The new colorschemes.

* Colorscheme and syntax updates.

* Tiny fix to the cmc theme.

* Another phase of colorschemes and testing gitconfig.

* Fixed haskell error

* Fortran fix

* Delete test.txt

Heh, sorry about forgetting to do this again.
2017-03-01 09:30:35 -05:00
Zachary Yedidia
043f7cdc47 Fix various linter and vet warnings 2017-02-21 13:07:37 -05:00
Zachary Yedidia
ae566920b6 Merge pull request #518 from samdmarshall/key-unbinding
Key unbinding
2017-01-04 13:56:34 -05:00
Zachary Yedidia
036ed7b9ed Add SaveAs action
Fixes #509
2017-01-04 13:51:17 -05:00
Samantha Marshall
29502e7f41 simplify the code around unbinding keys 2017-01-02 11:28:47 -05:00
Samantha Marshall
362d8eabae Adding functionality to unbind keys
* adds new special-case keybinding to remove an existing default key binding.
* hides the show/close help text in the status line when no key is assigned to "ToggleHelp"
* updating documentation
2017-01-02 10:56:55 -05:00
Nicolai Søborg
128dc9fea1 Log erroneous keybindings 2016-12-05 17:02:46 +01:00
Jon Craton
cc9342df9d Added OutdentLine action 2016-10-15 12:47:15 -04:00
Saeed Rasooli
127ebc15b9 Improvement: improve Search behaviour, and Escape key behaviour 2016-10-13 00:49:43 +03:30
Saeed Rasooli
c1dd403ab9 Feature: add MoveLinesUp (Alt + Up) and MoveLinesDown (Alt + Down) actions 2016-10-12 08:15:46 +03:30
Zachary Yedidia
3733e7e223 Add 'Unsplit' action and VSplit and HSplit actions
This commit adds the 'Unsplit' action used to close all splits except
the current one.

It also adds the 'VSplit' and 'HSplit' actions which open empty
vertical/horizontal splits so you can bind them to keys.

Closes #228
2016-10-04 11:08:32 -04:00
Zachary Yedidia
7d16e97b95 Switch to my fork of json5
This should reduce go get download times for micro considerably
because the original json5 committed a bunch of binaries which
cause the repository to be very large and slow to download.

My fork fixes that.
2016-09-29 18:43:10 -04:00
Zachary Yedidia
c1d08a6dc0 Fix typo 2016-09-26 12:08:35 -04:00
Zachary Yedidia
5cc66cef42 Fix problems recognizing CtrlH
Fixes #368

The 'Backspace2' key has been renamed to 'Backspace'.
2016-09-26 09:34:55 -04:00
anatoly techtonik
a853164302 Usability integration with file managers 2016-09-08 00:11:51 +03:00
Zachary Yedidia
539495d2f7 Add support for macros
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.
2016-09-06 10:44:15 -04:00
Zachary Yedidia
0a534767f0 Merge branch 'primary-clipboard' 2016-09-05 11:37:49 -04:00
Zachary Yedidia
b905400892 Add default bindings for CtrlHome and CtrlEnd
Fixes #280
2016-09-03 13:37:16 -04:00
Zachary Yedidia
b45fcf5bd7 Use json5 for config files 2016-09-02 11:12:16 -04:00
Zachary Yedidia
d9b8a04841 Add support for primary clipboard 2016-09-02 09:40:08 -04:00
Zachary Yedidia
b6f5db3692 Add QuitAll action to close all splits and tabs at once
See #239
2016-08-30 17:38:46 -04:00
Zachary Yedidia
dbdfef632e Add center action to center the view on the cursor 2016-08-24 15:48:11 -07:00
Zachary Yedidia
d17cc0f628 Add boolean option to actions to disable the lua callback 2016-08-17 14:16:27 -04:00
Zachary Yedidia
de9567322b Rebind Home and End to StartOfLine and EndOfLine
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
2016-08-16 10:55:04 -04:00
Zachary Yedidia
c409f1cc07 Bind OutdentSelection to ShiftTab (Backtab)
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
2016-08-07 21:41:12 -04:00
Zachary Yedidia
586a66b3a4 Bindings for IndentSelection and OutdentSelection
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
2016-08-07 19:45:35 -04:00
Zachary Yedidia
f2ec82520a Separate bindings and actions into two files 2016-07-10 13:30:28 -04:00
Zachary Yedidia
3089967546 Add binding to move to next split (default binding: CtrlW) 2016-07-02 17:41:23 -04:00
Zachary Yedidia
4a15a1d3c8 Add the ability to close splits and change splits using the mouse
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.
2016-07-02 17:41:23 -04:00
Zachary Yedidia
cb238db307 Merge pull request #189 from onodera-punpun/sudosave
bindings:go: Only display saved message if actually saved
2016-06-30 11:08:12 -04:00
Camille Scholtz
151df0d2aa bindings:go: Only display saved message if actually saved 2016-06-30 16:49:32 +02:00
Zachary Yedidia
2002cb6579 Wrap around when using NextTab and PreviousTab
Fixes #188
2016-06-28 21:29:46 -04:00
Zachary Yedidia
aa8a329745 Fix JumpLine range
Fixes #187
2016-06-28 21:26:19 -04:00
Zachary Yedidia
c51c185be6 Add feedback to save with sudo
Fixes #183
2016-06-25 13:42:21 -04:00
Zachary Yedidia
e2079ac88e Add file completion to OpenFile (CtrlO) with tab 2016-06-09 10:03:50 -04:00
Zachary Yedidia
2c73e1c043 Add default bindings for PreviousTab and NextTab 2016-06-08 18:48:59 -04:00
Zachary Yedidia
a79e964cb6 Make tabs respond to mouse events 2016-06-08 17:47:48 -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
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
bd0fa7b6c2 Add DeleteLine binding
Ref #135
2016-06-07 21:47:34 -04:00