Commit Graph

82 Commits

Author SHA1 Message Date
Kevin Sawicki
d34796a78b Use oniguruma node module
This removes all internal native oniguruma
sources and starts using the node module
directly to create onig scanners and regexes.
2013-03-07 10:45:22 -08:00
Kevin Sawicki
745a3ef9f2 Use class methods to create native object shims
CoffeeScript 1.5 complains if a constructor has
a returns a value.
2013-02-27 13:25:10 -08:00
Kevin Sawicki
49c9536358 Guard against no fold end regex
Not all bundles specify this and an error will be
raised when trying to fold inside a grammar that does
not have this property defined if this check isn't done.
2013-02-25 09:31:00 -08:00
Kevin Sawicki
a52983928e Remove unused code now in bracket-matcher package 2013-02-08 09:51:31 -07:00
Nathan Sobo
6e191aba5b Move matching bracket insertion to bracket-matcher package 2013-02-08 09:51:31 -07:00
Nathan Sobo
6be72bac54 Guard against undefined marker ranges 2013-02-06 20:45:50 -07:00
Kevin Sawicki & Nathan Sobo
eee6903541 Use markers instead of anchors to track which close-brackets to skip 2013-02-05 17:21:24 -07:00
Corey Johnson & Nathan Sobo
d4b5c8beac Don't make OnigScanner and OnigRegExp be window globals 2013-01-24 17:22:49 -08:00
Kevin Sawicki
3bd826fcb2 Inline selected text wrapped in brackets 2013-01-23 16:49:34 -08:00
Kevin Sawicki
7425f58f26 Only change end position if selection is mult-line 2013-01-23 16:46:43 -08:00
Kevin Sawicki
6324a60d72 Wrap selection in brackets
Enclose the selection in brackets when an opening
bracket is typed and the selection is non-empty

Closes #41
2013-01-23 16:24:40 -08:00
Kevin Sawicki
17f12c42d3 Delete end pair when begin pair is backspaced 2013-01-23 16:24:40 -08:00
Kevin Sawicki
bdf60997ea 💄 2013-01-23 16:24:40 -08:00
Kevin Sawicki
7c7ca4a6c3 Don't auto outdent if already fully outdented 2013-01-22 17:39:03 -08:00
Kevin Sawicki
59f7b6650c Don't auto outdent if preceding row is null 2013-01-22 17:38:23 -08:00
Kevin Sawicki
ba7449411e Throw error if grammar cannot be resolved for path 2013-01-21 16:48:13 -08:00
Kevin Sawicki
d9385888c8 Only update display when grammar changes 2013-01-08 16:54:51 -08:00
Kevin Sawicki
2b51a2ce73 Test firstLineRegex first when finding grammar
This is required for the property-list bundle to highlight
.plist files that maybe in XML or non-XML formats.

Also specify the cached buffer disk contents to grammarForFilePath
so fs.read doesn't need to be called again if the contents are
already read.
2013-01-08 16:15:38 -08:00
Corey Johnson & Kevin Sawicki
131708ba37 Serialize grammar overrides for paths 2013-01-08 15:24:14 -08:00
Corey Johnson & Kevin Sawicki
c67fbef2b2 Store grammar overrides on project 2013-01-08 14:39:32 -08:00
Kevin Sawicki
3b47c26b4d Change an edit session's grammar on meta-l 2013-01-08 13:17:12 -08:00
Nathan Sobo
08a27cf93d Load grammars from TextMatePackage. Delete TextMateBundle.
TextMatePackage is only designed to load resources out of a TextMate
bundle. It's used only at load time, and from that point out we only
refer to our own global `syntax` data structure to access the data that
it loads.
2012-12-31 18:28:38 -06:00
Nathan Sobo
188d8f8604 Store grammars on the syntax global 2012-12-31 18:26:58 -06:00
Nathan Sobo
bb4f3c4efa Store foldEndPattern in syntax global's scoped properties
There's a slight wrinkle in this commit… TextMate grammars sometimes store
the `foldStopMarker` directly in the grammar, rather than storing it
in a separate scoped preferences file like the other settings. So we
have to scan through grammars looking for those that have the fold end
marker and make a scoped property for that grammar's scope.
2012-12-28 14:46:39 -06:00
Nathan Sobo
5a075d515e Retrieve indent/outdent patterns from scoped properties, not TM bundle 2012-12-28 13:47:50 -06:00
Nathan Sobo
9c7c2ab800 Store TM bundle start/end comment strings in scoped properties
Previously, we had a custom method on the `TextMateBundle` class for
retrieving these variables from the bundle. Now we're using Atom's
`syntax.getProperty` mechanism. The idea is to map TextMate concepts
to their Atom equivalent, rather than building everything directly
around TextMate.
2012-12-28 13:27:54 -06:00
Kevin Sawicki
9f6d1f987f Add initial support for replacing anchors 2012-12-21 13:22:08 -08:00
Nathan Sobo
acc0503684 Merge remote-tracking branch 'origin/master' into config
Conflicts:
	src/app/keymap.coffee
	src/extensions/outline-view/src/keymap.coffee
	src/extensions/outline-view/src/tag-reader.coffee
	src/packages/fuzzy-finder/spec/fuzzy-finder-spec.coffee
	src/packages/fuzzy-finder/src/fuzzy-finder.coffee
2012-12-18 20:32:05 -07:00
Corey Johnson & Nathan Sobo
874af0f2bc Eliminate reference to TokenizedBuffer on EditSession 2012-11-06 11:09:38 -08:00
Corey Johnson & Nathan Sobo
89ef3f0f20 Build Token objects in TextMateGrammar. Tokenization-related renames. 2012-11-05 16:03:19 -07:00
Corey Johnson
41291021c4 Use entire filePath to determine its grammar 2012-11-01 17:47:31 -07:00
Nathan Sobo
8a3f932bfa Merge branch 'hide-selection-cursor' 2012-10-29 16:54:34 -06:00
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
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
1924e92727 Create method getTokenizedBuffer() on language mode
Instead of assigning a tokenizedBuffer property on LanguageMode instances from the TokenizedBuffer constructor.
2012-10-29 11:54:14 -07:00
Corey Johnson
82e0a458fa Do not automatically close quotes when inserted inside a string. 2012-10-29 11:54:13 -07: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
b1e8e2391f Merge branch 'paste-indentation' 2012-10-25 10:50:05 -06:00
Nathan Sobo
9fc439b30d Use ? to avoid a bug caused by falsy zeroes 2012-10-24 17:54:15 -06:00
Corey Johnson & Nathan Sobo
7f9992d624 Optimize bracket matching 2012-10-24 16:28:00 -07: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
Corey Johnson
1ad6fcc2d3 :lipstick 2012-10-24 14:24:19 -07:00
Nathan Sobo
4d9b777350 Fix LanguageMode.proto.suggestedIndentationForBufferRow exception for row 0 2012-10-23 16:50:00 -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
Corey Johnson
e2a917fcf3 Change tabText to tabLength 2012-10-18 11:31:39 -07:00
Kevin Sawicki
8ce6810179 Support bundles with foldingStopMarker under Preferences/ 2012-10-09 16:57:43 -07:00
Kevin Sawicki
c30220ae80 Uncomment lines that match non-whitespace prefix of comment regex 2012-10-04 15:37:28 -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