Commit graph

594 commits

Author SHA1 Message Date
Camille Scholtz
096221fd0e Add padding to relocate func (fixes weird scrolling behavior) 2016-05-20 17:43:26 +02:00
Camille Scholtz
bbcd33d9fd Add a bit of "padding" to relocate 2016-05-20 17:34:20 +02:00
Zachary Yedidia
0673396335 Merge branch 'duplicate' of https://github.com/onodera-punpun/micro into onodera-punpun-duplicate 2016-05-20 09:46:54 -04:00
Zachary Yedidia
009792b6b1 Fix ctrl modifiers 2016-05-20 09:41:00 -04:00
Zachary Yedidia
3d6eba376d Merge 2016-05-20 09:19:28 -04:00
Zachary Yedidia
ebaad9b00c Use the new and updated version of tcell 2016-05-20 09:19:25 -04:00
Camille Scholtz
81e1a6e157 Give shortcuts more message feedback, add duplicate line option (fixes #124) 2016-05-20 00:04:53 +02:00
Zachary Yedidia
342149af3f Add colorscheme to makefile syntax file
Closes #125
2016-05-19 07:26:10 -04:00
Zachary Yedidia
b0930a0bb8 Merge pull request #121 from onodera-punpun/case_insensitive
search case insensitive
2016-05-18 12:47:40 -04:00
Camille Scholtz
bfbfc50018 Add ignorecase option 2016-05-18 18:44:32 +02:00
Camille Scholtz
2a95d0b012 search case insensitive 2016-05-18 18:11:11 +02:00
aerth
17397d503e
add binding for ClearStatus 2016-05-18 07:18:14 -07:00
Zachary Yedidia
77d8a2217f Fix selection graphics for indentchar 2016-05-18 09:33:49 -04:00
Zachary Yedidia
333c4ac6b1 Fix ordering of selection on SelectAll
Fixes #119
2016-05-18 09:27:17 -04:00
Zachary Yedidia
d7b61ecfa8 Fix small bug in Remove function in buffer 2016-05-17 19:57:16 -04:00
Camille Scholtz
4a38f232c0 Add copy feedback 2016-05-17 20:09:59 +02:00
Zachary Yedidia
6d394efcd9 Remove some unnecessary code
Fixes #104
2016-05-17 13:39:27 -04:00
Zachary Yedidia
c727775557 Merge pull request #111 from onodera-punpun/fix_jump
Fix jumping in rxvt-unicode when switching focus
2016-05-17 13:38:59 -04:00
Camille
baddc4107e Change relocate from true to false 2016-05-17 19:31:36 +02:00
Zachary Yedidia
363697a657 Fix capitalization of scrollSpeed option
Closes #114
2016-05-17 12:53:46 -04:00
Zachary Yedidia
abddd6eecd Merge pull request #110 from onodera-punpun/indentchar
Add indentation character option(s).
2016-05-17 12:37:47 -04:00
Zachary Yedidia
213bb6fabe Fix find where the match indicies are the same
Fixes #113
2016-05-17 12:36:41 -04:00
Camille Scholtz
87a0c06197 Add scrollspeed option 2016-05-17 18:15:47 +02:00
Camille Scholtz
93927cf0f5 Rename indent-line to indent-char, change default value from | to 2016-05-17 18:09:49 +02:00
Camille Scholtz
266461cc72 Fix jumping in rxvt-unicode when switching focus 2016-05-17 17:53:49 +02:00
Camille Scholtz
a0d4123731 Add indent character option 2016-05-17 17:17:18 +02:00
Zachary Yedidia
3d1fb69c15 Merge 2016-05-15 13:44:30 -04:00
Zachary Yedidia
aa8944304b Add statusline option
Fixes #105
2016-05-15 13:44:07 -04:00
Dante Swift
a03cacf1e7 saving now resets buffer IsModified to false 2016-05-15 00:26:36 -06:00
Zachary Yedidia
e2efc963b7 Simplify IsDirty check 2016-05-14 12:04:13 -04:00
Zachary Yedidia
29ae840413 Use rope substring instead of report 2016-05-07 10:57:40 -04:00
Zachary Yedidia
8670a03973 Add the text member back.
It seems rope.Report is not acting how I expected it to. I need to look
into this in more detail but for now I am adding the Text variable back
to the Buffer.

Fixes #98
2016-05-06 19:15:10 -04:00
Zachary Yedidia
aeff0f8170 Merge pull request #82 from zyedidia/plugins
Plugin System
2016-05-06 11:56:24 -04:00
Zachary Yedidia
ae946c5f5e Update runtime 2016-05-06 11:55:41 -04:00
aerth
5baf2e226d
Hint at ^P and ^N after finding 2016-05-06 02:52:51 -07:00
Zachary Yedidia
31567c9e15 Add linter option 2016-05-05 12:53:28 -04:00
Zachary Yedidia
3cbb23bfbe Add automatic linting for Go, Python, C, D, Java, Javascript, Lua 2016-05-05 12:53:27 -04:00
Zachary Yedidia
1668e91310 Add linter plugin to easily make linters 2016-05-05 12:53:27 -04:00
Zachary Yedidia
59e71a4a0c Improved error parsing and use warnings for golint instead of errors 2016-05-05 12:53:27 -04:00
Zachary Yedidia
908bcb22ae Have go plugin create its own options 2016-05-05 12:53:27 -04:00
Zachary Yedidia
05e2886dca Fix build error 2016-05-05 12:53:27 -04:00
Zachary Yedidia
a262530217 Fix gutter message line counting 2016-05-05 12:53:27 -04:00
Zachary Yedidia
30c7a9c4a5 Refine gutter messages and add go build checking to go plugin 2016-05-05 12:53:27 -04:00
Zachary Yedidia
d933efc53d Add hooks for every action that's bindable 2016-05-05 12:53:26 -04:00
Zachary Yedidia
a333f0ade2 Add default plugins, and install go plugin by default 2016-05-05 12:53:26 -04:00
Zachary Yedidia
603cec9d81 Load plugins from ~/.config/micro/plugins 2016-05-05 12:53:07 -04:00
Zachary Yedidia
eba820a9c7 Rewrite gofmt and goimports as plugins 2016-05-05 12:53:07 -04:00
Zachary Yedidia
e05e993e25 Interface with plugin.lua file 2016-05-05 11:31:59 -04:00
Zachary Yedidia
87d9221a73 Small optimization 2016-05-05 11:23:20 -04:00
Zachary Yedidia
f6dc983823 Optimization for buffer text
We no longer store a string representation of the buffer and instead
directly access it through the rope
2016-05-04 12:43:17 -04:00
Zachary Yedidia
c163aaa895 Small fix to relocation 2016-05-04 07:24:33 -04:00
aerth
896ade2041
Add Ctrl+L jump to line #, JumpLine()
Converts input to integer
	Returns error if any
	Only jumps to possible lines
	Returns number of lines available
2016-05-04 07:48:28 -07:00
Zachary Yedidia
5aace36618 Update screenshot and status line 2016-05-03 18:54:01 -04:00
Zachary Yedidia
cf2db5dfe7 Add R syntax file
Closes #91
2016-05-02 15:01:46 -04:00
Zachary Yedidia
07d8a08422 Use tcell's EventPaste to capture paste from the OS
This commit uses the recent commit to zyedidia/tcell to capture paste
events from the OS.

Fixes #60
Fixes #61
2016-05-02 11:16:03 -04:00
Zachary Yedidia
4ca6e65197 Default setting for tabsize should be float64 not int
Fixes #92
2016-05-02 07:23:08 -04:00
Zachary Yedidia
48a17a508d Use hash for savedText instead of full string 2016-05-01 19:07:54 -04:00
Zachary Yedidia
efb4b5e899 Don't store buffer in text event 2016-05-01 16:45:23 -04:00
Zachary Yedidia
012668146c Remove unnecessary check for selection 2016-04-30 16:56:48 -04:00
Zachary Yedidia
539d4b1167 Fix differences between selection with keys and with mouse
Fixes #89
2016-04-30 16:51:21 -04:00
Zachary Yedidia
9ad2820e5e Change selection color in solarized colorscheme 2016-04-30 15:32:33 -04:00
Zachary Yedidia
56cdfcfe46 If a setting is not defined, use the default, not the zero value 2016-04-30 15:02:33 -04:00
Zachary Yedidia
e0f20fbb55 Fix selection bugs 2016-04-30 14:06:00 -04:00
Zachary Yedidia
ebf91a7432 Constrain help text to 80 columns 2016-04-30 12:43:40 -04:00
Zachary Yedidia
f6393dd835 Use a map for settings instead of a struct
Using a map for the settings means that plugins will be able to create
their own settings at runtime.
2016-04-30 11:39:48 -04:00
Zachary Yedidia
18b0b3e97d Add bindings for shiftup and shiftdown 2016-04-28 21:00:46 -04:00
Zachary Yedidia
536c96237c Merge branch 'gutter-messages' 2016-04-27 12:33:45 -04:00
Zachary Yedidia
53249c46f5 Support different types of gutter messages 2016-04-27 12:33:33 -04:00
Zachary Yedidia
e1e441f588 Merge branch 'elementary-mouse' 2016-04-27 11:23:47 -04:00
Zachary Yedidia
cf8de5e11d Simple support for gutter messages 2016-04-27 11:22:57 -04:00
Zachary Yedidia
80755dcf31 Improve word movement behavior 2016-04-27 10:44:36 -04:00
Zachary Yedidia
6576dcc168 Merge branch 'arrow-bindings' 2016-04-26 21:15:08 -04:00
Zachary Yedidia
8e03e20055 Minor cleanup 2016-04-26 20:18:56 -04:00
Zachary Yedidia
6d2845ca35 Add mappings for ctrl keys 2016-04-26 20:14:58 -04:00
Zachary Yedidia
84a844994a Correct word movement behavior 2016-04-26 19:53:43 -04:00
Zachary Yedidia
6c99eea610 Improve WordRight and WordLeft bindings 2016-04-26 09:58:56 -04:00
Zachary Yedidia
e00e0cfa3f Starting to add more mappings for arrow keys
These mappings include Alt+arrows and Shift+arrows and Alt+Shift+arrows

This commit also switches the version of tcell that micro uses to my
fork which supports alt, shift, and ctrl + arrows.
2016-04-26 09:58:56 -04:00
Zachary Yedidia
269f15d88f Also use KeyBackspace for deleting in prompt
Fixes #78
2016-04-26 09:44:08 -04:00
R. Harish Navnit
94b71931bc Make the Home and End key presses point the cursor to the start and end of a line, respectively 2016-04-25 14:30:52 +05:30
Zachary Yedidia
0ee6be3d0f Use methods on view instead of functions for bindings 2016-04-24 18:32:18 -04:00
Zachary Yedidia
20ab7a44ab Relocate cursor on reOpen() 2016-04-24 17:26:42 -04:00
Zachary Yedidia
e1c1372f8f Add check flag for search and replace 2016-04-24 17:08:40 -04:00
Zachary Yedidia
3c32253772 Fix terminal mode panic 2016-04-24 16:49:54 -04:00
Zachary Yedidia
eabf21d3ed Use reflection for setting options 2016-04-24 15:35:16 -04:00
Zachary Yedidia
1d9d0c3a4d Fix PageUp and PageDown bindings
Fixes #72.
2016-04-24 14:40:30 -04:00
Zachary Yedidia
c903e949ef Merge 2016-04-24 09:01:42 -04:00
Zachary Yedidia
8807ede224 Added StartOfLine and EndOfLine actions
This commit also adds error reporting for invalid json.

Fixes #36.
2016-04-24 09:01:01 -04:00
Zachary Yedidia
74bd338cbc Improve help text 2016-04-24 08:38:38 -04:00
Zachary Yedidia
1f62ff9d80 Improve help text and move to its own file 2016-04-24 08:31:42 -04:00
Zachary Yedidia
d088b7c2df Merge pull request #71 from aerth/gofmt-2
gofmt-on-save redone for new bindings
2016-04-24 07:47:48 -04:00
aerth
7746952545
gofmt-on-save redone for new bindings 2016-04-24 01:48:51 +00:00
aerth
b39d383dac
cut lines into clipboard 2016-04-24 01:29:09 +00:00
Zachary Yedidia
af3715d55d If system clipboard is unsupported, use internal clipboard instead
Fixes #65
2016-04-23 20:54:52 -04:00
Zachary Yedidia
77853ec6b6 Use my fork of clipboard 2016-04-23 20:52:26 -04:00
Zachary Yedidia
93c3a503ea Use default binding for key if not specified 2016-04-23 19:03:24 -04:00
Zachary Yedidia
fa82fc2b74 Add delete key binding
Fixes #54
2016-04-23 18:58:02 -04:00
Zachary Yedidia
94c0f576e1 Load and save key bindings from bindings.json 2016-04-23 18:43:09 -04:00
Zachary Yedidia
2b8cc4cfce Fix build error 2016-04-23 18:28:41 -04:00
Zachary Yedidia
2adaf68bd4 Rework the bindings as keys bound to actions 2016-04-23 18:25:08 -04:00
Zachary Yedidia
0fac02cd08 Fix SelectLine 2016-04-23 14:02:20 -04:00
Zachary Yedidia
7281cdbadd Fix autoindent setting 2016-04-23 08:56:45 -04:00
Zachary Yedidia
7365f0f785 Fix selection highlighting 2016-04-22 19:31:50 -04:00
Zachary Yedidia
3d76898afe Fix elementary mouse issue
Fixes #34

This commit requires a modification to tcell before it will work.
2016-04-22 19:12:32 -04:00
Zachary Yedidia
fedb8b03da Fix horizontal scrolling
Fixes #59
2016-04-22 18:50:01 -04:00
aerth
23248c3a6f
Add ruler to possibleSettings 2016-04-22 20:15:38 +00:00
aerth
0440ca45cd
Toggle line numbers 2016-04-22 20:02:26 +00:00
Zachary Yedidia
acabfcb8bb Expand ~ in file opening 2016-04-22 09:23:01 -04:00
Zachary Yedidia
15dbf37154 Possible fix for elementary mouse issue 2016-04-22 09:11:44 -04:00
Zachary Yedidia
568f638e70 Add nicer deleting for soft tabs 2016-04-21 19:15:46 -04:00
Zachary Yedidia
77caf5878d Fix windows binary links
Fixes #47
2016-04-21 07:05:15 -04:00
Zachary Yedidia
6d3344e4bd Add auto indent 2016-04-20 21:47:52 -04:00
Zachary Yedidia
6aab17f445 Set last visual x after SetLoc is called
Fixes #46
2016-04-20 20:03:53 -04:00
Zachary Yedidia
3b4521e9c6 Remove unused syntax highlighting code and optimize IsDirty() 2016-04-20 13:52:10 -04:00
Zachary Yedidia
89493a3e80 Merge 2016-04-20 12:50:36 -04:00
Zachary Yedidia
b5b84d9068 Don't adjust mouse coordinates
Fixes #23
2016-04-20 12:50:13 -04:00
Zachary Yedidia
4f6a6866d1 Set encoding fallback to ASCII
See #45
2016-04-20 07:23:16 -04:00
Zachary Yedidia
0d1ba36044 Merge 2016-04-19 21:33:30 -04:00
Zachary Yedidia
65745a6b43 Much improved terminal mode (Ctrl-b)
This commit splits "Boss mode" into to different actions. Executing
a command with Ctrl-b will now open an interactive terminal. If you
would simply like to execute a background job in the shell, press
Ctrl-e and then type `run shell-command`.
2016-04-19 21:25:13 -04:00
Zachary Yedidia
9603baa6ec Merge pull request #44 from aerth/fork1
stdout and stderr buffers for command execution
2016-04-19 19:03:30 -04:00
Zachary Yedidia
c767b3dc0c Add OpenBuffer() function to View
Fixes #43
2016-04-19 18:58:52 -04:00
aerth
838a932dd9
stdout and stderr buffers for command execution 2016-04-19 19:49:43 +00:00
Zachary Yedidia
4305c71f6a Use a buffer for help screen
Fixes #24
2016-04-19 13:58:02 -04:00
Zachary Yedidia
2355f2fa51 Use variadic args for messenger Message and Error
Closes #41
2016-04-19 13:45:24 -04:00
Zachary Yedidia
87108bfed8 Add -version option
Fixes #33
2016-04-19 13:40:30 -04:00
Zachary Yedidia
f0ad01d1ec Add option to save and quit
Fixes #40
2016-04-19 13:16:08 -04:00
aerth
54f00cb937
shell command output is held in buffer until completion 2016-04-19 13:40:05 +00:00
aerth
f3e9271cae
boss mode: Single line output stays in messenger, multiline output goes to a help-style screen 2016-04-19 05:10:53 +00:00
aerth
bbe78fbdff
Display nonblank output on full screen 2016-04-19 04:53:56 +00:00
aerth
a2ca47a496
Boss mode 2016-04-19 04:33:54 +00:00
Zachary Yedidia
c264fec472 Fix end key behavior
Fixes #28
2016-04-18 21:24:15 -04:00
Zachary Yedidia
aa129c1ddf Add support for other encodings 2016-04-18 17:10:47 -04:00
Zachary Yedidia
d10c401a97 Change the help binding to Ctrl-g from Ctrl-h
This is necessary because some terminals send Backspace and Ctrl-h as
the same key, so Ctrl-h must be reserved for deleting. See #8.
2016-04-18 16:28:53 -04:00
Zachary Yedidia
fdceddefe1 Fix IsDirty 2016-04-18 16:13:49 -04:00
Zachary Yedidia
4428d893b5 More comments and a slight optimization for syntax file loading 2016-04-18 16:12:34 -04:00
Zachary Yedidia
47c32dda22 Major optimization for loading syntax files 2016-04-18 14:40:07 -04:00
Zachary Yedidia
273401d911 Optimization for IsDirty() 2016-04-18 14:20:40 -04:00
Zachary Yedidia
84d353838c Add bindings for Home and End keys
See #21
2016-04-18 14:02:39 -04:00
Zachary Yedidia
c7f8584d84 Add tabsToSpaces option 2016-04-18 13:01:39 -04:00
Zachary Yedidia
fa7808b4ae Prevent panic if mouse y coordinate is below 0
See #7
2016-04-18 11:54:32 -04:00
Zachary Yedidia
cc222b67ec Automatically create ~/.config or if it does not exist 2016-04-18 10:36:41 -04:00
Zachary Yedidia
8dee0ad2d5 Use XDG_CONFIG_HOME for configuration directory
Fixes #18
2016-04-18 10:31:19 -04:00
Zachary Yedidia
63ce8bcfce Create ~/.micro if it does not exist 2016-04-18 09:40:27 -04:00
Zachary Yedidia
8656335da4 Embed runtime files in the go binary 2016-04-18 09:35:53 -04:00
aerth
337f162360
now is go gettable and updated make file 2016-04-18 10:59:41 +00:00