Commit Graph

86 Commits

Author SHA1 Message Date
Zachary Yedidia
df44f538fd Improve file save speed for large files 2018-01-02 18:36:29 -05:00
Zachary Yedidia
bdb699211a Add raw command to view raw terminal esc codes 2017-11-29 01:06:16 -05:00
Zachary Yedidia
a1f3499825 Fix issue with multicursor IDs
Fixes #899
2017-10-22 19:51:16 -04:00
Zachary Yedidia
c7334eb3b7 Fix sucmd option
Fixes #854
2017-10-03 10:48:07 -04:00
Zachary Yedidia
f4e94d6d34 Add sucmd to customize "sudo" command
Fixes #833
2017-10-01 21:55:43 -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
cb75531818 Make mouse option global option
Fixes #816
2017-09-21 17:10:53 -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
90977fb4e1 Add mouse option to allow disabling mouse support 2017-09-06 15:50:50 -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
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
69c6d8a099 Fix some lint problems 2017-08-08 11:30:09 -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
Zachary Yedidia
030a05c103 Always restart the screen when saving with sudo
Fixes #723
2017-07-08 15:13:42 -04:00
Zachary Yedidia
8f4820ba28 Move cursor selections on Insert or Remove
Ref #715
2017-06-25 19:14:01 -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
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
b7133b302b Don't remember path on save if it is invalid
Fixes #656
2017-05-14 10:27:15 -04:00
Zachary Yedidia
84e350aa6f Optimize memory usage for loading syntax files 2017-05-02 10:30:27 -04:00
Zachary Yedidia
b4dda8bad8 Use less memory when opening very large files 2017-04-29 14:12:00 -04:00
Zachary Yedidia
d413562145 Add more performance and memory optimizations 2017-03-24 14:11:21 -04:00
Zachary Yedidia
59bf1a2260 Optimize the memory usage for syntax highlighting 2017-03-21 12:45:27 -04:00
Zachary Yedidia
214adcf611 Properly clear syntax highlighting when it is disabled 2017-03-20 17:40:33 -04:00
Zachary Yedidia
bd0c5c655e Add more syntax files and include syntax highlighter in the repo 2017-02-26 11:14:35 -05:00
Zachary Yedidia
16d8a560bf Don't highlight if syntax is off 2017-02-26 11:14:35 -05:00
Zachary Yedidia
7fe2b8ef2f Store highlighting matches in each line 2017-02-26 11:14:35 -05:00
Zachary Yedidia
d0057121ef Start implementing syntax highlighting optimizations 2017-02-26 11:14:35 -05:00
Zachary Yedidia
18c4196354 Store states in linearray 2017-02-26 11:14:35 -05:00
Zachary Yedidia
2fcb40d5a9 Use new syntax highlighting engine from zyedidia/highlight
This changes all the syntax files in the runtime directory and also
changes how syntax highlighting is done from inside micro.
2017-02-26 11:14:35 -05:00
10sr
701d0dfe3d Add rmtrailingws feature 2016-12-17 11:33:48 +09:00
10sr
5b689a5592 Fix bug that eofnewline does not work on save 2016-12-15 16:29:50 +09:00
Zachary Yedidia
32e8284505 Expand '~' in SaveAs
Fixes #491
2016-12-13 08:58:08 -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
3ecdd96931 Add cd and pwd commands to change the working dir
Closes #451
2016-11-18 16:48:08 -05:00
10sr
7bc8d77387 Add Buffer.AbsPath and a plugin function DirectoryName (#455)
* Add Buffer.AbsPath

* Add a plugin function DirectoryName

* Update plugins.md
2016-11-18 11:53:48 -05:00
Zachary Yedidia
4c0b00bf2b Reset ModTime even if WriteFile fails
Ref #440
2016-11-03 10:55:44 -04:00
Zachary Yedidia
63ccbc1ebd Add eofnewline option
Closes #429

Enable with '> set eofnewline on'
2016-10-23 18:37:29 -04:00
Zachary Yedidia
1b9bb31dd6 Cleanup and add more comments 2016-10-18 11:12:28 -04:00
Jon Craton
fe0dce0960 Added IndentString method on Buffer (#415)
* Added IndentString function to retrun the string used for indentation (n-spaces or a tab) based on buffer settings

* Combined redundant  statements

* Removed duplicate leading whitespace check

* Better IndentString description

* Fixed remainder logic that I broke
2016-10-15 10:09:20 -04:00
Zachary Yedidia
3fdc2ca0da Always use the selection as search term when using quick search 2016-10-13 12:12:55 -04:00
Saeed Rasooli
546acfd21d Fixes in last PR: MoveLinesUp and MoveLinesDown (#408)
* Bugfix: fix panic in MoveLinesUp when moving up the *last* line

* Bugfix: don't panic in Buffer.Line if index is out or range

* clean MoveLinesDown since it won't work for the last line anyway, add comment

* Cleanup: replace spaces with tabs in MoveLinesUp and MoveLinesDown
2016-10-12 11:38:44 -04:00
Saeed Rasooli
0bf07eadcc Improvement: move MoveLinesUp and MoveLinesDown to Buffer
enables Undo/Redo with EventHandler, #407
2016-10-12 08:15:46 +03:30
boombuler
7d395a29a7 don't clone unsaved file buffers.
if I open multiple empty tabs, I don't want the same "new file buffers"
2016-09-14 09:37:12 +02:00
Zachary Yedidia
fd786b3020 Allow a buffer to be opened simultaneously 2016-09-10 10:30:15 -04:00
Zachary Yedidia
af22e0a567 Allow overwriting options with flags
Fixes #258

Also related to #233, this commit also changes how +LINE,COL works. Now it is
micro -startpos LINE,COL file.
2016-09-03 11:26:01 -04:00
Zachary Yedidia
fc2d9bb461 Merge pull request #233 from schollz/master
Flag to start at specified line/column number (#224)
2016-08-31 16:39:30 -04:00