Nathan Sobo
db3d788664
Toggle line comments ignores last row of selection if it ends at col 0
...
Now that the cursor is hidden at the end of a selection, it's counter-intuitive for the commenting to extend to the next line since there's no visual indicator that the cursor extends to that location.
2012-10-29 16:04:09 -06:00
Nathan Sobo
88e246b622
Hide the cursor when the selection is not empty
2012-10-29 15:51:32 -06:00
Corey Johnson
47c6a3a790
Ensure spans are ended in buildLineHtml
2012-10-29 13:47:44 -07:00
Corey Johnson
40673549cb
Quotes only automatically close if they are opened after a non-word character.
2012-10-29 13:12:28 -07:00
Corey Johnson
82e0a458fa
Do not automatically close quotes when inserted inside a string.
2012-10-29 11:54:13 -07:00
Kevin Sawicki
2531665570
Add Buffer.isEmpty()
...
To be used by Buffer.isModified() for when the
buffer has no backing file
2012-10-27 08:57:55 -07:00
Kevin Sawicki
acb5207d28
Treat file-less buffers as unmodified when empty
2012-10-26 13:56:21 -07:00
Corey Johnson & Nathan Sobo
d6bbe845d6
Merge branch 'master' of https://github.com/github/atom
2012-10-26 12:27:28 -06:00
Corey Johnson & Nathan Sobo
cee3372a87
Look for extension specs in src/extension (more specific) and run the second
2012-10-26 12:25:20 -06:00
Corey Johnson & Nathan Sobo
ed4c543a8d
Fix spec relying on wrong version of tab text
2012-10-26 12:21:20 -06:00
Corey Johnson & Nathan Sobo
adf00b60f3
Detect softTabs/hardTabs when an EditSession
is created
2012-10-26 12:20:14 -06:00
Kevin Sawicki
b1697d4f31
Migrate outline-view to new extension folder layout
2012-10-26 10:33:21 -07:00
Corey Johnson & Nathan Sobo
4c24f4ea65
indentSelectedRows works with hard tabs
2012-10-26 11:15:55 -06:00
Corey Johnson & Nathan Sobo
0aa9f8de57
Indent works with hard tabs
2012-10-26 11:15:55 -06:00
Corey Johnson & Nathan Sobo
29351ee5fc
Move setIndentationForBufferRow and indentationForBufferRow to EditSession
2012-10-26 11:15:55 -06:00
Nathan Sobo
d89979fc61
Merge pull request #86 from github/outline-view
...
Jump to method declaration
2012-10-25 17:54:27 -07:00
Corey Johnson & Nathan Sobo
ef6c51dd32
💄
2012-10-25 15:56:18 -07:00
Corey Johnson & Nathan Sobo
1bb2531f31
Tab can auto-indent at the beginning of a line
2012-10-25 16:27:28 -06:00
Nathan Sobo
d310297fe7
Radically simplify the definition of "modified" for buffers
...
Now, we maintain md5 signatures for the on-disk and in-memory contents of the buffer. Whenever either contents change, we recompute the signature and store it on the buffer. We can tell if the buffer is modified by comparing these signatures. When the disk contents change, we compare the memory and disk signatures *before* recomputing the disk signature to determine whether to update the buffer or mark it as a conflict.
2012-10-25 13:08:38 -06:00
Corey Johnson
2af29c9934
Extensions have a src and specs directory now. Move existing extension specs.
...
Move the extensions spec code inside of the extension's spec directory. Move source code to the extension's src directory
2012-10-25 11:48:13 -07:00
Nathan Sobo
031da13316
Remove unused methods from native OnigRegExp
...
`OnigScanner` takes over these duties
2012-10-25 12:23:37 -06:00
Kevin Sawicki
23573f611f
Add specs of outline view UI
2012-10-25 10:38:06 -07:00
Nathan Sobo
b1e8e2391f
Merge branch 'paste-indentation'
2012-10-25 10:50:05 -06:00
Nathan Sobo
e53410b5fd
Add indentBasis metadata to pasteboard when copying text
...
This allows indent to be normalized properly even if the leading whitespace isn't copied from the first line.
2012-10-25 10:44:54 -06:00
Corey Johnson & Nathan Sobo
6f353fda62
Add indentBasis
option to insertText
...
We will use this to normalize indentation on paste even when we didn't copy all the leading whitespace on the first line.
2012-10-24 18:29:09 -06:00
Nathan Sobo
fd4b6c85ce
Add a global pasteboard
object which supports metadata
...
This metadata will be used to record the indentation level of the first line when copying multiple lines of text to the pasteboard. The pasteboard takes the md5 of the pasted content when writing, then when reading it associates the last written metadata only when the signature matches the previously written value.
2012-10-24 17:42:58 -06:00
Corey Johnson
e02b8f8eec
Add support for brackets with the same begin/end character
2012-10-24 14:24:19 -07:00
Corey Johnson
ebbb39f50e
Improve brackets auto closing.
...
When an open bracket is inserted, an anchorRange is created. When a closing bracket is inserted, and its position matches the end of one of the anchorRanges, the closing bracket is not inserted and the cursor moves right.
2012-10-24 14:24:19 -07:00
Nathan Sobo
ee09c20214
Merge branch 'master' into paste-indentation
2012-10-24 12:37:50 -06:00
Nathan Sobo
ca2527f4b8
Meta-w closes spec windows again.
...
This adds a 'core:close' event to meta-w in the default bindings, and modifies window to listen for it.
2012-10-24 12:35:31 -06:00
Nathan Sobo
b71fa308a3
Always run window.startup
when window.coffee is required
...
When we actually want to attach the root view in window-bootstrap.coffee, we call `window.attachRootView(path)` instead of calling `window.startup(path)`. Having `startup` called automatically means we can be sure any code we add there runs in every environment (including benchmark and specs). This is where we do things like setup the global keymap, parse text mate bundles and themes, and establish the window close handler. Any globals other than the root view that we want to be available in all environments should be established here. Right now that's just the keymap, but soon I want to add a global pasteboard.
2012-10-24 12:34:45 -06:00
Kevin Sawicki
f1a8a5d684
Store tag location in a Point
2012-10-24 08:24:16 -07:00
Kevin Sawicki
7d670b8597
Add initial specs of TagGenerator class
2012-10-24 08:21:16 -07:00
Kevin Sawicki
f720b14f22
Don't show when empty
2012-10-23 21:29:11 -07:00
Kevin Sawicki
8acb37338d
Add initial outline view specs
2012-10-23 21:29:11 -07:00
Kevin Sawicki
48bdc75359
Send remaining stdout/stderr output to callbacks
...
Previously this data was only sent to the done
handlers and so commands such as SelectAllMatchesInProject
were not displaying all the results when the result size
was large.
2012-10-23 21:27:17 -07:00
Nathan Sobo
937caf8400
Un-F
2012-10-23 17:17:28 -06:00
Nathan Sobo
4d9b777350
Fix LanguageMode.proto.suggestedIndentationForBufferRow
exception for row 0
2012-10-23 16:50:00 -06:00
Nathan Sobo
d1999b91ff
Base first line delta on the cursor column, not the existing line's indent
2012-10-23 16:30:38 -06:00
Nathan Sobo
839d57d819
Use existing line's indentation level if inserting normalized lines within it
...
If we're pasting multiple lines starting inside an already existing line, we never want to auto indent. We should just take its existing indentation level. Also, we strip the leading whitespace off the first line we're inserting, assuming it's already being represented by the indentation of the line we're onto which we're appending it.
2012-10-23 16:17:26 -06:00
Nathan Sobo
3b18c6a42d
With autoIndent disabled, don't use suggested first line indent when normalizing
...
Also, when some lines are *less* indented than the first line, it might not be possible to outdent them as far as they originally were relative to the first line, so we do as much as possible.
2012-10-23 14:27:26 -06:00
Corey Johnson
8f4ec3c45e
Fix command panel specs
2012-10-23 13:21:35 -07:00
Corey Johnson
ae7264ad12
Fix autocomplete specs
2012-10-23 13:21:35 -07:00
Corey Johnson
e20832aa50
Tree View uses core:close core:confirm core:cancel and adds tool-pane:unfocus
2012-10-23 13:21:34 -07:00
Corey Johnson
8e417631e3
Markdown Preview uses core:cancel and markdown-preview:toggle
2012-10-23 13:21:34 -07:00
Corey Johnson
421731c6a0
Command Panel uses core:close, core:cancel and core:confirm
2012-10-23 13:21:34 -07:00
Corey Johnson
d0e1ee255c
Autocomplete extension uses core:confirm and core:cancel
2012-10-23 13:21:33 -07:00
Nathan Sobo
7bd4e8801f
If inserting on a line that is longer than the suggested indent, preserve indent
2012-10-23 14:13:51 -06:00
Nathan Sobo
0e5c76b474
Start adding the normalizeIndent
option to EditSession.proto.insertText
...
This will be used by the paste command to ensure that indentation is normalized.
2012-10-23 14:07:00 -06:00
Nathan Sobo
7be3c55765
Only auto-indent when typing, not when pasting or programmatically inserting
...
This paves the way for using a different strategy to normalize indentation when pasting, without it getting tangled in auto-indent.
2012-10-23 11:59:54 -06:00
Kevin Sawicki
ab8c22825c
Support outdenting when indent is < 1 tab length
2012-10-23 09:57:39 -07:00
Nathan Sobo
518d88a4ab
Fix spec breakage caused by a styling change
2012-10-23 10:46:38 -06:00
Corey Johnson & Nathan Sobo
fcbbe0a29b
Do not use cached results for regexes that contain \G.
2012-10-22 11:04:20 -07:00
Corey Johnson & Nathan Sobo
9bf16063fc
Un-F
2012-10-19 12:58:42 -06:00
Corey Johnson & Nathan Sobo
9303aaa8fd
Rename root-view:
event prefix to window:
2012-10-19 12:51:36 -06:00
Corey Johnson & Nathan Sobo
84b2cabeb3
Calling .abortKeyBinding
on an event that wasn't triggered by the keymap is ok
...
Certain events call `abortKeyBinding` to opt out of handling certain keybindings. Snippets does this with tab for example. If it's not a situation where it's appropriate to go to the next tab stop, we let the next binding be triggered, which could insert a tab, for example. But when we trigger events from the event palette, there *is* no next binding. Having a no-op function helps in this situation.
2012-10-19 12:42:27 -06:00
Corey Johnson & Nathan Sobo
d420585b11
Display keybindings in EventPalette. Style a bit.
2012-10-19 12:02:00 -06:00
Corey Johnson & Nathan Sobo
de3bbce29f
Only show events w/ descriptions in EventPalette
...
Also, auto-generate human readable event name in editor. This is a good example of how we could do this automatically for some kind of `onCommand`, `command`, `onInteractiveEvent` method that combines the event name, documentation string, and handler in one shot.
2012-10-19 11:24:40 -06:00
Nathan Sobo
2b8c946a65
Merge branch 'master' into event-palette
...
Conflicts:
spec/extensions/fuzzy-finder-spec.coffee
src/extensions/fuzzy-finder/fuzzy-finder.coffee
2012-10-18 16:33:44 -06:00
Corey Johnson & Nathan Sobo
93cbe2bb22
Create root-view:toggle-invisibles event
2012-10-18 14:44:21 -07:00
Corey Johnson & Nathan Sobo
a72d0399f7
Add Editor.setShowInvisibles and remove showInvisibles from EditSession
2012-10-18 14:10:36 -07:00
Corey Johnson & Nathan Sobo
b33bbbfc0d
Handle invisible character rendering when building HTML for lines.
...
Not during creation of tokens.
2012-10-18 11:43:17 -07:00
Corey Johnson
53534e61cf
Remove double comment
2012-10-18 11:33:19 -07:00
Corey Johnson
c9db576a1c
Fix specs
2012-10-18 11:33:19 -07:00
Corey Johnson
22e009a999
Set invisible values for spaces and tabs when initial tokenization occurs.
...
Also break whitespace into its own token just like tabs.
2012-10-18 11:33:19 -07:00
Corey Johnson
4478bbca9a
When project.showInvisibles is true; spaces, tabs and newlines are visible
2012-10-18 11:31:39 -07:00
Corey Johnson
e2a917fcf3
Change tabText to tabLength
2012-10-18 11:31:39 -07:00
Corey Johnson & Nathan Sobo
4987ea3e49
If a TextMate syntax/preference fails to parse, catch error and log warning
2012-10-17 13:53:55 -07:00
Corey Johnson
6171ea33e1
Add support for TextMate grammars with newlines in their regexes
2012-10-16 15:58:11 -07:00
Corey Johnson
de03cc82ed
fs.traversePath(path) works if path is a symlink
2012-10-12 15:44:01 -07:00
Corey Johnson
5b92de76fc
💄
2012-10-12 15:44:00 -07:00
Kevin Sawicki
6551be0c85
Update the buffer being used when the editor path changes
...
Previously the status indicator would only work for the first
buffer open since only the buffer used when the extension was
initialized was subscribed to for change events.
2012-10-12 15:39:52 -07:00
Kevin Sawicki
0da869589e
Use change event instead of buffer-change event
...
This will update the modified indicator after operations
are undone
2012-10-12 15:08:01 -07:00
Kevin Sawicki
19aa192c47
Return paths instead of deferred from project.getFilePaths
...
It was already being performed synchronously
2012-10-12 14:45:18 -07:00
Kevin Sawicki
38802ba287
Use javscript.tmbundle commit 2f95d9ae92
...
The commit after this one breaks syntax highlighting
for the lines after a single line comment
2012-10-12 11:34:44 -07:00
Corey Johnson
75d7950ef5
Fix linemap translation when an atomic token is at the end of a line.
...
Previously, if you entered an atomic token (like a tab) on an empty line it would not position the cursor after the token. This commit fixes that.
If the last screen line token is atomic, and screenLine.translateColumn's sourceColumn parameter is greater than the start position of the atomic token, then the translated column should be the end position of the atomic token.
2012-10-10 14:45:47 -07:00
Corey Johnson
8eb9d6629c
Remove unused methods from token.
...
The refactoring of Editor.buildLineHtml removed the need for these methods
2012-10-10 14:45:46 -07:00
Kevin Sawicki
f694d1d2c8
Update ruby bundle to commit 77dc5d13cc
2012-10-10 13:48:46 -07:00
Kevin Sawicki
6dc5a05f35
Expect var to have modifier class instead of type
...
This changed in the underlying JavaScript bundle
2012-10-09 17:55:21 -07:00
Kevin Sawicki
2aa3667586
Update expected var selector to storage.modifier.js
...
This changed in the underlying JavaScript bundle
2012-10-09 17:49:53 -07:00
Kevin Sawicki
1694f74bcb
Expect var to be a storage.modifier.js type in spec
2012-10-09 17:46:26 -07:00
Kevin Sawicki
1be1d03eac
Update fs spec for new traverseTree callbacks
2012-10-09 17:41:32 -07:00
Kevin Sawicki
8b61e6a9df
Split out file and directory callbacks
2012-10-09 17:41:32 -07:00
Kevin Sawicki
6dcbdfbf55
Update fs spec for new traverseTree callback format
2012-10-09 17:41:32 -07:00
Corey Johnson
701631e7cb
Update spec to use new ruby scopes
2012-10-09 17:23:01 -07:00
Corey Johnson
6b5c3dc1cf
Remove unused variable that causes specs to fail
2012-10-09 17:23:00 -07:00
Corey Johnson
7afbac5a4e
Merge branch 'transpose'
2012-10-09 11:03:26 -07:00
Corey Johnson
a2f2e388d5
Test 💄
...
Instead of inserting text into an existing buffer, I replaced all text in the buffer to make the test easier to understand.
2012-10-09 11:02:39 -07:00
Will Farrington
4b3505d9b5
Disable buffer modified indicator if buffer content matches content on disk
2012-10-08 17:55:35 -10:00
Chris Wanstrath
f5f18abbf0
ctrl-t: transpose
2012-10-08 20:08:07 -07:00
Will Farrington
214735f1d7
add some specs for buffer modified indicator
2012-10-07 09:48:46 -10:00
Kevin Sawicki
f6c29a1d51
Add core:page-up and core:page-down support to tree view
2012-10-05 15:50:32 -07:00
Kevin Sawicki
4b20a26974
Add core:move-to-top and core:move-to-bottom support to tree view
2012-10-05 15:30:54 -07:00
Nathan Sobo
e38367df8c
Merge branch 'master' into event-palette
...
Conflicts:
src/app/editor.coffee
2012-10-05 11:09:17 -10:00
Nathan Sobo
c09f7ebc60
Fix the command panel's handling of move-up/move-down
...
Forgot to add the core: prefix to this area
2012-10-05 10:55:55 -10:00
Nathan Sobo
d4b6ba4c11
Make SelectList handle prefixed move-up and move-down events
2012-10-05 10:43:24 -10:00
Nathan Sobo
a180e6d703
Merge branch 'master' into event-palette
...
Conflicts:
spec/extensions/fuzzy-finder-spec.coffee
src/app/editor.coffee
src/extensions/fuzzy-finder/fuzzy-finder.coffee
2012-10-05 10:29:10 -10:00
Nathan Sobo
eae7fcdd97
Fix breaking due to "root-view:" prefixed events
2012-10-05 10:07:37 -10:00
Nathan Sobo
082a666a92
TreeView's move-up/down responds to core:move-up/down
2012-10-05 10:07:37 -10:00
Nathan Sobo
9906dd41b4
Give editor-specific events the "editor:" prefix
2012-10-05 10:07:37 -10:00
Nathan Sobo
16bf8d3c3f
Fix fuzzy-finder spec
2012-10-05 10:07:37 -10:00
Nathan Sobo
67c6ed8de7
Prefix "move-*" events with "core:"
...
I want to prefix all custom events for better categorization and to
distinguish them from built-in webkit events
2012-10-05 10:07:36 -10:00
Kevin Sawicki
c30220ae80
Uncomment lines that match non-whitespace prefix of comment regex
2012-10-04 15:37:28 -07:00
Nathan Sobo
6bfffcac55
Clear the miniEditor when showing the event palette
2012-10-04 10:26:07 -10:00
Nathan Sobo
c57e448ddd
Un-F
2012-10-04 10:26:07 -10:00
Nathan Sobo
a895aa0826
Ctrl-enter toggles event palette (hides when showing)
...
I changed the event name to event-palette:toggle because ctrl-enter
should hide the event palette when it is showing. Previously that
broke, because we would try to re-show the event palette.
2012-10-04 10:26:07 -10:00
Nathan Sobo
66c997f75d
Make EventPalette a SelectList subclass
2012-10-04 10:26:07 -10:00
Nathan Sobo
4f43169586
Un-F
2012-10-04 10:26:07 -10:00
Nathan Sobo
1e9b40a6ea
Select the first list item after changing the list filter
2012-10-04 10:26:07 -10:00
Nathan Sobo
ebad961b20
More conversion of FuzzyFinder to a SelectList subclass
2012-10-04 10:26:06 -10:00
Nathan Sobo
2991048c1e
SelectList allows list items to be clicked
2012-10-04 10:26:06 -10:00
Nathan Sobo
74c5be4632
Convert more fuzzy finder behavior to inherit from SelectList
2012-10-04 10:26:06 -10:00
Nathan Sobo
7f3165fa7b
When the select list is cancelled or its editor loses focus, it detaches itself
2012-10-04 10:26:06 -10:00
Nathan Sobo
6450b6c96f
Select list wraps around when handling move-up / move-down events
2012-10-04 10:26:06 -10:00
Nathan Sobo
149889abfc
Start converting fuzzy finder to a subclass of SelectList
2012-10-04 10:26:06 -10:00
Nathan Sobo
9e6fc44d39
SelectList handles 'core:confirm' and 'core:cancel' events
2012-10-04 10:26:06 -10:00
Jerry Cheung & Nathan Sobo
b5cb125b7f
Select list scrolls to selected item on move-up/move-down
2012-10-04 10:26:06 -10:00
Jerry Cheung & Nathan Sobo
a3f25fbc9b
Start on SelectList, a common base class for filterable lists
...
Like autocompleter, fuzzy-finder, and event palette
2012-10-04 10:26:06 -10:00
Nathan Sobo
389552c057
Can trigger an event by clicking it in the list
2012-10-04 10:26:06 -10:00
Nathan Sobo
0ecdabb023
Pressing enter emits an event on the previously focused element
2012-10-04 10:26:06 -10:00
Nathan Sobo
1b013cc029
Add ability to move through select list and 'event-palette:cancel' event
2012-10-04 10:26:06 -10:00
Nathan Sobo
3d79100877
Make the event palette an overlay.
2012-10-04 10:26:06 -10:00
Nathan Sobo
fff0e623d3
Focus the mini-editor on attach
2012-10-04 10:26:06 -10:00
Nathan Sobo
eaaf6fc9f0
Add event-palette. Ctrl-enter brings up a list of all events for focused element
...
No fuzzy finding just yet. This theme of a fuzzy-filterable list is common enough now that I think I want to extract it. We do it in the fuzzy-finder for buffers and files, as well as the autocomplete menu.
2012-10-04 10:26:05 -10:00
Nathan Sobo
7b1fe94e47
Add $.fn.document
, which associates event-listeners with descriptions
...
`$.fn.events` now returns an array of event-name/description pairs.
2012-10-04 10:26:05 -10:00
Nathan Sobo
96c9f0bc36
Add $.fn.events
, which returns a list of all handled events
2012-10-04 10:26:05 -10:00
Kevin Sawicki
23e7139ed1
Auto confirm when only one match exists
2012-10-03 13:55:38 -07:00
Kevin Sawicki
5d86b1e818
💄
2012-10-03 10:03:19 -07:00
Kevin Sawicki
09bf000d8f
Select created folder in tree view
2012-10-03 09:49:53 -07:00
Kevin Sawicki
58515b2097
Focus tree view after creating a directory
2012-10-03 08:20:06 -07:00
Kevin Sawicki
189e3be5ae
Wrap around fuzzy finder when at top or bottom
2012-10-02 10:39:35 -07:00
Kevin Sawicki
f51c5dffed
Include trailing slash when checking for dir segment
2012-10-01 22:50:56 -07:00
Kevin Sawicki
2b3991d74e
Use tree-view fixtures dir in tree-view specs
2012-10-01 19:18:13 -07:00
Kevin Sawicki
b7f32036c2
Change editor-selection-change event name to selection-change
2012-10-01 15:44:58 -07:00
Kevin Sawicki
edfd61c702
Remove unneeded class addition
2012-10-01 15:44:58 -07:00
Kevin Sawicki
41cdf130fb
Update highlighted line when editor selection changes
2012-10-01 15:44:58 -07:00
Kevin Sawicki
c7361d487f
Update cursor line when selection screen range changes
2012-10-01 15:44:58 -07:00
Kevin Sawicki
2bea67057b
Add spec for line highlight after backspace
2012-10-01 15:44:58 -07:00
Kevin Sawicki
f2306f444a
💄
2012-10-01 15:44:58 -07:00
Corey Johnson
887720e4de
[fail] added failing gutter spec
...
When you remove a newline with backspace, the background on the gutter line number isn't highlighted. This is to help @kevinsawicki debug the problem.
2012-10-01 15:44:58 -07:00
Corey Johnson
9361b0717c
Give gutter line highlighting its own describe
2012-10-01 15:44:58 -07:00
Kevin Sawicki
e039dab0f6
Don't highlight line in mini editor
2012-10-01 15:44:57 -07:00
Kevin Sawicki
a03512fd90
Add line number padding to expected width
2012-10-01 15:44:57 -07:00
Kevin Sawicki
a4ad5829a5
Disable gutter background highlight on multiline selections
2012-10-01 15:44:57 -07:00
Kevin Sawicki
33abaff747
Don't highlight line if selection is multiline
2012-10-01 15:44:57 -07:00
Kevin Sawicki
12a30873cf
💄
2012-10-01 15:44:57 -07:00
Kevin Sawicki
d69e08a858
Use screen rows for line highlight
2012-10-01 15:44:57 -07:00
Corey Johnson & Kevin Sawicki
e15694bb41
No longer cache cursorScreenRow in gutter highlighting
2012-10-01 15:44:57 -07:00
Corey Johnson & Kevin Sawicki
2863d92ce3
Use screen position for gutter highlighting
2012-10-01 15:44:57 -07:00
Kevin Sawicki
7506fe7eae
Provide default column to getGuideColumn callback
2012-09-29 11:51:32 -07:00
Kevin Sawicki
6412cde7a8
Support guide column callback function
...
This allows a config function to be registered
in the atom.coffee file to support different wrap
guide columns depending on the type of file being
viewed.
2012-09-29 11:44:05 -07:00
Nathan Sobo
4e49fbec72
TextMate grammars can include other grammars
2012-09-28 17:28:40 -06:00
Nathan Sobo
3a8fe2b24e
Spans have a class for each dot-separated portion of their token's scope
...
Previously, we were rendering every prefix of the dot-separated scope as its own class. So the scope meta.delimiter.method.period.coffee would make a token w/ classes:
class="meta, meta-delimiter, meta-delimiter-method, meta-delimiter-method-period…"
Now we just give the token each piece of the scope as a class:
class="meta delimiter method period coffee"
We lose a bit of meaning, in that a scope selector method.period.coffee would match this element in CSS even though it *wouldn't* in TextMate. But we also gain the behavior where longer prefixes are more specific by naturally producing more specific css selectors. So '.meta.delimiter.method' is always more specific than '.meta.delimiter', whereas '.meta-delimiter-method' ties with '.meta-delimiter'.
If prefix ambiguities become a problem later we may need to revisit this approach, but I think it's good enough for now.
2012-09-28 17:00:31 -06:00
Nathan Sobo
5ad6c67e07
Round alpha channel in TextMate theme rgba colors to 2-decimal places
2012-09-28 16:43:02 -06:00
Nathan Sobo
4ba5ccb0fa
Properly translate hex colors from TextMate themes to rgba (divide alpha by 255)
2012-09-28 14:06:10 -06:00
Nathan Sobo
3ebd7cfef1
Output nested spans so that scope selector specificity translates better to CSS
...
The tokenizer emits individual tokens with arrays of scopes, rather than a more tree-like structure. It's debatable whether we want to emit scope trees rather than token streams in general, though that might complicate things like line wrapping. For now, we're reconstructing the tree during rendering based on information that's implicit in the tokens.
2012-09-28 13:36:43 -06:00
Corey Johnson & Nathan Sobo
bebfaed69b
wip: creating token spans
2012-09-28 13:36:43 -06:00
Kevin Sawicki
02fa815459
Highlight the line number of the current cursor row
2012-09-28 09:52:34 -07:00
Corey Johnson & Nathan Sobo
82cecbf042
Add test for situation where we infinitely looped
2012-09-28 09:05:51 -07:00
Kevin Sawicki
b8926e7e28
Add spec for markdown preview detachment
2012-09-27 13:21:13 -07:00
Kevin Sawicki
d8011fe853
Add initial markdown preview extension
...
Uses the GitHub Markdown API to render the current
editor contents for .md and .markdown files.
2012-09-27 13:07:22 -07:00
Kevin Sawicki
e5310ae7b5
Revert "Append wrap guide to editor element"
...
This reverts commit 5301b29649
.
This caused the wrap guide not to scroll correctly when lines
scroll.
2012-09-26 17:06:02 -07:00
Kevin Sawicki
5301b29649
Append wrap guide to editor element
...
This prevents unneeded horizontal scrollbars when
the wrap guide exceeds the buffer size and the
buffer doesn't have any 80 character or greater lines
2012-09-26 16:26:57 -07:00
Corey Johnson
f95e67d8cd
Triple click selects entire line (including \n). Fixes #44
2012-09-26 13:53:51 -07:00
Nathan Sobo
2dbba203a0
Allow begin/end rules with back-references to be nested
2012-09-26 12:10:00 -06:00
Nathan Sobo
9c8d897317
Start on a spec for nested begin/end rule w/ back-references in the end rule
2012-09-26 09:59:15 -06:00
Nathan Sobo
2d38650265
Linguistic 💄
2012-09-26 09:57:35 -06:00
Corey Johnson
8328875021
Regex searches are case-sensitive if any letter is capitalized.
...
Fixes bug introduced in commit aa3f674948
2012-09-25 18:35:44 -07:00
Corey Johnson
dd81e69bfb
Merge branch 'master' of https://github.com/github/atom
2012-09-25 17:24:23 -07:00
Corey Johnson
aa3f674948
Regex's in the command panel are treated as case-insensitive if there are no non-escaped letters in the pattern
...
/hello becomes /hello/i
/he\Slo becomes /he\Slo/i
/Hello/i becomes /Hello/i
/Hello/ becomes /Hello/
2012-09-25 17:21:35 -07:00
Nathan Sobo
1d9cc53e7f
RootView focuses the *first* focusable child.
...
This prevents an issue where the fuzzy finder's mini-editor would get focused again when the fuzzy finder was being hidden.
2012-09-25 17:38:48 -06:00
Corey Johnson
533ad84d03
Buffer.scanInRange can do a case-insensitive search
2012-09-25 16:30:44 -07:00
Nathan Sobo
1383a94d60
Second attempt: don't blow up when commenting in files w/ no language bundle
2012-09-25 17:14:25 -06:00
Corey Johnson & Nathan Sobo
685cbc3575
When focused, RootView retains focus itself if it has no focusable children
2012-09-25 15:11:07 -06:00
Nathan Sobo
5f253d78e9
Optimization: Use absolute positioning instead of flexbox in editor
...
Flexbox was causing layouts and repaints to cover the entire scroll view instead of just the edited line. This cuts down on DOM manipulation cost significantly.
2012-09-25 14:58:31 -06:00
Corey Johnson
a6352497b9
Merge branch 'master' of https://github.com/github/atom
2012-09-25 13:22:24 -07:00
Corey Johnson
d13796074b
RootView passes focus to a child element with a tabindex of -1 (if one exists)
2012-09-25 13:22:06 -07:00
Nathan Sobo
b4b34b0489
Don't explode on meta-/
if there isn't a valid comment regex
2012-09-25 13:27:46 -06:00
Nathan Sobo
b00d0bacd9
When uncommenting multiple lines, don't raise an error if a line isn't commented
...
Previously, we were assuming that when uncommenting, that every line would match the comment regex. But this might not be the case. If the first line in the selection is commented but some subsequent lines aren't, they won't match the comment regex. So this commit guards for that case.
2012-09-25 13:19:59 -06:00
Corey Johnson
efab25a1d1
Merge remote-tracking branch 'origin/master' into making-things-easy
2012-09-21 16:37:29 -07:00
Kevin Sawicki
ea77b60b15
Serialize command panel history
...
Retains up to 100 commands between reloads
2012-09-20 14:06:12 -07:00
Kevin Sawicki
8393af2cd6
Serialize root view font size
2012-09-20 09:31:04 -07:00
Kevin Sawicki
7278bc62c6
Ensure start row is always >= 0
...
Previously if a file was a single line
it couldn't be deleted using the delete
line command because the start row would
index one row back which would be -1 and
therefore not be able to report a length
for use in the delete range.
2012-09-20 09:00:37 -07:00
Kevin Sawicki
f241bc5d2b
Delete entire region when deleting a folded line
2012-09-19 18:16:45 -07:00
Kevin Sawicki
54180462f6
Match describe to method name
2012-09-19 17:08:17 -07:00
Kevin Sawicki
f7670dc1a0
Add support for save all via meta-S
2012-09-19 17:03:50 -07:00
Corey Johnson
1168404d6d
Merge remote-tracking branch 'origin/master' into making-things-easy
2012-09-19 16:12:46 -07:00
Kevin Sawicki
a269eb39d0
Store column position as field
2012-09-19 15:41:50 -07:00
Kevin Sawicki
b18627ab9b
Add delete line support bound to meta-d key
2012-09-19 15:23:10 -07:00
Kevin Sawicki
e9abf1e3b9
Add wrap guide extension
...
Initially places a vertical line in each editor
at 80 characters.
2012-09-19 11:28:20 -07:00
Kevin Sawicki
47ed19f851
Substract scroll top when paging up
2012-09-19 08:52:05 -07:00
Kevin Sawicki
9ba3b74a9d
Add support for Page Up and Page Down keys
2012-09-18 19:53:23 -07:00
Corey Johnson
fab4d4e4e5
Fix TreeView spec that was failing in #MOLO
2012-09-18 17:31:47 -07:00
Corey Johnson
96e2a66065
Merge branch 'master' into making-things-easy
...
Conflicts:
.gitignore
Rakefile
2012-09-18 15:43:17 -07:00
Kevin Sawicki
8c1125457b
Persist scrollTop value of tree view
...
This will be set whenever attached
2012-09-18 15:15:06 -07:00
Nathan Sobo
7937380eed
Projects w/ EditSessions for now-deleted files can now be reloaded w/out error
2012-09-18 13:30:16 -06:00
Nathan Sobo
68effe3303
Make TreeView focus the active editor when a file is selected w/ the keyboard
2012-09-18 13:00:16 -06:00
Corey Johnson & Nathan Sobo
85c37fd652
Move atom.resourcePath to window.resourcePath
...
The resourcePath is now set using a url param. Because resourcePath is needed by require.js, it needs to be on `window` rather than `atom`.
2012-09-10 17:22:21 -07:00
Corey Johnson & Nathan Sobo
12e2fbdb14
Add support for back-references in TextMate grammars
2012-09-07 15:27:13 -07:00
Corey Johnson & Nathan Sobo
b00830cbc8
A pattern with no name
or contentName
does not insert undefined
into scope array
2012-09-07 11:20:56 -07:00