Commit Graph

136 Commits

Author SHA1 Message Date
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
Corey Johnson
3aaa8ad8f0 TreeView's add and move create intermediate directories as needed 2012-07-03 15:34:34 -07:00
Corey Johnson
e36b5521bd When testing keybindings, use window.requireExtension instead of rootView.activateExtension 2012-07-03 13:44:06 -07:00
Corey Johnson & Nathan Sobo
b96bd29ef5 Move extensions with more than one file into folders 2012-07-03 11:22:08 -07:00
Corey Johnson & Nathan Sobo
ec510c5372 Remove commented out lines 2012-07-03 10:23:24 -07:00
Nathan Sobo
bd5c1f8694 Rename RootView.activeEditor -> getActiveEditor 2012-07-02 19:46:33 -06:00
Nathan Sobo
a38042f89f Rename Editor.removeActiveEditSession -> destroyActiveEditSession 2012-07-02 19:44:24 -06:00
Nathan Sobo
8fbbd77a23 Commands terminating in a substitution restore their initial selection 2012-07-02 19:35:14 -06:00
Corey Johnson
801a91ec9b Specs cleanup buffers 2012-06-29 15:38:12 -07:00
Corey Johnson
c3d7d3566f Buffer listens for changes to file and triggers 'contents-change' event 2012-06-29 15:09:31 -07:00
Nathan Sobo
f9db74a2bd Add spec for clicking paths in file finder 2012-06-29 11:03:08 -06:00
Nathan Sobo
5ea1e6f05c Merge remote-tracking branch 'origin/select-from-file-finder'
Conflicts:
	src/extensions/fuzzy-finder.coffee
	static/fuzzy-finder.css
2012-06-29 10:40:34 -06:00
Nathan Sobo
6c60993f5c Fuzzy buffer finder switches to the editor that has the selected buffer if it isn't open on the current active editor 2012-06-29 09:59:37 -06:00
Nathan Sobo
db212fc077 Spec 💄 preparing for specialized selection logic when fuzzy-finding open buffers 2012-06-28 13:39:04 -06:00
Nathan Sobo
f4832148cd Buffer finder does not open if there are no open buffers with paths 2012-06-28 13:17:49 -06:00
Nathan Sobo
423b312e9c Meta-b opens the fuzzy finder with paths to the current editor's buffers 2012-06-28 12:57:52 -06:00
Nathan Sobo
ed48622a3a Rename FileFinder to FuzzyFinder, which will make more sense when we can also use it to fuzzy-find on open buffers 2012-06-28 11:35:30 -06:00
Nathan Sobo
3cce8f9afd Ensure single-line snippets do not indent the following line 2012-06-27 08:03:54 -06:00
Nathan Sobo
086b33f606 Merge branch 'snippets'
Conflicts:
	src/app/root-view.coffee
2012-06-26 22:58:32 -06:00
Nathan Sobo
6db42114f9 If the user attempts to switch tab stops while the cursor is not *on* a tab stop, the snippet is terminated 2012-06-26 22:43:23 -06:00
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
Corey Johnson
3efcc50a0d Renamed call to ControlPanel.hide to ControlPanel.detach 2012-06-26 16:41:13 -07: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