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
Zack Scholl
62ac9f79f2
Switched to +LINE,COL
...
Previously the flag was parsed for `-cursor LINE,COL`
However, emacs and nano both us `+LINE,COL` and this also makes
it easier to ignore the `+` as a filename.
2016-08-31 10:10:54 -04:00
Zachary Yedidia
ddff950fcd
Check for filetype after saving an untitled buffer
...
Fixes #242
2016-08-30 17:25:30 -04:00
Zack Scholl
4499228cdb
Added flag to introduce cursor starting positions
2016-08-30 11:28:28 -04:00
Zachary Yedidia
b4e470b6e2
Add support for making buffer local options in settings.json
2016-08-25 20:15:58 -04:00
Zachary Yedidia
ec0833b09c
Update plugins for local settings
2016-08-25 16:01:42 -04:00
Zachary Yedidia
1a9123630b
Add support for local or global only settings
2016-08-25 15:48:02 -04:00
Zachary Yedidia
348922e1f2
Add filetype as an option
...
Still in progress
2016-08-25 15:48:02 -04:00
Zachary Yedidia
261748bd56
Add local settings for each buffer
2016-08-25 15:47:26 -04:00
Zachary Yedidia
0711c29c0a
Add onBufferOpen plugin callback
2016-08-24 17:03:02 -07:00
Zachary Yedidia
02f78edaf9
Open help in a separate split
2016-07-14 13:01:02 -04:00
Zachary Yedidia
8c0983a36c
Add some more comments
2016-07-10 13:26:24 -04:00
Zachary Yedidia
40affa56c7
Create tab struct and reorganize tab bar
2016-06-08 13:26:50 -04:00
Zachary Yedidia
d72da1eb5c
Add more descriptive error message if there is an error with gob
2016-06-07 17:03:05 -04:00
Zachary Yedidia
8d184c1870
Fix glitch with undo
2016-06-07 16:10:39 -04:00
Zachary Yedidia
72f5808025
Replace rope with lineArray
2016-06-07 11:43:28 -04:00
Zachary Yedidia
1d52ef6c54
Add simple way to save with sudo if you forgot to open micro with sudo
...
If you are editing a read-only file and forgot to open micro with sudo
so you could write to it, when saving the file, micro will now give you
the option to save with sudo.
This little hack is used by vim users to achieve the same behavior, but
micro makes it nicer to use. Here is an explanation for how it works:
http://stackoverflow.com/questions/2600783/how-does-the-vim-write-with-sudo-trick-work
Fixes #158
2016-06-02 13:01:13 -04:00
Zachary Yedidia
ef17306f8b
Allow changes from external programs to be undone
...
We use a diff to be able to transform the buffer into an arbitrary
string (usually when we reread the file after an external program such
as gofmt has changed it) and still preserve undo/redo.
Fixes #136
2016-05-30 21:01:40 -04:00
Zachary Yedidia
d4caf4510c
Fix bug with on reopen
2016-05-30 18:22:10 -04:00
Zachary Yedidia
b312e7c9ad
Refactor ReOpen function
2016-05-30 17:48:33 -04:00
Zachary Yedidia
19717dd3ae
Check if the file being edited has been modified by an external program
2016-05-29 17:58:06 -04:00