Commit Graph

72 Commits

Author SHA1 Message Date
Zachary Yedidia
c606c51c8b Close fd properly in save
Fixes #1057
2018-03-30 15:59:26 -04:00
Zachary Yedidia
cb45481526 Make tab views array public
Ref #1024
2018-03-02 19:50:33 -05:00
Zachary Yedidia
a37c30b889 Fix resize when prompt is active
Fixes #1020
2018-02-04 22:58:20 -05:00
Zachary Yedidia
7e3aa337f6 Fix autocomplete on empty prompt 2018-01-10 15:41:49 -05:00
Zachary Yedidia
d82867ee53 Add more comments 2018-01-04 17:14:51 -05:00
Zachary Yedidia
9094c174cc Initial support for terminal within micro
This commit adds beta support for running a shell or other program
within a micro view.

Use the `> term` command. With no arguments, `term` will open your
shell in interactive mode. You can also run an arbitrary command
with `> term cmd` and the command with be executed and output
shown. One issue at the moment is the terminal window will close
immediately after the process dies.

No mouse events are sent to programs running within micro.

Ref #243
2018-01-04 17:03:08 -05:00
Zachary Yedidia
a814677b51 Improve command bar completion 2018-01-03 21:35:03 -05:00
Zachary Yedidia
bf33ab532c Store string keys for bindings 2017-12-03 23:15:32 -05:00
Zachary Yedidia
5fc8f847a6 Improve command bar keybindings
The command bar now supports better keybindings:

CtrlA, CtrlLeft: start of line
CtrlE, CtrlRight: end of line
CtrlF, AltRight: next word
CtrlB, AltLeft: previous word
CtrlW, AltBackspace: delete previous word
CtrlV: Paste
Arrow keys as usual

These keybindings are not rebindable (maybe support will be added
in the future).
2017-11-24 14:43:26 -05:00
Zachary Yedidia
7f287b62fb Fix autocomplete behavior for empty args
This also adds a modified version of go-shellwords as a dependency
and removes the dependency on the original go-shellwords.
2017-11-23 23:04:32 -05:00
Zachary Yedidia
0360a2fcb5 Improve cmdbar parsing and add -l replace flag
The -l flag to the replace command means "literal" and will treat
the search term literally instead of as a regular expression.

The command bar also now supports expanding environment variables
and running expressions through the shell and using the result
in the command.
2017-11-22 13:54:39 -05:00
Zachary Yedidia
63fa8fec41 Merge 2017-10-22 18:02:18 -04:00
Zachary Yedidia
b9e916999f Don't print error message if history file doesn't exist 2017-10-22 18:00:47 -04:00
Ted Singer
d82ea2279d If the history file is unreadable or unparseable, Messenger.history remained nil, causing a panic on read.
Now in that case, we temporarily disable saving history and initialize history to empty, instead of nil
2017-10-21 18:59:11 -04:00
Zachary Yedidia
7b6430af1c Add savehistory option
When savehistory is enabled, micro will save your command history across
sessions. This includes command-mode, shell-mode, open, jump-to-line...
Anything that uses up-arrow for history in the infobar.

This option is on by default.

Closes #874
2017-10-21 15:31:04 -04:00
Zachary Yedidia
5a7ddb8330 Add autocompletion for option values
Closes #555
2017-09-23 20:47:19 -04:00
Tommy
4f2fc096e5 add comment and let multi values to the log to make it easy to log. (#788)
* add comment and let multi values to the log to make it easy to log.

* added WorkingDirectory to lua bindings (returns the current directory)
2017-08-27 12:18:56 -04:00
Zachary Yedidia
69c6d8a099 Fix some lint problems 2017-08-08 11:30:09 -04:00
Tatsuro YOKOTA
4f8f6f1ca3 multi-byte characters are overlapped in prompt message (#745)
* modified messenger.Display

* modified messenger.Display
2017-07-20 22:18:15 -04:00
Tommy
7c80de7ee1 Caps lock issue#658 (#659)
* caps-lock-issue #658

* when esc key is pressed the message is cleared away
2017-05-10 10:02:17 -04:00
Zachary Yedidia
b4dda8bad8 Use less memory when opening very large files 2017-04-29 14:12:00 -04:00
Zachary Yedidia
1a95f34b0e Fix prompts not displaying 2016-12-22 16:38:20 -05:00
Samantha Marshall
968d5be74e fixing test, was using incorrect assignment syntax 2016-12-18 15:29:22 -05:00
Samantha Marshall
71ee042218 preventing messages from over-writing the current prompt message 2016-12-18 15:14:18 -05:00
Zachary Yedidia
eeaac76f5f Use io.Readers to read files more efficiently 2016-11-29 13:44:30 -05:00
Zachary Yedidia
0fbae7610c Fix buffer name problem
Fixes #458
2016-11-19 19:07:51 -05:00
Zachary Yedidia
c692570212 Replace CtrlO with open command
This comit also makes it possible for a binding to auto-type the
beginning of a command into command mode.

Closes #450
2016-11-19 12:57:54 -05:00
Zachary Yedidia
38bf8c0225 Temporary fix for plugin panic
Fixes #402
2016-10-07 20:34:03 -04:00
boombuler
8aa017bfda autocomplete plugin commands 2016-09-28 18:15:39 +02:00
Florian Sundermann
d9c666f6df don't use undo / redo history for log buffer. 2016-09-28 15:47:31 +02:00
boombuler
b195ebad46 AddLog should be "public" accessible 2016-09-27 17:52:05 +02:00
boombuler
50c7441533 also add TermMessage output to log 2016-09-26 19:28:42 +02:00
boombuler
c1a3ee1706 possibility to show a log view 2016-09-26 19:08:37 +02:00
Zachary Yedidia
292df7a9f7 Add mouse support and binding support to prompts
Closes #244
2016-09-24 15:26:19 -04:00
Zachary Yedidia
131524e670 Merge branch 'params' of https://github.com/boombuler/micro into boombuler-params 2016-09-06 10:59:30 -04:00
Zachary Yedidia
0a534767f0 Merge branch 'primary-clipboard' 2016-09-05 11:37:49 -04:00
Zachary Yedidia
ea4d822923 Merge pull request #283 from boombuler/autocompleteplugin
Autocomplete for plugins
2016-09-05 10:29:51 -04:00
Zachary Yedidia
cf3ce29a08 Fix YesNoPrompt bug 2016-09-04 18:27:11 -04:00
Zachary Yedidia
a8feef3c12 Minor cleanup
See #300
2016-09-04 12:57:09 -04:00
Zachary Yedidia
54a34001e3 Fix cursor problem in LetterPrompt
Fixes #300
2016-09-04 11:19:53 -04:00
Zachary Yedidia
c4d6f5e584 Fix various infobar bugs
Fixes #294
Fixes #295
2016-09-03 13:28:48 -04:00
boombuler
881f57b047 allow plugins to register autocomplete functions 2016-09-02 19:42:33 +02:00
Zachary Yedidia
d9b8a04841 Add support for primary clipboard 2016-09-02 09:40:08 -04:00
Florian Sundermann
ccfe08bc60 allow command parameters to be quoted
this way FileCompletions could contain space runes without
breaking the parameter.
2016-09-02 13:44:22 +02:00
Zachary Yedidia
2e264b342a Fix prompts not displaying because of infobar 2016-08-31 11:52:59 -04:00
Zachary Yedidia
b70db77c29 Add infobar option to disable the message line
Fixes #257
2016-08-31 11:16:22 -04:00
Zachary Yedidia
fccec47ae5 Have CanClose use single letters for responses
Closes #184
2016-08-29 10:10:16 -04:00
Zachary Yedidia
aa9dbdde3e Improve tab completion in command mode
Pressing tab when all suggestions start with the same substring
will insert that substring (this is how bash autocompletion works).
2016-08-28 13:05:07 -04:00
Zachary Yedidia
78e2445e43 Don't pad suggestions 2016-08-22 11:45:50 -07:00
Zachary Yedidia
9db4e640a0 Add pasting in command mode 2016-08-20 10:35:57 -07:00