Commit Graph

2706 Commits

Author SHA1 Message Date
Nathan Sobo
ab47df1987 Make command-panel sticky like tree view is (fit into the "tool panel" scheme)
Esc on the command panel just moves focus back to the editor. Ctrl-0 will move focus back to the panel if it is open but not focused.
2012-07-23 11:29:52 -06:00
Nathan Sobo
dbfc9d20f7 Fix broken specs due to keybindings change 2012-07-20 19:07:00 -06:00
Nathan Sobo
89e3f729f5 Un-F 💩 2012-07-20 19:06:48 -06:00
Nathan Sobo
830935cdb8 Kill old TreeView bindings. Ctrl-1 is king. 2012-07-20 18:59:44 -06:00
Nathan Sobo
fe9a82b5b8 Merge branch 'master' of github.com:github/atom 2012-07-20 17:56:47 -06:00
Nathan Sobo
e8a892ee3e Start implementing "tool-panel" keymap scheme
Tool panels will be mapped to ctrl-# bindings. If the panel is focused, the # binding closes it. Otherwise the # binding shows it (if needed) and focuses it. The esc key unfocuses the panel, but does not necessarily close it. Meta-w always closes the panel.

This is the scheme. Right now we only have 2 panels:

Command Panel: Ctrl-0, esc still hides it
Tree View: Ctrl-1, esc just unfocuses it
2012-07-20 17:56:36 -06:00
Corey Johnson
5914b6cc2a Add Buffer.reload() 2012-07-16 16:12:09 -07:00
Corey Johnson
611eb93219 Buffer stores a is modified on disk flag 2012-07-16 16:11:52 -07:00
Corey Johnson
5f1e441538 shift-backspace acts as backspace 2012-07-16 14:23:31 -07:00
Corey Johnson
ac04a8ed66 Allow additional indentation after line has been auto-indented 2012-07-16 10:55:44 -07:00
Corey Johnson
95c3ea1b74 Rename insert tab event to indent 2012-07-16 10:34:02 -07:00
Corey Johnson
453af489d9 un-log 💩 2012-07-16 10:28:52 -07:00
Corey Johnson
5184b90365 Hitting tab on a line (containing only whitespace) will auto indent the line and set the cursor to the end 2012-07-16 10:25:28 -07:00
Corey Johnson
e089b74867 Editor.renderedLines' css width is set to 100% when editor.maxScreenLineLength() is less than Editor.scrollView's width 2012-07-16 09:14:33 -07:00
Corey Johnson
23b42faa1d Added EditSession.copy()
Also, EditSession only needs a project to be deserialized
2012-07-13 09:35:19 -07:00
Corey Johnson
9dfa7d9439 When splitting an editor only the active edit session is copied to the new editor. 2012-07-13 09:24:14 -07:00
Corey Johnson & Nathan Sobo
d44c648d4b Editor.renderedLines' width is set to the maximum of either Editor.scrollView's width or the maximum rendered line width 2012-07-13 09:05:38 -07:00
Corey Johnson & Nathan Sobo
c39172d625 Change fold colors for twilight theme 2012-07-13 09:04:22 -07:00
Nathan Sobo
61cfbe530b Fix indentation of selected region with tab 2012-07-06 15:18:32 -06:00
Nathan Sobo
0c2f5b4d7d Merge branch 'master' of github.com:github/atom 2012-07-06 13:43:33 -06:00
Nathan Sobo
60eb4a8a55 Update README 2012-07-06 13:41:34 -06:00
Corey Johnson & Nathan Sobo
fca74ee925 Revert "WIP: making folded lines look better"
This reverts commit 0e4f156cb0.
2012-07-06 12:36:50 -07:00
Corey Johnson
5281a47023 Merge pull request #30 from github/improve-undo-manager
Improve undo manager
2012-07-06 12:23:55 -07:00
Corey Johnson & Nathan Sobo
478a334b73 Redoing a snippet expansion restores tab stops to the *current* edit session 2012-07-06 12:12:14 -07:00
Corey Johnson & Nathan Sobo
d6912c5913 When a snippet expansion is redone, tab stops are restored 2012-07-06 11:50:42 -07:00
Corey Johnson
0e4f156cb0 WIP: making folded lines look better 2012-07-06 11:19:19 -07:00
Corey Johnson & Nathan Sobo
5554d15bdb Add sample .atom directory to project root 2012-07-06 12:14:57 -06:00
Corey Johnson & Nathan Sobo
9f9c636883 When snippet expansion is undone, the snippet is destroyed
This is still in progress. You can't *redo* snippet expansion and restore tab stops. Also, this commit performs all changes associated with snippet expansion in a transaction.
2012-07-06 12:10:14 -06:00
Corey Johnson & Nathan Sobo
6177b46cf9 Restore selection on active edit session when undoing/redoing
The `do`, `undo`, and `redo` methods on operations take an optional editSession argument, which can be used to determine the context in which they are being run. We restore selections on that edit session instead of the session where the operations originally occurred.
2012-07-06 11:42:07 -06:00
Corey Johnson & Nathan Sobo
523f240fe3 Properly dereference smart-pointer in native reload logic 2012-07-06 11:40:36 -06:00
Nathan Sobo
53d6c4960a Fix specs that broke due to no subscription on Buffer from UndoManager 2012-07-05 20:06:09 -06:00
Nathan Sobo
42eefb49a9 Add UndoManager.prototype.transact
The `transact` method takes a function and batches all operations within that function as a single transaction to be undone and redone. The edit session now uses generic operations to restore selection state around transactions. The `undo` and `do` methods on operations are now optional. In addition, the undo manager now supports an optional `redo` method on an operation for code that should *only* be run on redo, and not when the operation is initially pushed. This is used by edit session to restore selection state after redo.
2012-07-05 20:04:16 -06:00
David Graham & Nathan Sobo
c053be3394 Rename UndoManager.perform -> pushOperation
I'm about to expand the types of operations so that some don't always have a `do` method. Therefore `perform` is a misnomer.
2012-07-05 19:46:08 -06:00
David Graham & Nathan Sobo
6fbd019b1d Pull out a BufferChangeOperation, which Buffer.change sends to UndoManager 2012-07-05 19:07:12 -06:00
David Graham & Nathan Sobo
78f88a5c5c Begin extracting BufferChangeOperation from UndoManager 2012-07-05 17:18:55 -06:00
David Graham & Nathan Sobo
822b85a8be Make @probablycorey happier 2012-07-05 17:18:11 -06:00
David Graham & Nathan Sobo
45a45bcbc8 Disable failing snippets spec for now 2012-07-05 17:17:42 -06:00
Nathan Sobo
d53be3b28d Add failing spec demonstrating inability to undo snippet expansion 2012-07-05 16:41:37 -06:00
Nathan Sobo
569359b687 Don't destroy selection/cursor anchors when encompassed by a change
Add the 'strong' option to anchors. If anchors are 'strong' instead of being destroyed by encompassing changes they move to the beginning of the change range.
2012-07-05 15:20:28 -06:00
Nathan Sobo
43edbcbe31 Add ctrl-space binding for autocomplete 2012-07-05 15:01:04 -06:00
Nathan Sobo
60a4f23c50 Anchors are destroyed when encompassed by a buffer change 2012-07-05 14:53:37 -06:00
Nathan Sobo
0043a5045b Refactor snippets extension
Pull out a SnippetExpansion class that is created when a snippet is successfully expanded. This is the only object that gets associated with the edit session.
2012-07-04 21:59:05 -06:00
Nathan Sobo
764265e97f Kill console.log 2012-07-04 21:27:13 -06:00
Nathan Sobo
2ddd5820f7 💄 Rename lastLine -> getLastLine 2012-07-04 12:59:54 -06:00
Nathan Sobo
f253820250 💄 Use more delegated (editor -> buffer) methods 2012-07-04 12:58:00 -06:00
Nathan Sobo
43f51b9689 💄 Replace editor.getBuffer().setText(…) w/ editor.setText(…) 2012-07-04 12:45:06 -06:00
Nathan Sobo
b254fa39d9 💄 Replace editor.getBuffer().getText() w/ editor.getText() 2012-07-04 12:41:51 -06:00
Nathan Sobo
6d7a6f9a92 💄 Replace editor.getBuffer().getPath() w/ editor.getPath() 2012-07-04 12:40:17 -06:00
Nathan Sobo
39ce15c3fa Merge branch 'master' of github.com:github/atom 2012-07-04 12:34:56 -06:00
Nathan Sobo
c90c2e80d6 Replace @buffer reference on Editor with @getBuffer method 2012-07-04 12:34:44 -06:00