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
Zachary Yedidia
2f587c6d48
Fix moving to end of line on cursor down
2017-09-15 16:09:33 -04:00
Zachary Yedidia
5b426aee86
Update tcell
2017-09-15 14:15:21 -04:00
Zachary Yedidia
f700769b27
Update tcell
2017-09-15 13:33:06 -04:00
Zachary Yedidia
04b672eebe
Update tcell
2017-09-15 10:50:56 -04:00
Zachary Yedidia
f7238e8e53
Update tcell
2017-09-14 17:29:25 -04:00
Zachary Yedidia
33cb39d318
Use type.keyword instead of keyword
...
Some syntax files used keyword from an old version when they should have
been using type.keyword.
Fixes #811
2017-09-13 18:00:47 -04:00
Zachary Yedidia
612658d9c4
Add documentation for new lua functions
2017-09-11 12:23:19 -04:00
Zachary Yedidia
c31613b2c7
Add --config-dir option
2017-09-10 23:20:21 -04:00
Zachary Yedidia
d7419d213a
Merge branch 'better-lua'
2017-09-10 22:22:31 -04:00
Zachary Yedidia
67a3f86cc9
Update tcell
2017-09-10 17:21:37 -04:00
Zachary Yedidia
64d574c35c
Give Lua access to most of the Go stdlib
2017-09-10 14:16:28 -04:00
Zachary Yedidia
4e531c2d1e
Update tcell
2017-09-10 12:47:24 -04:00
Zachary Yedidia
0c1db1e813
Escape regex chars in selections for multicursors
...
Fixes #808
2017-09-08 19:16:14 -04:00
Zachary Yedidia
69f77ee2f1
Set OrigSelection during search
...
Fixes #807
2017-09-08 18:57:24 -04:00
Zachary Yedidia
65b5d6c5a9
Handle zip files that do not list directories
...
Some zip files do not mark the subdirectories in them as "files"
but they still need to be created.
Fixes #803
2017-09-07 17:02:26 -04:00
Zachary Yedidia
1a575bc9ae
Fix UpN if proposedY < 0
...
Fixes #804
2017-09-07 16:44:05 -04:00
Zachary Yedidia
ab242c5b17
Update tcell
2017-09-06 16:41:09 -04:00
Zachary Yedidia
90977fb4e1
Add mouse option to allow disabling mouse support
2017-09-06 15:50:50 -04:00
Zachary Yedidia
404e5d206d
Fix autoclose plugin cursor position
2017-09-05 18:36:42 -04:00
Zachary Yedidia
d41a255361
Fix undo of MultipleReplace
...
Fixes #799
2017-09-04 16:21:08 -04:00
Zachary Yedidia
efff850e54
Clear cursors before performing undo or redo
...
This fix isn't ideal because it removes the cursors but it does work
Fixes #798
2017-09-04 15:47:24 -04:00
tommy
68526dc119
add missing offset to current highlighting line. Fix #795
2017-09-02 09:40:35 +01: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
0f62ef687c
Proper bounds check
...
Closes #791
2017-08-24 14:56:46 -04:00
Zachary Yedidia
32eb1135ed
Update runtime
2017-08-24 13:15:17 -04:00
Zachary Yedidia
f88b4a6d57
Merge
2017-08-24 13:15:01 -04:00
Zachary Yedidia
9628b73525
Add support for switching between crlf and lf
...
Dos and Unix line endings are now both supported (previously on unix
line endings were supported) and can be accessed via the `fileformat`
option. The file format will be automatically detected and displayed in
the statusline but can be overriden.
Possible values for the `fileformat` option are `dos` and `unix`.
Closes #443
Closes #755
2017-08-24 13:13:14 -04:00
Zachary Yedidia
d70a48bd13
Improve julia syntax file
...
Ref #781
2017-08-14 15:18:48 -04:00
Zachary Yedidia
660f1e181a
Add julia rules
...
Fixes #781
2017-08-14 11:59:29 -04:00
Zachary Yedidia
773284369b
Improve yaml string highlighting
...
Fixes #783
2017-08-14 11:28:10 -04:00
Yannick A
921f88b95d
Cursor move at the first char when Up on the first line (and at the last char when Down on last the line) ( #773 )
...
* Cursor move at the beginning of the line when Up on the first line (and at the last character when Down on last the line)
* Fix an issue when Up to a shorter line than current line
2017-08-09 11:58:37 -04:00
Yannick A
7fe8d73473
Fix somes selections issues ( #771 )
...
* SelectLeft on the last character is now possible
* SelectLeft on the last character is now possible
* CursorRight on selection places the cursor after the last selected character
* SelectRight on the last character do not select the last character and do nothing
2017-08-09 11:52:38 -04:00
Zachary Yedidia
69c6d8a099
Fix some lint problems
2017-08-08 11:30:09 -04:00
Zachary Yedidia
471486b531
Add newline after build tags
2017-08-07 09:47:28 -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
Zachary Yedidia
5c785ab1ac
Fix MoveLines when user has a selection
...
Ref #767
2017-08-03 12:42:40 -04:00
Yannick Armand
9dd1df36d5
Move current line down/up: cursor stay with moved line
2017-08-03 12:02:07 +02:00
Yannick Armand
ed9bc66060
OutdentSelection works on all cases (whatever tabsize or tabstospace values)
2017-08-01 22:42:42 +02:00
Yannick Armand
cc5855d07b
Display number of lines in the JumpLine prompt
2017-08-01 16:41:57 +02:00
Zachary Yedidia
487b36f48f
Update tcell
...
Ref #761
2017-08-01 10:12:10 -04:00
Zachary Yedidia
c0b00c9a4c
Update tcell
2017-07-31 22:47:08 -04:00
Zachary Yedidia
86c2ac95bb
Merge cursors after spawning with mouse
...
Fixes #760
2017-07-31 22:30:57 -04:00
Zachary Yedidia
edb79f2972
Merge
2017-07-31 22:24:46 -04:00
Zachary Yedidia
305cefe461
Update tcell
2017-07-31 22:24:42 -04:00
Zachary Yedidia
315391b0aa
Expand support for Suspend to OSX, BSD, Solaris
2017-07-31 20:05:34 -04:00
Zachary Yedidia
fd45acc910
Remove unused variables
2017-07-31 18:46:52 -04:00
Zachary Yedidia
5c462f5600
Always use custom syntax files over default
...
The custom syntax files were first in the array but micro should stop
loading files into the filetype if it already found a match.
Fixes #750
2017-07-23 20:22:47 -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
Markus F.X.J. Oberhumer
97aae225da
Rebuild runtime.go.
2017-07-17 07:21:38 +02:00
Zachary Yedidia
3b2d7abe3d
Store visual x when cursor loc moves in certain cases
...
Fixes #739
2017-07-15 17:52:56 -04:00
Zachary Yedidia
63b4848bb0
Make sure screen is not nil before pollevent
...
Ref #728
Ref #727
2017-07-10 18:04:11 -04:00
Zachary Yedidia
030a05c103
Always restart the screen when saving with sudo
...
Fixes #723
2017-07-08 15:13:42 -04:00
Zachary Yedidia
e4751fd84c
Optimize search
...
Fixes #722
2017-07-08 15:03:35 -04:00
Zachary Yedidia
252def5b95
Fix recursive search and replace in special case
...
Fixes #717
2017-07-01 16:50:25 -04:00
Zachary Yedidia
42f2af7956
Print help text to stdout instead of stderr
...
Fixes #719
2017-07-01 16:49:08 -04:00
Zachary Yedidia
91fb8225d1
Add 'a' option in replace prompt
...
Closes #718
2017-07-01 16:47:50 -04:00
Zachary Yedidia
bee60023ae
Optimize search and replace
2017-07-01 16:40:28 -04:00
Zachary Yedidia
8f4820ba28
Move cursor selections on Insert or Remove
...
Ref #715
2017-06-25 19:14:01 -04:00
Zachary Yedidia
19926d95fe
Throw error if there is no detect regex
...
Closes #712
2017-06-22 10:42:06 -04:00
Zachary Yedidia
f27ee60149
Fix compilation errors
2017-06-21 14:37:30 -04:00
Zachary Yedidia
3908813afe
Recover errors in highlight
...
Ref #712
2017-06-21 14:26:35 -04:00
Zachary Yedidia
e6f24b0924
Add new tcell commits
2017-06-20 17:47:39 -04:00
Zachary Yedidia
b2c1c8f8db
Merge pull request #710 from HeavyHorst/master
...
fixed a panic when a line is cut out(strg+k) and the next line is empty.
2017-06-20 16:52:48 -04:00
Zachary Yedidia
5a2f9a374b
Merge pull request #709 from mfxmfx/xterm-ctrl-pgup
...
Add support for xterm CtrlPgUp and CtrlPgDn keys.
2017-06-20 10:53:31 -04:00
Zachary Yedidia
59ab5107bf
Add new commits to tcell (ctrlpageup/down)
2017-06-20 10:53:07 -04:00
Rene Kaufmann
06c65d8404
fixed a panic when a line is cut out(strg+k) and the next line
...
is empty.
2017-06-20 11:53:59 +02: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
4aeb4c78ac
Merge
2017-06-18 15:39:50 -04:00
Zachary Yedidia
3741a71cc5
Check bounds on LastVisualX
...
Fixes #708
2017-06-18 15:38:33 -04:00
Zachary Yedidia
fc9ddaf941
Merge pull request #679 from alialaee/master
...
Find and replace one at a time
2017-06-18 12:13:43 -04:00
Zachary Yedidia
5ec08d0a29
Use correct separator on windows
...
Ref #673
2017-06-18 09:56:36 -04:00
Zachary Yedidia
da1ec3132f
Update tcell
2017-06-17 23:02:22 -04:00
Zachary Yedidia
167f1e5770
Use the idle-wakeup-fix-forked branch of tcell
2017-06-17 22:54:05 -04:00
Zachary Yedidia
7e4ff05c57
Use submodules for dependency management
2017-06-17 17:52:28 -04:00
Zachary Yedidia
7ccec0e3f7
Merge pull request #704 from zyedidia/multiple-cursors
...
Multiple cursors
2017-06-17 17:39:31 -04:00
Zachary Yedidia
397361f23d
Add multiple cursor docs + improve docs in general
2017-06-17 17:36:27 -04:00
Zachary Yedidia
681da2e90c
Deselect with mouse
...
This commit also makes non editing actions (save, quit...) only execute
once even if there are multiple cursors.
2017-06-17 11:05:23 -04:00
Zachary Yedidia
118e6b1804
Merge cursors properly
...
Cursors will merge together if they are on top of each other.
2017-06-17 10:43:14 -04:00
Zachary Yedidia
f933b90c66
Get undo working properly with multiple cursors
2017-06-16 22:19:33 -04:00
Zachary Yedidia
21840d3ffe
Make cursor movement automatic on insert + remove
...
This changes the behavior of cursor movement so that all cursors are
adjusted when a change is made to the buffer. Cursors don't have to be
manually moved after calling Insert or Remove, those functions will move
the cursor properly on their own.
This should fix issues 1-3 mentioned in the multiple cursors discussion.
Ref #5
2017-06-15 18:52:51 -04:00
Frank Braun
43eb238b08
Implement Spaces() with with strings.Repeat()
...
Shorter and more efficient.
2017-06-14 19:47:40 +00: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
c3a73d63b8
Add comments
2017-06-12 20:25:10 -04:00
Zachary Yedidia
bc3c8eaf74
Use terminal cursor for the base cursor
...
If all cursors fake then that breaks support for things like
inserting japanese characters nicely, so fake cursors are now only used
as extra cursors.
2017-06-12 20:25:10 -04:00
Zachary Yedidia
8d268ef021
Remove debug messages
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
37ad137012
Properly show end of line selection
2017-06-12 15:49:21 -04:00
Zachary Yedidia
0165c4a40a
Allow binding runes to actions
...
This new functionality would make it possible to emulate vim keybindings
pretty easily, for example.
2017-06-11 20:40:11 -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
a1f6dd6f4f
Update default colorscheme
2017-06-10 18:52:08 -04:00
Zachary Yedidia
cf92f91e1e
Improve solarized-tc colorscheme
2017-06-07 12:41:20 -04:00
Zachary Yedidia
eeb2aaf9ae
Merge
2017-06-04 19:17:08 -04:00
Zachary Yedidia
f84c9f3b5d
More descriptive error for 'terminal entry not found'
2017-06-04 19:17:02 -04:00
Tommy
4644a2b5cc
Check for readonly on viewtype and if true do not let any edits or paste to buffer. eg help and plugins. Finished needs checking. ( #674 )
...
* corrected spelling error and missing public function comments
* check for readonly and if true do not insert character
* mouse middle click checks for view type readonly and does not paste if view is readonly
* check for view readonly with binding keys and if readonly do not change the content.
2017-05-29 14:18:10 -04:00
Zachary Yedidia
89863660ba
Fix boolean logic order for hiding cursor
...
Fixes #684
2017-05-28 19:52:56 -04:00
Zachary Yedidia
624daabc02
Add support for zyedidia/Literate
2017-05-27 16:55:59 -04:00
Zachary Yedidia
05a187e470
Update runtime
2017-05-27 16:38:03 -04:00
ali
480a220fda
Change replace command default behaviour to confirm replacement for each occurrences
2017-05-26 03:43:57 +04:30
Zachary Yedidia
6cf6857602
Add comment
2017-05-22 11:21:17 -04:00
Zachary Yedidia
97e2fb1288
Use messenger error instead of termerror
2017-05-21 10:46:06 -04:00
Zachary Yedidia
d1e70b5abf
Add suspend for linux only
2017-05-21 10:44:33 -04:00
Zachary Yedidia
a70fb9db7d
Test suspend code
2017-05-21 10:30:26 -04:00
Zachary Yedidia
f364965ac0
Create ftoptions option to disable auto settings
...
Closes #662
2017-05-19 18:17:38 -04:00
Zachary Yedidia
e7ee194acf
Merge
2017-05-17 12:13:24 -04:00
Zachary Yedidia
6e5536eae9
Load colorscheme after loading plugins
...
Fixes #671
2017-05-17 12:12:58 -04:00
tommy
d8dee90c10
check viewtype before saving and if scratch is true then do not save
2017-05-15 20:00:58 +01:00
Zachary Yedidia
dcee63771a
Merge
2017-05-14 10:27:37 -04:00
Zachary Yedidia
b7133b302b
Don't remember path on save if it is invalid
...
Fixes #656
2017-05-14 10:27:15 -04:00
aerth
f6ccaadc0c
use space for indentchar if empty, fixes #660
2017-05-12 16:32:24 -07: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
ef0f506b6f
Allow upper case in 'Save changes' prompt
...
Fixes #658
2017-05-09 14:46:23 -04:00
Zachary Yedidia
18f9b6f34e
Add tabmovement option
...
This option makes micro treat spaces at the beginning of lines as if
they are tabs. This option only does anything if tabstospaces is already
on. E.g. micro will move over 4 spaces at once when at the start of a
line.
Closes #616
2017-05-05 12:04:18 -04:00
Zachary Yedidia
57110c98e4
Fix rare problem with tabs and horizontal scrolling
2017-05-05 11:34:14 -04:00
Zachary Yedidia
a6ee75a9cf
Add SaveAll command and display + for modified tabs
...
Closes #651
2017-05-05 11:05:23 -04:00
Zachary Yedidia
8d1618692e
Disallow view switching during a search
...
Closes #642
This commit also removes some unnecessary functions that weren't being
used.
2017-05-05 10:52:09 -04:00