Commit graph

1217 commits

Author SHA1 Message Date
Zachary Yedidia
812c7761dc Correct infobar and statusline options 2019-12-25 17:05:10 -05:00
Zachary Yedidia
055fff2b08 Fix redraw 2019-12-25 17:05:10 -05:00
Zachary Yedidia
5671e039b9 Fix multi buffer same file cursors 2019-12-25 17:05:10 -05:00
Zachary Yedidia
224cbe5093 Add help 2019-12-25 17:05:10 -05:00
Zachary Yedidia
eb49052a48 Add bind and unbind commands 2019-12-25 17:05:10 -05:00
Zachary Yedidia
5825353f64 Add some commands 2019-12-25 17:05:10 -05:00
Zachary Yedidia
8fa34f23d8 Handle same file open in multiple buffers 2019-12-25 17:05:10 -05:00
Zachary Yedidia
a5e7122b30 Add almost full option support 2019-12-25 17:05:10 -05:00
Zachary Yedidia
6c1db53b65 Fix scroll problem 2019-12-25 17:05:10 -05:00
Zachary Yedidia
b9f7939018 Add term statusline 2019-12-25 17:05:10 -05:00
Zachary Yedidia
5701ed211a Fix empty splits and single terms 2019-12-25 17:05:10 -05:00
Zachary Yedidia
8858c03b3b Add raw event support 2019-12-25 17:05:10 -05:00
Zachary Yedidia
2f7858ce25 Gutter message support 2019-12-25 17:05:10 -05:00
Zachary Yedidia
94ab77e2e0 Fix mouse bug 2019-12-25 17:05:10 -05:00
Zachary Yedidia
fb3923f344 Open default shell if no term args 2019-12-25 17:05:10 -05:00
Zachary Yedidia
354c9efc8f Move bindings location in code 2019-12-25 17:05:10 -05:00
Zachary Yedidia
149b3ae89f Fix small tab problem 2019-12-25 17:05:10 -05:00
Zachary Yedidia
0f1483dc8c Almost done terminal emulator 2019-12-25 17:05:10 -05:00
Zachary Yedidia
4146730aaf Start terminal emulator 2019-12-25 17:05:10 -05:00
Zachary Yedidia
c479c9d91a Add shell command support 2019-12-25 17:05:10 -05:00
Zachary Yedidia
0febfd2c80 Better tab mUI 2019-12-25 17:05:10 -05:00
Zachary Yedidia
eec4e535b4 Add tabbar and tab mouse support 2019-12-25 17:05:10 -05:00
Zachary Yedidia
8aa05cf409 Begin tab implementation 2019-12-25 17:05:10 -05:00
Zachary Yedidia
fe773c00d2 Implement split resizing 2019-12-25 17:05:10 -05:00
Zachary Yedidia
f2cb7d2fc1 Implement unsplitting 2019-12-25 17:05:10 -05:00
Zachary Yedidia
4412b44b47 Add showkey 2019-12-25 17:05:10 -05:00
Zachary Yedidia
9cf283e312 Resizing work 2019-12-25 17:05:10 -05:00
Zachary Yedidia
305f4debff Split improvements 2019-12-25 17:05:10 -05:00
Zachary Yedidia
93aed1ab9f Fix some split bugs 2019-12-25 17:05:10 -05:00
Zachary Yedidia
778bfd5cd3 Merge cursors after any event 2019-12-25 17:05:10 -05:00
Zachary Yedidia
16e5f55323 YN callbacks and better multi cursor 2019-12-25 17:05:10 -05:00
Zachary Yedidia
1ac4a8e7d3 Split improvements 2019-12-25 17:05:10 -05:00
Zachary Yedidia
541daf212e Start working on splits 2019-12-25 17:05:10 -05:00
Zachary Yedidia
d4c410f3dc Infobar history 2019-12-25 17:05:10 -05:00
Zachary Yedidia
4b50599411 Complete multicursor support 2019-12-25 17:05:10 -05:00
Zachary Yedidia
6cf09f9843 Find next and prev 2019-12-25 17:05:10 -05:00
Zachary Yedidia
37a4cbfd98 Implement searching 2019-12-25 17:05:10 -05:00
Zachary Yedidia
0f37c0b0bf Add multi cursor support 2019-12-25 17:05:10 -05:00
Zachary Yedidia
80fe992957 Fix infobar prompt 2019-12-25 17:05:10 -05:00
Zachary Yedidia
e97005f05d Working horizontal scrolling 2019-12-25 17:05:10 -05:00
Zachary Yedidia
5335c60d6c Fix sub bug 2019-12-25 17:05:10 -05:00
Zachary Yedidia
b8b245f305 Add mouse support 2019-12-25 17:05:10 -05:00
Zachary Yedidia
3d2cc3298e Finish non global actions 2019-12-25 17:05:10 -05:00
Zachary Yedidia
a89ddea619 Fix error 2019-12-25 17:05:10 -05:00
Zachary Yedidia
6562e3b48d Start implementing commands 2019-12-25 17:05:10 -05:00
Zachary Yedidia
c01995c1b6 Reorganize info bar 2019-12-25 17:05:10 -05:00
Zachary Yedidia
78ce7a5f0f Minor infobar improvements 2019-12-25 17:05:10 -05:00
Zachary Yedidia
afe24698ea Infobar prompts 2019-12-25 17:05:10 -05:00
Zachary Yedidia
c50e0cb932 Add infobar 2019-12-25 17:05:10 -05:00
Zachary Yedidia
e9a4238a3f More actions and view relocation 2019-12-25 17:05:10 -05:00
Zachary Yedidia
02b71a514a Add some comments 2019-12-25 17:05:10 -05:00
Zachary Yedidia
9f066f2fbf Rehighlighting 2019-12-25 17:05:10 -05:00
Zachary Yedidia
12d727fb93 Add some more actions 2019-12-25 17:05:10 -05:00
Zachary Yedidia
31cf5a15ce Fix serialization 2019-12-25 17:05:10 -05:00
Zachary Yedidia
31fb3f2df2 More actions 2019-12-25 17:05:10 -05:00
Zachary Yedidia
7d87e6db99 More actions and window organization 2019-12-25 17:05:10 -05:00
Zachary Yedidia
06d596e780 Synchronize screen 2019-12-25 17:05:10 -05:00
Zachary Yedidia
d7b3f961b4 Action subpackage 2019-12-25 17:05:10 -05:00
Zachary Yedidia
c3e2085e3c Cursor improvements 2019-12-25 17:05:10 -05:00
Zachary Yedidia
dd619b3ff5 Reorganize file structure 2019-12-25 17:05:10 -05:00
Zachary Yedidia
dc68183fc1 Start refactor 2019-12-25 17:05:10 -05:00
Serge Voilokov
7a51490591 Add textfilter command 2019-11-05 23:27:35 -05:00
Zachary Yedidia
001498eee4 Update runtime 2018-12-10 14:33:21 -05:00
Zachary Yedidia
e071a4f8e2 Better bounds checks for search
Fixes #1217
2018-10-14 17:58:44 -04:00
Zachary Yedidia
1013b03314 Merge 2018-09-21 23:18:58 -04:00
Zachary Yedidia
96284a1feb LoadAll should reload plugins too
Fixes #1189
2018-09-21 23:18:47 -04:00
Zachary Yedidia
f40abc1a59 Fix infocmp parser
Ref #1167
2018-08-29 13:01:38 -04:00
Zachary Yedidia
0a6948c8ac Merge 2018-08-29 12:16:18 -04:00
Zachary Yedidia
9db7991a1d Handle hex codes in infocmp output 2018-08-29 12:16:11 -04:00
Zachary Yedidia
7339afcf73 Add tcelldb error check 2018-08-28 14:26:21 -04:00
rexy712
6e9b8c1bd5 Fixed UpN Cursor functionality to properly handle moving from long line to shorter line 2018-08-25 14:49:58 -07:00
Zachary Yedidia
bcdab882bc Update runtime 2018-08-18 15:25:42 -07:00
supbish
905e984f29 Add "smartpaste" option; fixes #1156 2018-08-17 22:37:19 -04:00
supbish
e03fab8daa Add GetTabs Lua function 2018-08-15 11:18:27 -04:00
Camille
1ab493de59 Only show basename of file in tabs unless there are mutliple tabs with the same basename (fixes #1079) (#1081)
* Only show basename of file in tabs unless there are mutliple tabs with the same basename (fixes #1079)

* Small fix
2018-08-10 16:54:19 -04:00
Zachary Yedidia
7a013f666e Update runtime and auto-gofmt runtime in make 2018-07-02 12:22:32 -04:00
ia
76e1d7a3a7 all: gofmt
Run standard gofmt command on project root.

- go version go1.10.3 darwin/amd64

Signed-off-by: ia <isaac.ardis@gmail.com>
2018-06-17 00:41:57 +02:00
Zachary Yedidia
91b65001c9 Fix php syntax file
Fixes #1109
2018-06-04 15:13:58 -04:00
Dimitar Borislavov Tasev
aa74b1233c Fix -startpos flag being ignored (#1129)
* Refactored cursor location login into a function. Fixed buffer overflow when line position is 1 more than file lines

* Fixed crash when -startpos has an invalid argument

* Adapted tests to new interface

* Fixed bug where -startpos with lines 0 and 1 would both be on the first line

* Changed Fatalf format back to digits

* Fixed issues with buffer cursor location. Added tests for new function

* ParseCursorLocation will now return an error when path doesnt contain line/col

* Fixed off-by-one line error

* Fixed tests to account for subtracting 1 from the line index
2018-06-04 12:27:27 -04:00
Dimitar Borislavov Tasev
efe343b37c Allows opening files using full path on Windows (#1126)
* Now can open Windows full-path from command line arg

Example that now works: micro.exe D:\myfile.txt

* Now correctly retrieves the path from the input path string. Except for single-letter filenames

* Fixed line/cols, need to make the code prettier

* Fixed path matching with regex by @Pariador

* Fixed not stripping the line/col args from file path

* Added tests for ParseCursorLocation
2018-06-03 17:13:03 -04:00
Maxim
71af765b4e Code optimisation (#1117)
* Making sure output files are always closed, plus hash calculation optimisation.

* Parallel hash calculation.

* Minor changes.

* Removed unnecessary memory allocations while trimming trailing whitespace.

* Buffered write.
2018-05-26 10:07:53 -04:00
JT Olio
ae9bb763fb a few miscellaneous fixes and improvements (#1105)
* add binding for more primitive backspace

* support selecting page up and page down

* fix matchbraceleft for braces that start on x=0

* fix multiline copy-paste indenting

let's say you have two lines like

  <space><space>line1
  <space><space>line2

so you start from cursor x=0 and select both lines, then paste.
we don't want any leading whitespace in this case, because the
cursor is already at x=0 and the selection already includes
whitespace.
2018-05-12 21:31:57 -04:00
Zachary Yedidia
3c01947cb3 Fix ini comment highlighting
Fixes #1094
2018-05-12 21:29:02 -04:00
Zachary Yedidia
53e142fb88 Fix matchbraceleft option
Fixes #1101
2018-04-28 17:42:17 -04:00
Zachary Yedidia
2e64499f96 Fix possible crash in findkey
Fixes #1103
2018-04-28 17:16:22 -04:00
Zachary Yedidia
11cb702d7f Merge 2018-04-28 17:04:47 -04:00
Zachary Yedidia
7a2820cbc0 Add hidehelp option
Fixes #1080
2018-04-28 17:04:33 -04:00
Mark Weston
b181342ff1 Make ^X act like ^K when nothing is selected (#1092)
* Make ^X act like ^K when nothing is selected

^K is hard to reach with your left hand or requires to use both hands
Also with this you could remove ^K whatsoever and make room for a different command
This is how I configured nano by the way
Line duplication also becomes nearly instantaneous with a flash-quick ^X+^V+^V combo (nano doesn't have a dedicated shortcut)
Small block (5-10 lines) cuts/copies/duplicates can also be made this way

* Remove unnecessary lines

* Call CutLine the right way
2018-04-23 15:34:45 -04:00
JT Olio
f8a171379a home toggles between start of line and start of text
by default home sends the cursor to the beginning of the line.
if the cursor is at the beginning of the line already though, home
will send the cursor to the first non-whitespace rune. tapping home
will toggle between these two line starts.
2018-04-05 15:25:34 -06:00
Zachary Yedidia
abc04ec521 fix typo 2018-03-31 02:32:48 +00:00
Zachary Yedidia
b7706d775c Add docs for SpawnMultiCursorSelect 2018-03-30 16:42:28 -04:00
dwwmmn
ac0b89366b Implement SpawnMultiCursorSelect (#1046)
Add function to actions.go which adds a new cursor to the beginning of each line of a selection. Bind to Ctrl-M by default.
2018-03-30 16:40:45 -04:00
Zachary Yedidia
3293160dcb Fix ReplaceHome implementation 2018-03-30 16:21:39 -04:00
DanielPower
804943a1e8 Add support for ~username syntax (fix #1033) (#1035)
* Add support for ~username syntax (fix #1033)

* Fixed return string

Also removed non-descriptive variable name `foo`

* moved err declarations outside of if statement
2018-03-30 16:20:51 -04:00
Zachary Yedidia
89f50638d7 Merge 2018-03-30 15:59:45 -04:00
Zachary Yedidia
c606c51c8b Close fd properly in save
Fixes #1057
2018-03-30 15:59:26 -04:00
Zachary Yedidia
f43a1b5ced
Merge pull request #1054 from jtolds/master
allow optional brace matching with the closing brace to the left of the cursor
2018-03-19 00:32:26 -04:00
Zachary Yedidia
26da85dcb1 Fix test string formatting
Fixes #1068
2018-03-09 00:39:59 -05:00
Zachary Yedidia
2885b42c62 Update fastdirty hash during save
Fixes #1064
2018-03-08 15:07:14 -05:00
Zachary Yedidia
cb45481526 Make tab views array public
Ref #1024
2018-03-02 19:50:33 -05:00
Zachary Yedidia
88d8b0b181 Count replacements in replaceall correctly
Fixes #1055
2018-03-02 19:32:23 -05:00
JT Olds
ea6a87d41a allow optionally brace matching with the closing brace to the left of the cursor
this behavior, while slightly less obvious, allows for observing what brace you
just closed. as you write closing braces, the brace you closed gets highlighted
2018-02-27 18:53:04 -07:00
Zachary Yedidia
6d2cbb6cce Use regexp replaceall
Fixes #1038
2018-02-19 17:04:09 -05:00
Zachary Yedidia
397c29443a Fix SaveAs Lua callback
Fixes #1029
2018-02-12 00:06:31 -05:00
Oleksii Filonenko
b9e77eee6a
Fix relative URL for terminfo 2018-02-09 17:36:12 +02:00
Zachary Yedidia
5038167650 Update clipboard 2018-02-08 14:17:58 -05:00
Zachary Yedidia
a37c30b889 Fix resize when prompt is active
Fixes #1020
2018-02-04 22:58:20 -05:00
Zachary Yedidia
7bfc90d080 Update license info 2018-02-04 11:33:03 -05:00
Zachary Yedidia
1d24609ed1 Add goconvey dependency to vendor
Ref #1
2018-02-03 22:33:32 -05:00
Zachary Yedidia
aa81cf5cf6 Support nano syntax for open at line
Ref #887
2018-02-02 16:53:08 -05:00
Zachary Yedidia
4790c39dfc Open at line syntax with filename:line:col
Ref #1010
Ref #887
Ref #836
2018-02-02 13:57:30 -05:00
Zachary Yedidia
35a9245c5d Use current view for every action
Fixes #1015
2018-02-02 12:33:13 -05:00
Zachary Yedidia
3e3cdfc5b5 Fix minor issue with autoscroll
Fixes #1012
2018-02-01 20:20:57 -05:00
Zachary Yedidia
f0e453b4f9 Improve ocaml syntax highlighting 2018-01-30 22:34:44 -05:00
Zachary Yedidia
3325b98063 Exit with error on screen initialization 2018-01-30 13:04:26 -05:00
Zachary Yedidia
4632c3594f Fix bad import path 2018-01-29 23:42:45 -05:00
Zachary Yedidia
96c7b1d07b Update to use new mkinfo from tcell
This update incorporates the new terminfo updates in tcell into micro
essentially merging zyedidia/mkinfo into micro. The zyedidia/mkinfo
program should no longer be necessary and micro should automatically
generate a tcell database on its own if it cannot find a terminal
entry. The tcell database will be located in `configDir/.tcelldb`.

Ref #20
Ref #922
2018-01-29 23:36:39 -05:00
Zachary Yedidia
aaf098bb47 Update tex syntax file 2018-01-29 18:02:43 -05:00
Zachary Yedidia
6d4134a178 Optimization to lots of redraws on large files 2018-01-29 16:47:55 -05:00
Zachary Yedidia
015fcf5fec Minor optimizations 2018-01-29 16:02:15 -05:00
Zachary Yedidia
fddf1690e3 Large syntax highlighting memory optimization
Ref #634
2018-01-29 15:21:00 -05:00
Zachary Yedidia
0913a1aeb3 Fix syntax highlighting on empty buffer 2018-01-28 22:35:43 -05:00
Zachary Yedidia
a19a6d28a7 Small simplification 2018-01-28 15:15:23 -05:00
Zachary Yedidia
af520cf047 Fix terminal emulator support 2018-01-25 20:10:49 -05:00
Zachary Yedidia
db75e11e32 Update tcell 2018-01-24 16:11:48 -05:00
Zachary Yedidia
797e5cc27f Update tcell 2018-01-22 23:40:42 -05:00
Zachary Yedidia
36dc6647dd Add new shell command documentation
Ref #979
2018-01-22 21:03:52 -05:00
Zachary Yedidia
44b64f7129 Fix compile error 2018-01-22 17:32:30 -05:00
Zachary Yedidia
0a49ea0a0d Improve shell commands 2018-01-22 17:20:03 -05:00
Zachary Yedidia
4f41881c10 Make onViewOpen and onBufferOpen the same
Ref #948
2018-01-22 15:27:56 -05:00
Zachary Yedidia
63299df4b9 Don't throw error if job callback doesn't exist
Closes #953
2018-01-21 16:31:13 -05:00
Zachary Yedidia
10b8fb7b26 Expose emulator functions and support output
Ref #979
2018-01-20 23:34:16 -05:00
Zachary Yedidia
0a7e4c8f06 Use zyedidia/pty instead of kr/pty 2018-01-20 22:28:17 -05:00
Zachary Yedidia
83190a578e Change HandleShellCommand backend
I'm trying to add more options for plugins that want to run shell
commands. Also trying to add support for running shell commands in the
terminal emulator from a plugin and return the output.

More to come soon.

Ref #979
2018-01-20 22:23:52 -05:00
Zachary Yedidia
79349562b2 Improve unicode softwrap drawing
Ref #1002
Ref #909
2018-01-20 12:36:22 -05:00
Zachary Yedidia
0cb1ad09cd Merge 2018-01-19 00:28:58 -05:00
Zachary Yedidia
6ef00c4c3b Clean up terminal emulator a bit 2018-01-19 00:28:51 -05:00
Zachary Yedidia
bb598ae566
Merge pull request #999 from sum01/create_parents
Create parent folders (if none) when saving
2018-01-18 00:49:45 -05:00
sum01
808e3a7c9f
Prompt to create parent folders (if none) when saving
Fixes #995
2018-01-17 20:59:19 -05:00
Zachary Yedidia
16e9068cb9 Support line:col in JumpLine
Closes #1000
2018-01-17 19:09:50 -05:00
Zachary Yedidia
3924e363d1 Fix minor autoindent issue
Fixes #985
2018-01-17 17:37:17 -05:00
Zachary Yedidia
a274daeaaf
Merge pull request #998 from JoshuaRLi/select-line-action
Implemented SelectLine as an Action
2018-01-17 17:25:37 -05:00
Zachary Yedidia
e26417fd14 Fix shebang js highlighting and js division
Closes #901
Closes #994
2018-01-17 17:19:03 -05:00
Joshua Li
d7ba2f600e
implemented select line as an Action 2018-01-16 17:27:15 -05:00
Zachary Yedidia
1cf4baa743 Don't use indentchar style if disabled
Fixes #990
2018-01-14 11:23:30 -08:00
Zachary Yedidia
7e3aa337f6 Fix autocomplete on empty prompt 2018-01-10 15:41:49 -05:00
Zachary Yedidia
3f01101da4 Add onBufferOpen plugin callback
Closes #948
2018-01-08 17:08:11 -05:00
Zachary Yedidia
9a6054fc43 Add GetMouseClickLocation to view 2018-01-08 16:54:27 -05:00
Zachary Yedidia
7911ce1f16 Remove duplicate utf8 code 2018-01-08 16:38:59 -05:00
Zachary Yedidia
8bff7f00d0 Change docs to use true/false instead of on/off
Closes #976
2018-01-08 15:21:32 -05:00