Commit Graph

21924 Commits

Author SHA1 Message Date
Nathan Sobo
b8ed28ba6a Add test of flexbox cross-axis size forcing overflow that breaks in Canary 22.0.1187.0 2012-06-26 15:23:06 -06:00
Nathan Sobo
c354f016b9 Ensure tab-stops are correctly placed on indented snippet lines 2012-06-22 23:03:29 -06:00
Nathan Sobo
3483317549 Subsequent lines of a snippet are indented based on the first line 2012-06-22 22:57:49 -06:00
Nathan Sobo
de9486320d Shift-tab moves through snippet tab stops backwards 2012-06-22 22:10:14 -06:00
Nathan Sobo
6389b19b7c Merge branch 'master' into snippets 2012-06-22 16:25:33 -06:00
Nathan Sobo
e2efa95d13 Ensure that 'change-screen-range' events are triggered on selections by backspace 2012-06-22 16:20:50 -06:00
Nathan Sobo
c4046bbdc5 Place snippet tab relative to snippet start position. Terminate when pressing 'tab' at last tab-stop. 2012-06-22 12:52:40 -06:00
Nathan Sobo
5c6e94ec74 Tab stops are associated with anchors so we can jump to them event when the buffer changes 2012-06-22 12:07:20 -06:00
Nathan Sobo
ae2b686802 Parse tab-stop positions correctly when there are multiple on a line 2012-06-22 11:44:58 -06:00
Nathan Sobo
1710ecc8a9 Merge branch 'master' into snippets 2012-06-21 17:57:40 -06:00
Nathan Sobo
8fa5723be9 When buffer or display-buffer change, update the position of all anchors on EditSession.
Cursors and selections no longer need to handle buffer/display-buffer changes directly. They register anchors with the EditSession, and subscribe to changes in their position instead. This opens up the anchor facility for use by extensions that want to track the screen position of a point in the buffer as the buffer and display buffer change.
2012-06-21 17:57:23 -06:00
Nathan Sobo
7f1b094ed2 Make Cursor and Selection create anchors via EditSession.prototype.addAnchor 2012-06-21 17:29:21 -06:00
Nathan Sobo
a936b6b716 Tab advances between snippet tab stops. Still need to account for tab stops moving due to buffer changes. 2012-06-21 16:53:13 -06:00
Nathan Sobo
f9ec6214e6 Snippets parser can parse tab stops in the form of $1, $2, etc.
It associates each tab stop with its position relative to the beginning of the snippet body, and strips the '$number' marker from the inserted snippet body.
2012-06-21 16:33:21 -06:00
Nathan Sobo
2e0943f41a Upgrade PEG.js to 0.7.0 for line and column tracking (needed for snippet tab-stops) 2012-06-21 16:29:12 -06:00
Nathan Sobo
f1678fdafe Use an overloaded 'tab' keybinding and the new abortKeyBinding method to implement conditional snippet expansion
If the current word prefix doesn't correspond to a valid snippet, we abort the key binding and try the next one, which ends up being the standard tab binding so a typical tab gets inserted. This is a mechanism that could support overloading of arbitrary keys.
2012-06-20 22:47:05 -06:00
Nathan Sobo
68cb9992fc Sort candidate binding sets in a stable way in Keymap to preserve load order for a valid cascade 2012-06-20 22:45:14 -06:00
Nathan Sobo
e1309f7c66 Key binding event handlers can call abortKeyBinding on the event object to abort and try the next binding 2012-06-20 22:08:16 -06:00
Nathan Sobo
c276a4029e Allow whitespace after last snippet declaration 2012-06-20 21:53:06 -06:00
Nathan Sobo
4590321f0a Apply a hybrid approach to handling events in snippets extension 2012-06-20 21:52:53 -06:00
Nathan Sobo
1bec4c8404 Snippets now advise the insertTab method on EditSessions instead of intercepting events on Editor 2012-06-20 17:56:02 -06:00
Nathan Sobo
9c02e05051 Preserve the value of this when applying before advice 2012-06-20 17:55:29 -06:00
Nathan Sobo
a8a1a74b11 Refactor Snippets to a class that creates an instance for each Editor 2012-06-20 17:46:22 -06:00
Nathan Sobo
d50b7f7a37 Trigger a 'new-edit-session' event when Project.prototype.open creates an EditSession 2012-06-20 17:40:45 -06:00
Nathan Sobo
583af86f68 Add _.adviseBefore for adding before advice to methods 2012-06-20 17:34:21 -06:00
Nathan Sobo
4c8aeb16bb Merge branch 'master' into snippets
Conflicts:
	src/app/window.coffee
2012-06-20 17:11:25 -06:00
Nathan Sobo
396857660b Merge remote-tracking branch 'origin/project-refactor' 2012-06-20 16:51:40 -06:00
Nathan Sobo
e3d7ab31b5 Merge branch 'project-refactor' 2012-06-20 16:41:54 -06:00
Nathan Sobo
2fe8ba41d0 Fix benchmarks by castrating loadUserConfiguration method correctly now that it's moved 2012-06-20 16:18:21 -06:00
Nathan Sobo
b4d77fd107 Load user configuration as part of RootView initialization, before any editors are created 2012-06-20 16:06:45 -06:00
Corey Johnson
c9b2535fac Fix setBuffer calls in benchmark-suite 2012-06-20 13:07:50 -07:00
Nathan Sobo
dd69abbdfe Add test case for non-matching prefix causing a regular tab to be inserted 2012-06-20 12:20:37 -06:00
Nathan Sobo
8a5af9cd17 Remove stray console.logs 2012-06-20 12:06:48 -06:00
David Graham & Nathan Sobo
d992458c8c Load snippets from .atom/snippets when snippets extension is activated 2012-06-20 11:49:29 -06:00
David Graham & Nathan Sobo
dc6c0a3e35 Rename userConfigurationPath to configFilePath so I can add configDirPath as well 2012-06-20 11:19:40 -06:00
David Graham & Nathan Sobo
498adc00bf 💄 newline at eof 2012-06-20 11:18:51 -06:00
Corey Johnson & Nathan Sobo
af9aec7cbc SoftWrap state is stored in EditSessions, but it is set and toggled via Editor. 2012-06-20 09:28:23 -07:00
Corey Johnson & Nathan Sobo
d1c1f3cfce Move autoIndent, tabText, softTabs and softWrap to project 2012-06-20 09:28:23 -07:00
Corey Johnson & Nathan Sobo
4e78b29e81 Replace Editor.setBuffer with Editor.edit 2012-06-20 09:28:23 -07:00
Corey Johnson & Nathan Sobo
1280370fd1 Editor constructor requires an editSession (unless it is a mini buffer) 2012-06-20 09:28:23 -07:00
Corey Johnson & Nathan Sobo
5efc853c36 Replace Editor.activeEditSessionIndex with activeEditSessionIndex method 2012-06-20 09:28:22 -07:00
Corey Johnson & Nathan Sobo
aa10ae383b Remove suppressBufferCreation from Editor initialize 2012-06-20 09:28:22 -07:00
Corey Johnson & Nathan Sobo
4659fd7dc3 Project.open returns an editSession instead of a buffer.
First step in removing the coupling of Editor and Buffer. Editor should get all information about the active buffer from the activeEditSession.
2012-06-20 09:28:22 -07:00
Corey Johnson & Nathan Sobo
4bd5a017cf Add inspect view of edit-session 2012-06-20 09:28:22 -07:00
David Graham & Nathan Sobo
e4409be95a Parse multiple snippets and allow any characters in snippet body 2012-06-19 17:56:03 -06:00
David Graham & Nathan Sobo
5b8cc8a6b6 Snippets matching the cursor's word prefix are inserted on 'tab' events 2012-06-19 17:47:09 -06:00
David Graham & Nathan Sobo
4204b27751 Start on Snippets extension
Can parse a basic snippets file
2012-06-19 17:19:47 -06:00
David Graham & Nathan Sobo
c97d78a31d Add David Graham to pairs file 2012-06-19 17:17:35 -06:00
Nathan Sobo
b4e39785e5 "ctrl-w w" focuses the next pane. Move select-word binding to ctrl-W to avoid collision 2012-06-18 20:33:25 -06:00
Nathan Sobo
c21766c328 Add RootView.proto.focusNextPane 2012-06-18 20:27:39 -06:00