Zachary Yedidia
a491dd1c52
Merge branch 'buffer-benchmarks' of https://github.com/p-e-w/micro into p-e-w-buffer-benchmarks
2020-05-20 15:28:36 -04:00
dmaluka
a150eef6f9
Fix end line number in HighlightMatches ( #1662 )
...
There is a bit of mess in the usage of HighlightMatches: in some places
we assume that it updates lines from startline to endline inclusive,
in other places we assume it's non-inclusive.
This fix makes it always inclusive.
In particular, it fixes a bug: when we open a file which has no
newline at the end, the last line isn't highlighted.
2020-05-17 16:05:34 -04:00
Zachary Yedidia
eff89a98a7
Fix v2 import path for go mod
2020-05-04 10:16:15 -04:00
Zachary Yedidia
7a23878250
gofmt
2020-04-30 00:54:02 -04:00
Ján Jančár
f0da73bae2
Add StartOfTextToggle and SelectToStartOfTextToggle actions. ( #1612 )
...
These actions reintroduce the behavior of micro where the Home key
toggles between the start of text (first) and the start of the line.
The same applies for the variant with selection. This commit also
sets these bindings as the defaults.
2020-04-10 17:21:02 -04:00
Zachary Yedidia
48ca19873f
Better ordering for reading syntax files
...
Ref #1580
2020-03-24 10:52:15 -04:00
Philipp Emanuel Weidmann
d038d3040f
Add more sophisticated buffer benchmark system
2020-03-01 13:20:10 +05:30
Zachary Yedidia
9e8d76f2fa
If stdout is a pipe, output to the pipe
...
If you run micro as `micro | cat` for example, micro will disallow
you from saving the file, and when you quit the buffer, the contents
will be sent to the pipe. This allows one to use micro as part of
an interactive unix pipeline.
Closes #1524
2020-02-27 12:39:19 -05:00
Zachary Yedidia
8a9a14562f
Use bytes.Buffer for LineArray.Bytes
2020-02-27 11:27:00 -05:00
Zachary Yedidia
a6f5dee45c
Fix custom syntax files not highlighting
...
Fixes #1530
2020-02-27 00:58:52 -05:00
Zachary Yedidia
b12886b066
Improve buffer test
2020-02-25 23:59:27 -05:00
Zachary Yedidia
56f5b475eb
Improve buffer test
2020-02-25 23:21:50 -05:00
Zachary Yedidia
e4bf1e9984
Undo event chunks instead of single events
2020-02-25 20:53:48 -05:00
Zachary Yedidia
53bda0cfa7
Fix buffer tests and selection bug
...
Fixes #1528
Ref #1526
2020-02-25 20:24:02 -05:00
Zachary Yedidia
f059541e0d
Merge branch 'buffer-tests' of https://github.com/p-e-w/micro into buffer-unit-tests
2020-02-25 10:30:31 -05:00
Zachary Yedidia
d78fe81e21
line_array insert for eofnewline and make default
...
Makes the `eofnewline` option enabled by default.
Fixes #1525
2020-02-24 22:31:05 -05:00
josh
25b9342fbe
fix eofnewline not running on files with 1 rune ( #1535 )
2020-02-24 22:26:51 -05:00
Zachary Yedidia
70bcf9f618
Fix text transformation bug
...
This fixes the remaining text transformation tests.
Ref #1526
2020-02-24 20:11:11 -05:00
Zachary Yedidia
dff8b33e9c
Apply basename option in tabbar as well
2020-02-24 13:48:37 -05:00
Zachary Yedidia
0174d7dba4
Move multi-cursors correctly after newlines
...
Fixes #1527
2020-02-24 13:39:34 -05:00
Philipp Emanuel Weidmann
f0cdc3cabb
Add buffer test and benchmark suite (and tool to generate it)
2020-02-22 08:51:38 +05:30
Zachary Yedidia
2ef4f83358
Fix issue with simultaneous buffers
2020-02-19 17:40:54 -05:00
Zachary Yedidia
a9120ce270
Share more buffer elements and fix rehighlight
...
Fixes #1521
2020-02-19 14:41:30 -05:00
Zachary Yedidia
38f88ade60
Search and replace within a selection
...
Closes #1098
2020-02-13 19:48:48 -05:00
Zachary Yedidia
30ed25859a
Support regex capture groups in replace command
...
See https://golang.org/pkg/regexp/syntax/ for the
supported syntax. Here are some examples:
```
replace "(foo)" "$1-bar"
replace "(foo)" "${1}-bar"
replace "(?P<group>foo)" "$group-bar"
replace "(?P<group>foo)" "$group-bar"
replace "(?P<key>\w+):\s+(?P<value>\w+)$" "$key=$value"
```
Closes #1115
2020-02-13 16:05:56 -05:00
Zachary Yedidia
ea290e4fb5
Merge branch 'bug-endless-reload-prompt' of https://github.com/jawahars16/micro into jawahars16-bug-endless-reload-prompt
2020-02-12 13:56:00 -05:00
Zachary Yedidia
e7ef81ed97
Share hash across equivalent buffers for fastdirty=off
2020-02-12 13:32:42 -05:00
Zachary Yedidia
7b5bc8fe37
Fix issue with global/local settings
2020-02-12 13:18:59 -05:00
Zachary Yedidia
bad78797bb
Clicking tabbar arrow scrolls and fix multicursor
...
Closes #1503
2020-02-12 13:05:15 -05:00
Zachary Yedidia
6588f02f7b
Only highlight matching brace if one is found
...
Fixes #1505
2020-02-12 01:32:23 -05:00
Zachary Yedidia
7d47659481
Fix deleteLines off-by-one error
...
Fixes #1501
2020-02-12 01:16:11 -05:00
Zachary Yedidia
8224037080
Don't block when redraw channel becomes full
...
Fixes #1497
2020-02-11 20:03:32 -05:00
Zachary Yedidia
695d4c2b1b
Use filepath.Join more
2020-02-11 13:09:17 -05:00
Zachary Yedidia
848bd1ba8c
Fix rehighlight for retab
2020-02-10 14:49:08 -05:00
Zachary Yedidia
bdf9e6d3a4
Merge branch 'diff-gutter' of https://github.com/p-e-w/micro
2020-02-10 00:28:43 -05:00
Zachary Yedidia
3ed77dbb2e
Sanitize inputs to insert and remove
2020-02-10 00:18:08 -05:00
Zachary Yedidia
6f424f3213
Properly flush bufio writer
2020-02-09 15:36:31 -05:00
Zachary Yedidia
e110e93e0f
Improve disk performance with buffered io
2020-02-09 15:21:23 -05:00
Zachary Yedidia
8ddf335e68
Improve remove performance
2020-02-09 14:58:37 -05:00
Zachary Yedidia
ca9d102267
Start insert performance improvements
2020-02-09 14:30:20 -05:00
Zachary Yedidia
13e30a63eb
Minor improvements
2020-02-09 00:40:50 -05:00
Zachary Yedidia
ce91e41e5a
Update third party licenses
2020-02-09 00:03:03 -05:00
Zachary Yedidia
b77980082c
Fix to allow readonly to be disabled
2020-02-08 19:37:37 -05:00
Zachary Yedidia
57c34e2248
More plugin docs and improve doc formatting
2020-02-08 18:31:06 -05:00
Zachary Yedidia
6514b77e0d
Enable autosave option
...
The autosave option is now specified as an integer, which denotes
the number of seconds to wait between saving the file. If the option
is 0, then autosaving is disabled. If the option is given by the user
as a boolean, it will be converted to 8 if true, and 0 if false.
Fixes #1479
2020-02-08 16:53:08 -05:00
Philipp Emanuel Weidmann
de33eac058
Add diff gutter
2020-02-08 13:26:24 +05:30
Zachary Yedidia
6a1b8f4a4f
Add option to clean unused settings and other parts of config
2020-02-02 15:30:06 -05:00
Zachary Yedidia
b0624cb66e
Add support for plugin manager within micro
2020-02-02 14:20:39 -05:00
Zachary Yedidia
d94b81b8e6
Synchronize undo and redo chunks
...
Fixes #1372
Fxies #1471
2020-02-02 00:14:56 -05:00
Zachary Yedidia
f731e422ea
Improve lua interface
2020-01-31 14:21:27 -05:00