Commit graph

932 commits

Author SHA1 Message Date
Zachary Yedidia
bdb699211a Add raw command to view raw terminal esc codes 2017-11-29 01:06:16 -05:00
Zachary Yedidia
acd42df13c Fix panic on scroll
Fixes #932
2017-11-27 21:44:29 -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
af6ef4f87f Minor comment improvement 2017-11-24 13:35:11 -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
36d72c4cab Move incomplete colorschemes and improve cd
The default colorschemes should ideally use 256 colors instead
of just 16 colors. The `simple` colorscheme should cover most
16 color use cases. I went through the colorschemes and put the themes
that didn't look good or looked incomplete in an in_progress directory.

This commit also improves the `cd` command behavior when using an
unnamed buffer.
2017-11-23 15:57:17 -05:00
Zachary Yedidia
71ee185b80 Check width before drawing cellview
Fixes #927
2017-11-23 14:44:07 -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
2ee7adb196 Support either io/ioutil or ioutil for lua import
Closes #923
2017-11-21 16:24:39 -05:00
Zachary Yedidia
d247db3e9d Implement retab command
Ref #919
2017-11-21 00:51:07 -05:00
Zachary Yedidia
e4c2f5d259
Merge pull request #891 from pranavraja/master
search: Only update lastSearch on ENTER
2017-11-19 15:47:05 -05:00
Zachary Yedidia
f96e9e9c1d Update lua go stdlib access documentation
Ref #912
2017-11-16 14:29:36 -05:00
Zachary Yedidia
7dfeda1ae5 Support .cljs and .cljc as clojure files
Fixes #911
2017-11-14 13:58:28 -05:00
Zachary Yedidia
6b6fcc8ba0 Minor documentation update 2017-11-08 00:23:18 -05:00
Zachary Yedidia
423f4675d2 Add a scroll bar option
The option is `scrollbar` and is off by default. The scroll bar is
not interactive (you can't click and drag it) but this will likely
be fixed in the future.

Ref #869
2017-11-05 20:07:14 -05:00
Zachary Yedidia
a1f3499825 Fix issue with multicursor IDs
Fixes #899
2017-10-22 19:51:16 -04: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
19ee4b281e Fix comment regex for shell filetype
Fixes #895
2017-10-20 23:57:49 -04:00
Pranav Raja
7bc2d870cd search: Only update lastSearch on ENTER
This has a few effects:

- `lastSearch` doesn't get overriden with partial searches
unnecessarily, which matches the behaviour of vim/emacs etc.

- Selecting a word, then pressing C-c C-f ENTER works better as you can
now use C-n and C-p to jump to more occurrences of what you just
searched for. Without this C-n would jump to what you searched for
*previously*.

- `lastSearch` will now be updated even if the search did not match -
again, this matches the behaviour of vim/emacs.
2017-10-16 17:44:44 +11:00
Zachary Yedidia
678819683a Merge 2017-10-15 15:35:54 -04:00
Zachary Yedidia
08e46f9112 Don't draw statusline if infobar is off and in use
Fixes #873
2017-10-15 15:35:19 -04:00
Camille Scholtz
d76704839a alphabetically order options 2017-10-11 14:43:38 +02:00
Camille Scholtz
329669ce79 Make settings capitalization consistent 2017-10-11 14:22:23 +02:00
Yannick Armand
bf6ce3a17e Add option value completion on setlocal 2017-10-08 18:42:09 +02:00
Zachary Yedidia
17dac164ea Don't store cmd stdout in string
Storing the stdout confuses isatty causing programs running within
ShellMode to not format properly.

Fixes #862
2017-10-06 21:09:53 -04:00
Zachary Yedidia
b7c99c52d2 Update runtime 2017-10-06 20:43:14 -04:00
Zachary Yedidia
773c54a40d Support binding raw escapes codes 2017-10-06 14:03:35 -04:00
Zachary Yedidia
74589af1fc Revert "Update tcell to use gdamore's fix for idle wakeup"
This reverts commit f01ad3f726.
2017-10-06 13:21:53 -04:00
Zachary Yedidia
f01ad3f726 Update tcell to use gdamore's fix for idle wakeup
Note that you may encounter merge conflicts if you try to update. If you
do, remove the directory `cmd/micro/vendor/github.com/zyedidia/tcell`
and it will be recloned.
2017-10-06 13:03:43 -04:00
Zachary Yedidia
ea6012922f Add paren highlighting for js and update runtime 2017-10-06 10:59:43 -04:00
Zachary Yedidia
3116b082d8 Fix save and quit prompt 2017-10-04 12:11:20 -04:00
Zachary Yedidia
ac3de065d9 Merge pull request #850 from nitsakh/feat-809
Implementation of Paragraph Feature
2017-10-03 23:49:57 -04:00
Zachary Yedidia
c7334eb3b7 Fix sucmd option
Fixes #854
2017-10-03 10:48:07 -04:00
Zachary Yedidia
8b8fffb98d Add nano-style key menu option
Use the `keymenu` option (default `off`) to enable. ToggleKeyMenu is
also bound to `Alt-g` and this info is now displayed in the status line.

Closes #829
2017-10-02 23:44:11 -04:00
Nitish Sakhawalkar
ec221c0bc4 Implementation of Paragraph Feature
Changes to support moving cursor to next and previous paragraph
and updates to corresponding documentation
2017-10-02 19:54:57 -07:00
Zachary Yedidia
f4e94d6d34 Add sucmd to customize "sudo" command
Fixes #833
2017-10-01 21:55:43 -04:00
Zachary Yedidia
46ced988eb Fix some golint warnings 2017-10-01 12:42:23 -04:00
Zachary Yedidia
28acfc6d3f Fix support for user-friendly plugin names
Fixes #840
2017-09-30 17:47:19 -04:00
Zachary Yedidia
a02ae3ceed Replace home directory before performing SaveAs
Fixes #820
2017-09-26 22:55:06 -04:00
Zachary Yedidia
a5e721b107 Set fastdirty on for files larger than 50kb 2017-09-23 21:18:37 -04:00
Zachary Yedidia
12a4dd58f3 Only replace '~' with home if at start of path
Ref #757
2017-09-23 20:56:08 -04:00
Zachary Yedidia
5a7ddb8330 Add autocompletion for option values
Closes #555
2017-09-23 20:47:19 -04:00
Zachary Yedidia
cb75531818 Make mouse option global option
Fixes #816
2017-09-21 17:10:53 -04:00
Zachary Yedidia
6229a0579f Update tcell
The latest commit to tcell should fix behavior for large pastes.

Fixes #815
2017-09-19 13:21:09 -04:00
Zachary Yedidia
fb980bb695 Add option for very accurate dirty flag
Set the `fastdirty` option flag to off if you really want accurate
reporting on whether the buffer is modified. This is more resource
intensive but it can be useful for people who don't mind.

Closes #787
Closes #467
2017-09-17 23:33:18 -04:00
Zachary Yedidia
19dc9d7bbc Fix options and make usage text much more readable
Now micro -h will just show you the important information and if you
want to see each individual option's help text use micro -options.
2017-09-17 22:11:26 -04:00
Zachary Yedidia
1e55b6f6b3 Only register double click on equal mouse location 2017-09-17 18:31:32 -04:00