Commit Graph

4687 Commits

Author SHA1 Message Date
Nathan Sobo
6c2607a5e0 Sort $0 tab stops last instead of first for TextMate compatibility 2013-01-09 12:32:11 -07:00
Nathan Sobo
e33f93b40c Load snippets from TextMate bundles
There's still a bunch of holes in this. TextMate snippets have features
that we don't support yet. But the basic ones should now work.
2013-01-09 11:43:11 -07:00
Nathan Sobo
cab5b25e76 Fix undo/redo of snippet expansions. Tab stops are restored correctly.
We're giving up on correctly restoring snippet expansions that
occurred in a different EditSession.
2013-01-08 12:54:49 -07:00
Nathan Sobo
a03bb7bf2e Un-f 2013-01-08 12:53:43 -07:00
Nathan Sobo
1b1d8b0390 Merge remote-tracking branch 'origin/master' into cson-snippets 2013-01-07 21:53:36 -07:00
Nathan Sobo
314e3da8bc WIP: Destroy nested tab stops when engulfed by a buffer change
Has 2 failing specs...

There are still some issue with this code's interaction with the undo
system. The tab stops will need to be or destroyed when certain
changes are undone or redone.
2013-01-07 21:53:08 -07:00
Kevin Sawicki
fffba45b50 💄 2013-01-07 19:36:13 -08:00
Kevin Sawicki
adfb6dee12 💄 2013-01-07 18:21:03 -08:00
Kevin Sawicki
438f510f80 Don't check if root is ignored 2013-01-07 18:14:27 -08:00
Kevin Sawicki
f3b84ed33d Only show repo icon at root of tree 2013-01-07 18:13:08 -08:00
Kevin Sawicki
f5344080f1 Only compute Git status flags once
Previously the status was fetched twice, once for
if modified and once for if new.

Now the flags are fetched once and Git now provides
helpers to check the status flags directly for
modified and new status.
2013-01-07 17:35:57 -08:00
Kevin Sawicki
146ae9d776 Refresh the Git index when the window gains focus
Closes #121
2013-01-07 17:29:48 -08:00
Kevin Sawicki
1535930521 Show existing hidden window when re-opening
Previously if Atom was opened to an already opened
path but that window was hidden then a new window
would be opened when instead the existing window
should be unhidden.
2013-01-07 16:58:27 -08:00
Kevin Sawicki
ebe7ff7090 Destroy inactive editor sessions that are dirty
A confirm dialog is now displayed whenever a session
with a dirty buffer is closed so dirty sessions can now
be processed when 'editor:close-other-tabs' is fired.
2013-01-07 16:50:20 -08:00
Kevin Sawicki
0adae3c634 Prompt to save dirty buffers from destroyEditSessionIndex
Previously only the active editor session was prompting to
save dirty buffers before closing.  This caused the confirm
dialog to not display when closing from a tab since the
Editor.destroyEditSessionIndex is used there.
2013-01-07 16:24:51 -08:00
Nathan Sobo
62d7273069 Parse nested snippet placeholders 2013-01-07 16:49:48 -07:00
Kevin Sawicki
5ded74b3e6 Close inactive editor sessions on alt-meta-w 2013-01-07 15:41:26 -08:00
Nathan Sobo
60c89f8b32 Allow snippet tab stop placeholder text to contain newlines 2013-01-07 16:35:11 -07:00
Nathan Sobo
858ad69484 Simplify snippet body parsing
Previously, we parsed snippet bodies line at a time, then determined
tab stops within lines. But this disallows tab stops with placeholder
text that spans multiple lines. Now the parser produces a simpler
structure that breaks the body into an array of strings and tab stops.
Newlines are represented directly as characters within the strings.
2013-01-07 16:09:18 -07:00
Kevin Sawicki
b43c756820 Only deactivate the RootView once during shutdown
Previously window.shutdown() was called multiple times
if window.close() was called since the shutdown handler
was also fired in the native window controller.

This prevented proper serialization of the RootView
from occurring when then window was closed via meta-w or
meta-W since it was called a second time when already
empty of packages and editors.
2013-01-07 14:41:10 -08:00
Kevin Sawicki
1f1e0aac78 Include window events in event-palette
Previously these weren't displayed since event the
documentation loop stopped at the document element and
window events weren't included even though they are
applicable for the currently focused element.
2013-01-07 13:59:33 -08:00
Kevin Sawicki
0e082878f3 Close window on meta-W 2013-01-07 13:41:27 -08:00
Corey Johnson & Nathan Sobo
f008ff52e8 Load snippets from any atom package with a snippets directory 2013-01-07 14:28:47 -07:00
Corey Johnson & Nathan Sobo
6efe533650 Add atom.getPackages so we can access package objects anywhere 2013-01-07 14:28:47 -07:00
Corey Johnson & Nathan Sobo
361bf83345 Load snippets from CSON/JSON. Use syntax properties for scoping.
This commit eliminates the custom `snippets` format and instead just
uses CSON/JSON.
2013-01-07 14:28:47 -07:00
Kevin Sawicki
2d4c4b3930 Support opening a path into a new split editor 2013-01-07 12:52:23 -08:00
Corey Johnson & Nathan Sobo
28c457f564 Add Cursor.getScopes and EditSession.getCursorScopes 2013-01-07 13:32:12 -07:00
Kevin Sawicki
b4654ea435 Use buffer position when end of word isn't found
Previously if null was returned for the end of word position then
it was interpreted as 0,0 which would select the entire contents
before the current word instead of the current word.
2013-01-07 11:30:30 -08:00
Kevin Sawicki
bbdff31faf Lowercase current word/selection with meta-U 2013-01-07 09:37:51 -08:00
Kevin Sawicki
2a0ee62685 Uppercase current word/selection with meta-u 2013-01-07 09:37:51 -08:00
Corey Johnson
60e295e7f3 Merge remote-tracking branch 'origin/hide-apps' 2013-01-07 08:33:21 -08:00
Kevin Sawicki
9013a94465 Count commands instead of command categories 2013-01-06 18:51:22 -08:00
Kevin Sawicki
06a6a7c507 Add octicon when panes are empty 2013-01-06 12:59:10 -08:00
Kevin Sawicki
df309c80dc Use switch statement for line types 2013-01-06 11:04:59 -08:00
Kevin Sawicki
afa08c43b7 Vendor shell script bundle 2013-01-06 10:50:04 -08:00
Kevin Sawicki
64afd51ca4 Use constant for submodule file mode 2013-01-06 09:59:57 -08:00
Kevin Sawicki
a300146f2a Display submodule icon in tree-view 2013-01-06 09:52:53 -08:00
Kevin Sawicki
59d631879d Start substring after trailing slash 2013-01-06 08:45:07 -08:00
Kevin Sawicki
7e95bf96a5 Don't highlight ending line if it ends at column 0 2013-01-05 19:45:45 -08:00
Kevin Sawicki
9a70736242 Remove stray console.log 2013-01-05 19:26:37 -08:00
Kevin Sawicki
3ce559637d 💄 2013-01-05 19:25:56 -08:00
Kevin Sawicki
f11f85e87b Show octicon for project's that are repos 2013-01-05 19:24:53 -08:00
Kevin Sawicki
0217bb9ce0 Remove unused variable 2013-01-05 19:11:43 -08:00
Nathan Sobo
af3d3bf4cc 💩 Reset fs.write mock before test. 2013-01-04 18:08:52 -07:00
Kevin Sawicki
f78adfa060 Add command and invocation counts to header 2013-01-04 16:39:13 -08:00
Nathan Sobo
65d13b5383 Expand explanation of config.setDefaults in docs 2013-01-04 17:35:12 -07:00
Nathan Sobo
0624ebaf5d Set config defaults for a package from its module's configDefaults 2013-01-04 17:23:24 -07:00
Nathan Sobo
d509093076 Don't write config defaults out to config.json 2013-01-04 17:08:25 -07:00
Kevin Sawicki
dec3ab7873 Only get path if not returning 2013-01-04 15:49:57 -08:00
Kevin Sawicki
5ce606953b Guard against null repo 2013-01-04 15:47:34 -08:00