Commit Graph

56 Commits

Author SHA1 Message Date
Zachary Yedidia
eeaac76f5f Use io.Readers to read files more efficiently 2016-11-29 13:44:30 -05:00
Zachary Yedidia
400ac56651 Make tab.CurView public 2016-11-28 20:50:11 -05:00
Zachary Yedidia
5481a834bf Actually rename width, height, lockWidth, lockHeight 2016-11-28 20:28:40 -05:00
Zachary Yedidia
0fbae7610c Fix buffer name problem
Fixes #458
2016-11-19 19:07:51 -05:00
Zachary Yedidia
c692570212 Replace CtrlO with open command
This comit also makes it possible for a binding to auto-type the
beginning of a command into command mode.

Closes #450
2016-11-19 12:57:54 -05:00
Zachary Yedidia
1b9bb31dd6 Cleanup and add more comments 2016-10-18 11:12:28 -04:00
Jon Craton
cc9342df9d Added OutdentLine action 2016-10-15 12:47:15 -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
Jon Craton
78b0aac5ec DuplicateLine now duplicates the current selection if there is text selected 2016-10-14 22:22:48 -04:00
Jon Craton
690627a338 Refactored IndentSelection and OutdentSelection to remove duplicate code (#414)
* Refactored indent selection

* Refactored OutdentSelection

* Refactored to use x and y instead of line and j
2016-10-14 16:52:55 -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
127ebc15b9 Improvement: improve Search behaviour, and Escape key behaviour 2016-10-13 00:49:43 +03:30
Saeed Rasooli
c1dd403ab9 Feature: add MoveLinesUp (Alt + Up) and MoveLinesDown (Alt + Down) actions 2016-10-12 08:15:46 +03:30
Zachary Yedidia
8f5f8ffdd6 Fix tabstop sizing with mix of tabs and spaces
Fixes #404
2016-10-10 21:44:16 -04:00
Zachary Yedidia
3733e7e223 Add 'Unsplit' action and VSplit and HSplit actions
This commit adds the 'Unsplit' action used to close all splits except
the current one.

It also adds the 'VSplit' and 'HSplit' actions which open empty
vertical/horizontal splits so you can bind them to keys.

Closes #228
2016-10-04 11:08:32 -04:00
boombuler
c1a3ee1706 possibility to show a log view 2016-09-26 19:08:37 +02:00
Zachary Yedidia
301e86a46e Add SaveAs action and command
Fixes #340

You can bind the action `SaveAs` and if you provide an argument to
the `save` command it will save as. For example `> save test.txt`.
2016-09-08 14:13:46 -04:00
Matthew Brener
4f4e87a82c its --> it's in actions.go comment 2016-09-08 16:14:04 +10:00
Zachary Yedidia
e643860e3d Add Open command for view 2016-09-06 19:58:34 -04:00
Zachary Yedidia
0373589ab8 Merge 2016-09-06 19:30:28 -04:00
Zachary Yedidia
dce56a2b85 Have HandleShellCommand return the stdout
HandleShellCommand will now return the stdout as a string and
it also takes an additional flag indicating whether it should
wait before closing the shell and returning to the editor.
2016-09-06 19:27:57 -04:00
Zachary Yedidia
131524e670 Merge branch 'params' of https://github.com/boombuler/micro into boombuler-params 2016-09-06 10:59:30 -04:00
Zachary Yedidia
539495d2f7 Add support for macros
Closes #270

CtrlU to toggle recording and CtrlJ to playback.
You can also rebind using the "ToggleMacro" and "PlayMacro"
actions.

Note that recursive macros are not yet supported.
2016-09-06 10:44:15 -04:00
Zachary Yedidia
966dac97f8 Make unsaved changes prompt more clear
Fixes #301
2016-09-06 10:06:36 -04:00
Zachary Yedidia
0a534767f0 Merge branch 'primary-clipboard' 2016-09-05 11:37:49 -04:00
Zachary Yedidia
5d00522d4e Deselect for CursorStart
Fixes #308
2016-09-05 08:25:49 -04:00
Zachary Yedidia
6721ec8e7d Copy to primary clipboard for any change in selection 2016-09-04 21:19:14 -04:00
James Tancock
187ea0da1c Correct the number of spaces to add when a tab is inserted at an offset cursor.
Fixes #268
2016-09-04 15:50:39 +01:00
Zachary Yedidia
d9b8a04841 Add support for primary clipboard 2016-09-02 09:40:08 -04:00
Florian Sundermann
ccfe08bc60 allow command parameters to be quoted
this way FileCompletions could contain space runes without
breaking the parameter.
2016-09-02 13:44:22 +02:00
Zachary Yedidia
59d2fa81dd Unselect for cursor movement actions
Fixes #250
2016-08-31 08:51:24 -04:00
Zachary Yedidia
b6f5db3692 Add QuitAll action to close all splits and tabs at once
See #239
2016-08-30 17:38:46 -04:00
Zachary Yedidia
fccec47ae5 Have CanClose use single letters for responses
Closes #184
2016-08-29 10:10:16 -04:00
Zachary Yedidia
f8071af717 Fix bug with view.Center
Fixes #215
2016-08-29 09:16:24 -04:00
Zachary Yedidia
d6da2dfeca Pass the view into plugin callbacks 2016-08-25 16:35:03 -04:00
Zachary Yedidia
261748bd56 Add local settings for each buffer 2016-08-25 15:47:26 -04:00
Zachary Yedidia
dbdfef632e Add center action to center the view on the cursor 2016-08-24 15:48:11 -07:00
Zachary Yedidia
d6a7f6291a Plugin onAction return value should determine relocate 2016-08-24 10:02:06 -07:00
Zachary Yedidia
24076e7dff Auto indent on paste
Fixes #204
2016-08-23 14:48:28 -07:00
Zachary Yedidia
760d709c34 Remove auto indented spaces if the line is empty 2016-08-22 10:04:23 -07:00
Zachary Yedidia
d17cc0f628 Add boolean option to actions to disable the lua callback 2016-08-17 14:16:27 -04:00
Zachary Yedidia
8a58506c72 Add much better autocompletion for commands 2016-08-17 13:49:37 -04:00
Zachary Yedidia
4a0c48587a Split help into multiple files and add help command 2016-08-17 11:59:37 -04:00
Zachary Yedidia
ed31d37e74 Change plugin callbacks to not only happen when a keybinding triggers the action 2016-08-16 11:43:36 -04:00
Zachary Yedidia
de9567322b Rebind Home and End to StartOfLine and EndOfLine
This commit changes the default keybindings for Home and End. It
also changes the InsertEnter action to InsertNewline (a better name)
although InsertEnter is still valid for backwards compatibility.

Closes #206
2016-08-16 10:55:04 -04:00
Zachary Yedidia
61536326ca Fix statusline and tabbar offsets 2016-08-11 13:50:59 -04:00
Zachary Yedidia
bd55c5f834 Add ability to delete splits 2016-08-11 11:27:32 -04:00
Zachary Yedidia
cbbe312762 Add split_tree and ability to create splits 2016-08-11 10:45:35 -04:00
Zachary Yedidia
2cbd9428aa Remove current implementation of splits 2016-08-10 15:28:23 -04:00
Zachary Yedidia
5a005e36b6 Small fix to OutdentSelection 2016-08-08 13:11:34 -05:00