Commit Graph

1322 Commits

Author SHA1 Message Date
Kevin Sawicki & Nathan Sobo
96aaefdd7d Rename Project events to be past-tense 2013-01-04 13:46:27 -07:00
Kevin Sawicki & Nathan Sobo
725c4cf132 Rethrow exceptions during undo, redo, and pushOperation 2013-01-04 13:20:58 -07:00
Kevin Sawicki & Nathan Sobo
c5e6a7428d 💩 Kill stray print statement 2013-01-04 13:19:56 -07:00
Kevin Sawicki & Nathan Sobo
82d4550ff3 Throw exception when aborting/committing without a transaction 2013-01-04 13:02:56 -07:00
Kevin Sawicki & Nathan Sobo
da095cdfe9 Leave the undo stack intact when aborting empty transactions 2013-01-04 13:02:33 -07:00
Kevin Sawicki & Nathan Sobo
29f371b347 Use Editor.abort to clear autocomplete's buffer changes on cancel
Using this new `abort` mechanism ensures that autocomplete's changes can never be redone, while eliminating the need to track operation counts explicitly.
2013-01-04 12:44:44 -07:00
Kevin Sawicki & Nathan Sobo
ec13c38c7d Add EditSession.transact and friends
`EditSession.transact` adds more semantics on top of `UndoManager`'s
version pertaining to restoring selections on undo/redo of the
transaction.
2013-01-04 12:42:09 -07:00
Kevin Sawicki & Nathan Sobo
e65c2df093 Don't select first item of SelectList twice 2013-01-04 12:39:20 -07:00
Kevin Sawicki & Nathan Sobo
e64047854d Add UndoManager.abort and .commit
When `UndoManager.transact` is called with no function, you later need
to `abort` or `commit` the transaction manually. This allows
transactions to last longer than the dynamic scope of the single
function passed to `transact`.
2013-01-04 11:52:39 -07:00
Kevin Sawicki & Nathan Sobo
428900fdba Rename File 'remove' & 'move' events to passive voice
'remove' -> 'removed'
'move' -> 'moved'
2013-01-04 11:25:46 -07:00
Kevin Sawicki & Nathan Sobo
8098ee69f3 Rename Editor attach and remove events in accordance w/ new scheme
'editor-open' -> 'editor:attached'
'before-remove' -> 'editor:will-be-removed'
2013-01-04 11:25:45 -07:00
Kevin Sawicki & Nathan Sobo
8e835acea4 Rename Buffer 'will-save' event to 'will-be-saved' 2013-01-04 11:25:45 -07:00
Kevin Sawicki & Nathan Sobo
2ffc0cf13d Rename 'active-editor-path-change' to 'root-view:active-path-changed' 2013-01-04 11:25:45 -07:00
Kevin Sawicki & Nathan Sobo
0589012e86 Rename 'editor-path-change' to 'editor:path-changed' 2013-01-04 11:25:45 -07:00
Kevin Sawicki
4078046ac6 Vendor textmate bundles as submodules 2013-01-04 08:18:52 -08:00
Nathan Sobo
73b38b6b59 Passivize names remaining events triggered by EditSession 2013-01-03 18:16:19 -07:00
Nathan Sobo
fb6fe04023 Passivize more event names: 'change(d)' & 'screen-lines-change(d)' 2013-01-03 18:16:19 -07:00
Nathan Sobo
5a409dde3c Rename File and Directory 'contents-change' to 'contents-changed' 2013-01-03 18:16:19 -07:00
Nathan Sobo
a9bb4ea163 When loading a package, honor the 'keymaps' manifest in package.json
Also, add a spec to cover the loading of keymaps in `atom-spec` and
reset the `keymap`'s internal data after each spec gets run to prevent
test pollution with keymaps.
2013-01-03 15:17:09 -07:00
Kevin Sawicki
2971716060 Always use Git instance from project
This removes the need to open a new repository
each time a directory-view or file-view is displayed
and also when a status-bar is displayed for a buffer.
2013-01-02 17:21:42 -08:00
Kevin Sawicki & Nathan Sobo
c765ec80a1 Load stylesheets from package stylesheets directory 2013-01-02 16:40:30 -08:00
Kevin Sawicki & Nathan Sobo
bcde77dd0e Load keymaps from cson
All existing .coffee keymaps are now .cson and package
keymaps are now located in a keymaps folder at the root of
the package.
2013-01-02 16:10:46 -08:00
Nathan Sobo
f4f3002e6d Rename Cursor and CursorView events to passive-voice scheme
Any events emitted from DOM nodes should be prefixed with an identifier
for the node that emits them. This eliminates the possibility of ambiguity
when the events bubble up the DOM away from their emitter.
2013-01-02 13:48:11 -07:00
Nathan Sobo
0f59f5f58a Rename config "update" event to "updated" 2013-01-02 13:48:10 -07:00
Nathan Sobo
6d9402b5c9 Rename Anchor and Buffer events to passive-voice scheme 2013-01-02 13:48:10 -07:00
Nathan Sobo
bce5104d15 Delete dead code 2013-01-02 04:23:48 -07:00
Nathan Sobo
bb710d0ae0 Buffer.save only writes to disk if the buffer is modified
This prevents autosave from writing unmodified buffers to disk, which
was causing the tree view to rebuild directory contents based on the
write event just when switching tabs.
2013-01-02 04:23:03 -07:00
Nathan Sobo
de21db0ea8 Simplify Editor subscriptions
We no longer subscribe to `RootView` so we don't need to unsubscribe.
We can use `@subscribe` to subscribe to window, so we don't need to
genette a unique id for the editor in order to unsubscribe, because the
editor will unsubscribe automatically when removed now.
2013-01-02 03:22:16 -07:00
Nathan Sobo
0851bedbe8 Forgot to delete text-mate-bundle.coffee 2013-01-01 13:28:39 -07:00
Nathan Sobo
08a27cf93d Load grammars from TextMatePackage. Delete TextMateBundle.
TextMatePackage is only designed to load resources out of a TextMate
bundle. It's used only at load time, and from that point out we only
refer to our own global `syntax` data structure to access the data that
it loads.
2012-12-31 18:28:38 -06:00
Nathan Sobo
188d8f8604 Store grammars on the syntax global 2012-12-31 18:26:58 -06:00
Nathan Sobo
4f50133fd8 💩 remove print statements 2012-12-31 17:49:39 -06:00
Nathan Sobo
7af5067152 Move Theme loading to instance methods on TextMate & Atom subclasses 2012-12-31 17:48:46 -06:00
Nathan Sobo
2d73aa292d Make theme loading more similar to package loading
These changes are mostly aesthetic in nature. I just thought it would 
be a good idea to have theme loading be parallel to package loading as
much as possible. So I localized more logic on the `atom` global.
2012-12-31 14:18:45 -06:00
Nathan Sobo
bb913ef9e8 Merge branch 'config' 2012-12-31 12:43:25 -06:00
Nathan Sobo
fa7bcfe51b Bundle a themes directory so we don't depend on ~/.atom/themes
We'll look first in the user themes directory, then in the built-in
themes directory. This allows us to default to 'IR_Black' and not crash
if the user doesn't setup their `~/.atom/themes` directory.
2012-12-31 12:08:36 -06:00
Kevin Sawicki
e1db5432dd Support toggling dev tools from event palette 2012-12-29 10:31:38 -08:00
Jon Rohan
0d76ff2ac9 Adding meta-index key commands to editor to access a buffer directly 2012-12-28 20:30:20 -08:00
Jon Rohan
92a9831201 writing spec for .backspaceToBeginningOfLine() 2012-12-28 17:24:57 -08:00
Jon Rohan
006a6d958d Adding meta-backspace which will backspace from cursor to the beginning of line 2012-12-28 16:58:22 -08:00
Kevin Sawicki
296138b558 Don't show eol invisible in mini editors 2012-12-28 13:56:44 -08:00
Kevin Sawicki
acf5aeb884 Cancel select list when an empty selection is confirmed 2012-12-28 13:49:13 -08:00
Nathan Sobo
736bd1156b 💄 2012-12-28 15:46:23 -06:00
Kevin Sawicki
0ac47f8ec0 Use select list in autocomplete package 2012-12-28 13:24:31 -08:00
Nathan Sobo
bb4f3c4efa Store foldEndPattern in syntax global's scoped properties
There's a slight wrinkle in this commit… TextMate grammars sometimes store
the `foldStopMarker` directly in the grammar, rather than storing it
in a separate scoped preferences file like the other settings. So we
have to scan through grammars looking for those that have the fold end
marker and make a scoped property for that grammar's scope.
2012-12-28 14:46:39 -06:00
Nathan Sobo
5a075d515e Retrieve indent/outdent patterns from scoped properties, not TM bundle 2012-12-28 13:47:50 -06:00
Nathan Sobo
9c7c2ab800 Store TM bundle start/end comment strings in scoped properties
Previously, we had a custom method on the `TextMateBundle` class for
retrieving these variables from the bundle. Now we're using Atom's
`syntax.getProperty` mechanism. The idea is to map TextMate concepts
to their Atom equivalent, rather than building everything directly
around TextMate.
2012-12-28 13:27:54 -06:00
Nathan Sobo
f4d53a017c Merge branch 'master' into config 2012-12-28 11:32:24 -06:00
Kevin Sawicki
575e34d5e4 Forward window focus when active element is body
This problem was when the focus element is detached
when navigating away from the window and when
the window is then given focus again nothing has
focus.

The solution is to use RootView's focus handler
on the window to bring focus to the editor or
other view when the document's active element
is the body meaning nothing inside the RootView
currently has focus.
2012-12-27 21:56:43 -08:00
Nathan Sobo
16c248dbe6 Deal w/ the fact that TextMate settings aren't *always* scoped 2012-12-27 20:13:02 -06:00