Commit Graph

367 Commits

Author SHA1 Message Date
Dan Kaplun
abe46209cc Fixes escape press in FileBrowser with no panes open 2014-11-11 22:15:51 -06:00
Dan Kaplun
18e78fe190 Bugfix 2014-11-11 22:11:34 -06:00
Dan Kaplun
02e04e84cc Fixes filebrowser focus styling race condition 2014-11-11 19:20:04 -06:00
Dan Kaplun
05981c3b66 Implements multiple buffers 2014-11-11 18:12:53 -06:00
Dan Kaplun
d8004aeb72 Fixes (page)up/(page)down to go to beginning/end when on first/last line 2014-11-11 17:49:29 -06:00
Dan Kaplun
59f8e47686 Fixes saving new file 2014-10-20 02:31:02 -05:00
Dan Kaplun
9039d233c8 Adding in ability to toggle Filebrowser and adding in default key
binding
2014-10-19 21:22:17 -05:00
Dan Kaplun
807eac1d11 Fixes indentation bugs 2014-10-19 17:05:48 -05:00
Dan Kaplun
bdf26aecd9 Updates copy-paste dep to use root repo rather than a patched fork 2014-10-05 16:50:32 -05:00
Dan Kaplun
2488416422 Improves keybindings for OSX 2014-08-14 21:00:05 -05:00
Dan Kaplun
69bbd36cb9 Adds TODO for modal click focus change 2014-07-15 21:32:24 -05:00
Dan Kaplun
8375f1fea4 Implements opening directories 2014-07-01 01:42:18 -04:00
Dan Kaplun
e07cef72d4 Fixes quit when trying to open unreadable file
Fixes #28
2014-06-26 23:16:28 -05:00
Dan Kaplun
f1ae95b8e7 Fixes saving to readonly files 2014-06-26 23:13:09 -05:00
Dan Kaplun
74546d3322 Updates editor language and highlighting on save
Fixes #19
2014-06-25 02:16:03 -05:00
Dan Kaplun
680e3daaf8 Adds file browser 2014-06-20 22:57:53 -05:00
Dan Kaplun
abe8c66d9d Selects editor on mousedown 2014-06-17 02:27:38 -05:00
Dan Kaplun
4dc4cca34e Fixes selection flicker on click 2014-06-16 20:19:28 -04:00
Dan Kaplun
90a2469857 Selects first element on modal click 2014-06-16 16:13:55 -04:00
Dan Kaplun
c3ac353f31 Fixes tabbing when no element is selected 2014-06-16 14:09:06 -04:00
Dan Kaplun
897fbaa8f3 Updates cursor on blur 2014-06-16 14:09:06 -04:00
Dan Kaplun
1ad214ec43 Doesn't hide dialog when clicked 2014-06-15 15:37:52 -05:00
Dan Kaplun
07a465e692 Implements gutter 2014-06-12 19:18:05 -05:00
Dan Kaplun
a93d1c080c Implements in-memory backend for clipboard in case backend doesn't work or exist 2014-06-10 15:17:12 -05:00
Dan Kaplun
4570f78935 Adds -h and --help 2014-05-30 16:00:57 -05:00
Dan Kaplun
35518b033b Adds a title to Help dialog 2014-05-30 10:23:47 -05:00
Dan Kaplun
b98539b220 Sort help dialog keybindings by depth 2014-05-30 06:24:57 -05:00
Dan Kaplun
7f56b80a2e Implements Help dialog 2014-05-30 06:20:13 -05:00
Dan Kaplun
3bcaf78364 Outputs debugging info for keypresses 2014-05-28 15:23:37 -05:00
Dan Kaplun
964ca1c3b3 Header refactor 2014-05-28 12:19:48 -05:00
Dan Kaplun
5050f188c2 Adds debugging information if syntax doesn't have associated style 2014-05-27 13:23:05 -05:00
Dan Kaplun
c80b93a5c0 Initializes logger in child processes 2014-05-27 13:19:11 -05:00
Dan Kaplun
a8cf47c3e3 Quits when SaveAsForm saves after UnsavedChangesModal 2014-05-18 05:40:08 -05:00
Dan Kaplun
96f55c4fc3 Fixes double clicking on first character of word 2014-05-18 05:17:41 -05:00
Dan Kaplun
593ffa2834 Improves speed significantly 2014-05-18 05:04:48 -05:00
Dan Kaplun
fe2f89074c Improves exception handling and logging output 2014-05-18 04:55:21 -05:00
Dan Kaplun
4316976f4d Doesn't highlight auto on fields or new documents 2014-05-18 01:52:58 -05:00
Dan Kaplun
c90d2f3be4 Installs winston (and longjohn if the log level is set to less than info) 2014-05-18 01:46:57 -05:00
Dan Kaplun
2545450988 Moves all highlight daemon spawning logic out of lib/ui/Editor 2014-05-12 09:19:52 -05:00
Dan Kaplun
e275ba75f9 Implements render throttling to prevent I/O starvation 2014-05-12 08:59:58 -05:00
Dan Kaplun
264f58516b Fixes cursor visibility in dialogs 2014-05-12 05:13:33 -05:00
Dan Kaplun
76b2ee66d0 Updates to newer version of blessed 2014-05-12 04:23:43 -05:00
Dan Kaplun
2d5e4a53d7 Creates only one highlight process that handles all highlighting requests 2014-05-11 09:27:58 -05:00
Dan Kaplun
13d465dab6 Fixes autoindent bug 2014-05-11 08:48:20 -05:00
Dan Kaplun
3e08de1c8a Updates markup with un-marked up change before it is highlighted for faster rendering 2014-05-11 04:14:59 -05:00
Dan Kaplun
939525598b Doesn't highlight matching bracket if there is a selection 2014-05-11 02:58:09 -05:00
Dan Kaplun
8af7479fd1 Makes pasting more resilient 2014-05-10 19:25:35 -05:00
Dan Kaplun
2e524b6ed4 Improves newline handling 2014-05-10 01:33:53 -05:00
Dan Kaplun
d6b09ebf2e Autoindentation 2014-05-10 01:13:14 -05:00
Dan Kaplun
f99260761d Adds selectLine and deleteLine bindings (first commit written entirely in slap!) 2014-05-10 01:01:27 -05:00
Dan Kaplun
9d2a558901 Fix for mismatched brackets 2014-05-08 11:01:00 -05:00
Dan Kaplun
7615701cc8 UI refactor 2014-05-08 06:52:54 -05:00
Dan Kaplun
514254ad52 Optimization 2014-05-05 08:05:44 -05:00
Dan Kaplun
44f7b4dbe9 Renames markup.markupLine to markup, markup.escapeCurlies to markup.escape, markup.markupIndex to markup.index, markup.removeMarkup to markup.strip 2014-05-05 07:07:15 -05:00
Dan Kaplun
881f7fef1c Fixes scrolling bug 2014-05-05 03:40:38 -05:00
Dan Kaplun
48df8c460f Fixes markup bugs 2014-05-05 02:50:46 -05:00
Dan Kaplun
113b710438 Makes highlight process easier to debug 2014-05-05 02:20:43 -05:00
Dan Kaplun
154c7a46f7 Improves whitespace rendering 2014-05-05 00:32:57 -05:00
Dan Kaplun
a3bf3032c1 Change .slaprc JSON to slap.ini 2014-05-04 23:51:10 -05:00
Dan Kaplun
12c4574f06 Fixes insert/overwrite mode 2014-05-04 19:56:13 -05:00
Dan Kaplun
d62e9a98b8 Visible whitespace 2014-05-04 19:16:44 -05:00
Dan Kaplun
89023f05af Highlights selected word elsewhere in document 2014-05-04 08:21:33 -05:00
Dan Kaplun
cc3cda40a3 Fixes scrolling past bottom 2014-05-04 05:35:56 -05:00
Dan Kaplun
4ce14f6ccb Decouples scroll from cursor 2014-05-04 05:05:04 -05:00
Dan Kaplun
2a93c65729 Improved goLeftInfinity behavior 2014-05-04 04:30:27 -05:00
Dan Kaplun
c6c5c9e6b7 More readability improvements 2014-05-04 04:23:22 -05:00
Dan Kaplun
597fc0d6f8 Improves readability 2014-05-04 03:26:45 -05:00
Dan Kaplun
d6f0d13353 Adds cursorPadding option, which improves mouse movement drastically 2014-05-04 03:23:09 -05:00
Dan Kaplun
0c128993c8 Removes unnecessary group in regex 2014-05-04 03:02:25 -05:00
Dan Kaplun
97fe0891e9 More nonprintable character fixes 2014-05-04 02:55:32 -05:00
Dan Kaplun
4545609b6e Fixes scrolling on lines with tabs 2014-05-04 02:32:43 -05:00
Dan Kaplun
571ccb895f Fixes error handling 2014-05-04 02:32:32 -05:00
Dan Kaplun
2186f4d6de Fixes mouse support for lines with tabs 2014-05-04 02:15:56 -05:00
Dan Kaplun
915d80e3dc Fixes non-printable display 2014-05-04 02:12:22 -05:00
Dan Kaplun
bd8cc98d44 Replaces incorrect finally with then 2014-05-04 01:36:42 -05:00
Dan Kaplun
4f306319ab Moves _initBlink to _blink 2014-05-04 00:57:49 -05:00
Dan Kaplun
28716c1b63 normalizePath support for Windows 2014-05-04 00:45:43 -05:00
Dan Kaplun
75eae5c5d7 Ensures base rc file is found 2014-05-04 00:41:40 -05:00
Dan Kaplun
5721781da4 Convert filename to string before opening it 2014-05-04 00:18:02 -05:00
Dan Kaplun
9f5af8cb55 Don't ask to save if a new empty file is open 2014-05-04 00:14:33 -05:00
Dan Kaplun
f63e43379e Doesn't crash if trying to open a nonexistent file 2014-05-04 00:11:43 -05:00
Dan Kaplun
0cdb287765 Removes optimist dependency 2014-05-03 23:59:10 -05:00
Dan Kaplun
84633d1ecc Filename in header is now shown as a relative path 2014-05-03 23:51:59 -05:00
Dan Kaplun
31f3d5d0f1 Improvements to find 2014-05-03 22:34:24 -05:00
Dan Kaplun
f3ea2c2b15 Opens README.md if slap is run for the first time without passing a file 2014-05-03 22:25:11 -05:00
Dan Kaplun
1a7348af3c Adds go to line 2014-05-03 21:38:35 -05:00
Dan Kaplun
4c02cd454a Cleans up prompt 2014-05-03 21:32:48 -05:00
Dan Kaplun
587383f102 Moves blinking logic to _initBlink 2014-05-03 21:09:16 -05:00
Dan Kaplun
1d077680f5 Doesn't attempt to find the empty string 2014-05-03 18:48:08 -05:00
Dan Kaplun
ea810d5e38 Doesn't hide message on mouse move 2014-05-03 18:41:21 -05:00
Dan Kaplun
28fc78b871 Adds Field (based on Editor), uses it instead of Textbox for prompt() 2014-05-03 18:39:08 -05:00
Dan Kaplun
d810e0e7b4 Adds unsaved changes prompt 2014-05-03 07:04:42 -05:00
Dan Kaplun
c8bf01e8e0 Uses promises 2014-05-03 06:57:13 -05:00
Dan Kaplun
ccd06b3f33 Let's give that message some whitespace... messages love whitespace 2014-05-03 06:35:17 -05:00
Dan Kaplun
43a274568a Stops old message timers from wiping out new messages 2014-05-03 06:31:19 -05:00
Dan Kaplun
b477ddc4b8 Implements message blinking 2014-05-03 06:26:56 -05:00
Dan Kaplun
935e7d6aab Adds "search wrapped" message 2014-05-03 06:10:04 -05:00
Dan Kaplun
9bfeb1d861 Adds success style and shows "saved to" message 2014-05-03 06:06:16 -05:00
Dan Kaplun
4d376848e3 Fixes find selection bug 2014-05-03 05:58:56 -05:00
Dan Kaplun
453dc53c82 Highlights current line only if focused 2014-05-03 05:56:34 -05:00
Dan Kaplun
57ab6bf96c Disables highlighting with language=false 2014-05-03 05:18:16 -05:00
Dan Kaplun
4c2ed4e370 Uses _.merge in place of extend 2014-05-03 05:02:47 -05:00
Dan Kaplun
3db662f49c Fixes saving 2014-05-03 03:16:44 -05:00
Dan Kaplun
ac87b1ee06 Doesn't exit when attempting to save to a directory 2014-05-03 03:12:42 -05:00
Dan Kaplun
8a43348295 Normalizes path on save and load 2014-05-03 03:07:32 -05:00
Dan Kaplun
5a7d660fdf Implements saveAs 2014-05-03 02:50:24 -05:00
Dan Kaplun
69f780c334 Don't exit if cannot write to file 2014-05-03 02:47:45 -05:00
Dan Kaplun
0e78ac8069 Fixes save functionality 2014-05-03 02:44:20 -05:00
Dan Kaplun
a5cfa626c4 Implements save (finally) 2014-05-03 02:38:19 -05:00
Dan Kaplun
3d6883618f Adds slap.path and styleName argument to slap.message 2014-05-03 02:26:51 -05:00
Dan Kaplun
a816957c5f Implements readOnly 2014-05-03 02:13:29 -05:00
Dan Kaplun
e401a09a6c Renders on startup 2014-05-03 02:02:49 -05:00
Dan Kaplun
7a4f744d0a Undo fixes 2014-05-03 01:45:25 -05:00
Dan Kaplun
ab33c56805 Renames Program to Slap 2014-05-03 01:37:25 -05:00
Dan Kaplun
fbc27c8062 Program now inherits from blessed.Screen 2014-05-03 01:33:52 -05:00
Dan Kaplun
09d01b8bf6 Unclogs rendering pipeline 2014-05-03 01:27:47 -05:00
Dan Kaplun
7c32d1b73e Increases message duration, adds style to message, and adds "this is the only occurrence" message 2014-05-03 00:52:09 -05:00
Dan Kaplun
a55c7fa373 Removes extraneous showCursor call 2014-05-03 00:41:33 -05:00
Dan Kaplun
a48dfb7dc1 Keypresses disable mouse bugfix 2014-05-03 00:27:10 -05:00
Dan Kaplun
42ce8b4232 Moves ChangeCommand definition closer to _initChangeStack 2014-05-03 00:21:36 -05:00
Dan Kaplun
380d3e4bf4 Factors changeStack creation into _initChangeStack 2014-05-03 00:17:05 -05:00
Dan Kaplun
a17956e503 Uses change, start, end instead of text to store changes 2014-05-03 00:13:56 -05:00
Dan Kaplun
9c8cf6d8dc Organize a bit 2014-05-02 17:44:38 -05:00
Dan Kaplun
7ded6b7ecb Adds _getLineSafe and spliceLines 2014-05-02 17:35:34 -05:00
Dan Kaplun
fb00cf9a2e WIP find fixes 2014-05-02 17:08:01 -05:00
Dan Kaplun
2439215ed8 Moves text-related functions into textUtil 2014-05-02 16:49:07 -05:00
Dan Kaplun
ea7c40bc81 textRange, find, and change now accept lines or string, adds static _getLines and _getString 2014-05-02 16:24:06 -05:00
Dan Kaplun
939175f1be Renames _splitLines to splitLines, makes textRange and find static, and adds static stripLine 2014-05-02 15:49:59 -05:00
Dan Kaplun
9bc5a57806 Fixes delete bindings 2014-05-02 15:20:11 -05:00
Dan Kaplun
b1f9fa776f All change logic goes through .change 2014-05-02 14:34:43 -05:00
Dan Kaplun
307df5736c Fixes filename change notification in header on first change 2014-05-02 13:48:14 -05:00
Dan Kaplun
bd807792fa Adds filename changed, header, and prompt styles 2014-05-02 13:38:59 -05:00
Dan Kaplun
0b41e305f2 Removes console.error 2014-05-02 13:07:21 -05:00
Dan Kaplun
6f97e18a05 Fixes double click 2014-05-02 13:00:59 -05:00
Dan Kaplun
f902113a0a Configurable keybindings 2014-05-02 11:05:04 -05:00
Dan Kaplun
b5cf79e8f1 Ctrl+M goto matching bracket 2014-05-02 07:41:56 -05:00
Dan Kaplun
51bb34ae52 Reset editor.data.markup on every text load 2014-05-02 07:36:34 -05:00
Dan Kaplun
f5b2abdb76 Simplifies highlightProcess and makes it more robust 2014-05-02 07:28:13 -05:00
Dan Kaplun
ea356fe214 Implements autohighlighting 2014-05-02 07:12:12 -05:00
Dan Kaplun
f01a80e412 Pipes highlightProcess stderr to main process stderr 2014-05-02 07:04:28 -05:00
Dan Kaplun
7cdbadbc97 Only matches brackets if there is no selection 2014-05-02 06:44:18 -05:00
Dan Kaplun
5696a7e9d0 Improves default styling 2014-05-02 06:42:26 -05:00
Dan Kaplun
4be057d72e Improves verbiage of find command 2014-05-02 06:39:27 -05:00
Dan Kaplun
2e0c92ae87 Stops prompt() Enter key event from propagating to wrong element 2014-05-02 06:35:04 -05:00
Dan Kaplun
2250451930 Matches brackets 2014-05-02 06:21:05 -05:00
Dan Kaplun
cc7b667628 Renames markupProcess to highlightProcess 2014-05-02 03:42:45 -05:00
Dan Kaplun
9df6156888 Fix for no cursor in editor on focus regain 2014-05-02 03:35:05 -05:00
Dan Kaplun
64ed280da0 Fixes canceling find form 2014-05-02 02:25:19 -05:00
Dan Kaplun
4ac3bd390b Fixes change event name 2014-05-01 18:13:54 -05:00
Dan Kaplun
1531bae602 Fixes prompt rendering 2014-05-01 08:24:30 -05:00
Dan Kaplun
396de023b1 Extends Program from blessed.Box 2014-05-01 08:00:01 -05:00
Dan Kaplun
c406cc0172 Ctrl+F find 2014-05-01 07:48:25 -05:00
Dan Kaplun
211c915d6a Fixes resizing 2014-05-01 04:02:01 -05:00
Dan Kaplun
ab81b84c06 Displays * if file has been modified 2014-05-01 03:56:35 -05:00
Dan Kaplun
6afeb9dc99 Moves configuration into .slaprc 2014-05-01 03:38:55 -05:00
Dan Kaplun
b0ffafff87 Adds header 2014-05-01 03:00:51 -05:00
Dan Kaplun
dd1eafbdff Fixes highlighting for "thin" files 2014-05-01 01:50:33 -05:00
Dan Kaplun
57b1d94a55 Cleans up some lexing logic 2014-05-01 01:47:06 -05:00
Dan Kaplun
e10dc556dc Marks up in a new process 2014-05-01 01:35:22 -05:00
Dan Kaplun
08d65346c4 Fixes word double click 2014-04-30 23:36:54 -05:00
Dan Kaplun
99c7308187 Highlights current line 2014-04-30 22:45:32 -05:00
Dan Kaplun
d13f7c9775 Fixes for double click 2014-04-30 17:01:10 -05:00
Dan Kaplun
5596d52c8a Implements double click 2014-04-30 15:28:23 -05:00
Dan Kaplun
1e3ca2ea90 Changes default style 2014-04-30 07:32:10 -05:00
Dan Kaplun
db3b05e462 Moves markup functions into lib/markup.js 2014-04-30 07:14:54 -05:00
Dan Kaplun
577ad95626 Uses _markupLine for _markup 2014-04-30 06:51:16 -05:00
Dan Kaplun
3a0791d4d4 Adds semicolon 2014-04-30 06:12:08 -05:00
Dan Kaplun
66ac8885f5 Highlighting fixes 2014-04-30 05:50:26 -05:00
Dan Kaplun
12dd49c3db Adds (and fixes) tests 2014-04-30 04:59:32 -05:00
Dan Kaplun
072c30d140 Improves Mac support 2014-04-29 15:36:11 -05:00
Dan Kaplun
e38217a7d8 Explicitly specifies default useSpaces value 2014-04-29 03:13:56 -05:00
Dan Kaplun
9e19c35953 Fixes bug where selection is lost on mousedown if previous mouseup event wasn't triggered 2014-04-29 02:38:42 -05:00
Dan Kaplun
828cae4d20 Simple highlighting implementation 2014-04-29 02:35:49 -05:00
Dan Kaplun
32402aa01c Implements indent/dedent 2014-04-28 21:45:23 -05:00
Dan Kaplun
974076ab86 Moving up 'into' a tab goes to end of tab 2014-04-28 19:13:35 -05:00
Dan Kaplun
8f5554f8c5 visiblePos and realPos return copies rather than modifying 2014-04-28 18:41:00 -05:00
Dan Kaplun
69cb49eba8 Adds useSpaces option for tabs 2014-04-28 18:13:55 -05:00
Dan Kaplun
0e5be04455 Adds undo support 2014-04-28 16:36:40 -05:00
Dan Kaplun
da66af51f2 Renames 'change' event to 'text', adds load param to it, and adds new 'change' event corresponding to actual change 2014-04-28 16:34:07 -05:00
Dan Kaplun
c24ba97c18 Fixes editing selections 2014-04-28 06:21:24 -05:00
Dan Kaplun
529aae544b Fixes EPIPE if xclip not found 2014-04-28 03:43:46 -05:00
Dan Kaplun
101df3243c Adds escape keybinding for quitting 2014-04-28 02:48:48 -05:00
Dan Kaplun
f6e6e1c65d Fixes _markupIndex bug 2014-04-28 02:24:34 -05:00
Dan Kaplun
ccbced64ec Cleans up coordinate handling 2014-04-27 23:08:07 -05:00
Dan Kaplun
b7eaa5ca5c Fixes preferredCursorX bug with Home/End by automatically setting it 2014-04-27 22:26:52 -05:00
Dan Kaplun
4bc8d13b7f Improves left/right keyboard cursor movement 2014-04-27 21:25:44 -05:00
Dan Kaplun
926a4791f4 Adds stripLineEndings param to Editor.line 2014-04-27 21:09:11 -05:00
Dan Kaplun
fb3952958c Tab support 2014-04-27 21:03:28 -05:00
Dan Kaplun
800cdb463a Rename ._realIndex to ._markupIndex 2014-04-27 01:55:03 -05:00
Dan Kaplun
fc9d45afdf Removes console.error 2014-04-27 01:11:03 -05:00
Dan Kaplun
d265e7d31f Uses this.data for preferredCursorX 2014-04-27 00:37:10 -05:00
Dan Kaplun
efffd2272e Implements Ctrl+A for select all 2014-04-26 22:31:14 -05:00
Dan Kaplun
5ef77ab2f1 Fixes support for some characters 2014-04-26 22:29:11 -05:00
Dan Kaplun
f32bdbbafe Implements insertMode 2014-04-26 22:22:14 -05:00
Dan Kaplun
f9edfe3fb1 Fixes 'lines' event to pass lines obj and adds 'change' event with text 2014-04-26 22:06:14 -05:00
Dan Kaplun
f5b9714aca Caches this.data.maxWidth 2014-04-26 22:02:15 -05:00
Dan Kaplun
51d5a88984 Stores all data in this.data 2014-04-26 21:57:30 -05:00
Dan Kaplun
7d4dbd42d5 Blah 2014-04-26 21:05:54 -05:00
Dan Kaplun
b5d96a7672 Fixes bug with selection 2014-04-26 20:57:48 -05:00
Dan Kaplun
8f4d79061a Implements paste 2014-04-26 11:29:19 -05:00