Nathan Sobo
01993f1be2
Editor selects text that was typed at a tab-stop when shift-tabbing back to it
2012-06-26 17:55:40 -06:00
Nathan Sobo
65991c686a
Snippets can contain placeholder text (but can't nest yet)
...
Snippet placeholders are managed by adding an "anchor range" to the edit session. An anchor range basically tracks two anchors for the start and the end of the range.
2012-06-26 17:29:32 -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
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
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
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
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
a8a1a74b11
Refactor Snippets to a class that creates an instance for each Editor
2012-06-20 17:46:22 -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
dd69abbdfe
Add test case for non-matching prefix causing a regular tab to be inserted
2012-06-20 12:20:37 -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
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
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
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
Corey Johnson & Nathan Sobo
9ada2daebd
If command panel selects text within a fold, the fold is destroyed
2012-06-14 14:00:35 -07:00
Corey Johnson & Nathan Sobo
6b5a52ae5c
Add repeat-relative-address-in-reverse event to command panel
2012-06-14 11:01:28 -07:00
Corey Johnson & Nathan Sobo
bc3f9543be
Update search in reverse test on command interpreter spec
2012-06-14 11:00:14 -07:00
Corey Johnson & Nathan Sobo
b6f9801a19
Move repeat-relative-address test from command inter peter spec to command panel spec
2012-06-14 10:35:30 -07:00
Corey Johnson
c98ad2973d
Adding '-' in front of a RegexAddress causes it to search in reverse
2012-06-14 10:35:29 -07:00
Nathan Sobo
47533ad3a0
Add spec coverage for command panel serialization and fix bad method call therein
2012-06-13 21:23:33 -06:00
Corey Johnson
17e20d2fb0
Change .editor to .miniEditor in command panel specs
2012-06-13 17:48:51 -07:00
Corey Johnson
5d552d3df3
Add comand-panel:set-selection-as-regex-address
2012-06-13 16:54:55 -07:00
Nathan Sobo
f000686f07
Method name 💄
2012-06-13 11:49:01 -06:00
Nathan Sobo
700c6d757a
Fix call to renamed method
2012-06-05 12:47:53 -06:00
Corey Johnson & Nathan Sobo
74a873999e
Fix tests that blow up when number of files in fixture directory increased
2012-06-01 15:54:28 -07:00
Nathan Sobo
5b20bfd994
Method name 💄 for Highlighter
2012-06-01 12:15:26 -06:00
Nathan Sobo
118a48bb47
Fix bug where canceling an autocomplete could delete a previously confirmed completion
2012-06-01 12:00:58 -06:00
Nathan Sobo
9aae2bc4e7
Fix breakage caused by method rename
2012-05-16 14:12:05 -06:00
Corey Johnson
2c508f5a31
Fix tests
...
Certain tests resize the editor and expect the number of lines to adjust, this forces the test to meet that expectation.
2012-05-16 11:30:25 -07:00
Corey Johnson
399fc71b3c
Make Atom SpacePen view's default to empty object (where needed)
2012-05-16 10:35:50 -07:00
Corey Johnson & Nathan Sobo
78155de740
Un-F
2012-05-14 16:55:35 -06:00
Corey Johnson & Nathan Sobo
abc230eee3
Fix bug: file finder correctly focuses editor after opening a file.
2012-05-14 16:35:03 -06:00
Corey Johnson & Nathan Sobo
af65bd785c
fix test failures
2012-05-11 16:06:42 -07:00
Corey Johnson & Nathan Sobo
d51b229d56
When the editor buffer changes and the path is not visible in the TreeView, It selects the closes ancestor entry of that file.
2012-05-11 15:44:18 -07:00
Corey Johnson & Nathan Sobo
2f86a3a6e5
TreeView starts with root being selected
2012-05-11 14:31:48 -07:00
Corey Johnson & Nathan Sobo
38582a22d3
These tests shall pass
2012-05-11 11:25:27 -07:00
Corey Johnson & Nathan Sobo
9427c82084
WIP: Getting specs passing with new stand-in vertical scrollbar
2012-05-11 11:52:03 -06:00
Nathan Sobo
dc4529887a
File finder detaches itself when it loses focus
2012-05-08 20:07:49 -06:00
Corey Johnson
d35efb6241
When FileFinder is canceled, it refocuses previously focused element
2012-05-08 15:35:01 -07:00
Corey Johnson
bc3b982514
Rename fileFinder.editor to fileFinder.miniEditor
2012-05-08 15:09:19 -07:00
Nathan Sobo
897f505e4f
Meta-/ (tree-view:toggle) attaches / detaches the TreeView
2012-05-08 15:35:03 -06:00