Commit Graph

290 Commits

Author SHA1 Message Date
Nathan Sobo
029d8b58db Remove outdated method 2013-04-30 04:58:02 -06:00
Nathan Sobo
6f34d0b346 Document new methods 2013-04-29 21:01:48 -06:00
Nathan Sobo
caf34d6a3a EditSession.selectMarker checks if the marker is valid
Also, it returns the selected range if it's valid, and otherwise
returns a falsy value. This has more utility than just true/false.
2013-04-29 21:01:47 -06:00
Nathan Sobo
f4be899ae9 Switch EditSession over to object-oriented markers API 2013-04-29 21:01:47 -06:00
Garen Torikian
bb40ad6177 💄 all the things 2013-04-26 13:49:12 -07:00
Nathan Sobo
0d78098dbf Make TokenizedBuffer select its own grammar, not LanguageMode
This is part of an effort to disentangle LanguageMode, DisplayBuffer,
and TokenizedBuffer. It should be easy to create a DisplayBuffer
without creating an EditSession… let's get the dependencies flowing
in a single direction.
2013-04-25 15:13:00 -06:00
Nathan Sobo
0f623b3d08 Move structural folding logic to LanguageMode
DisplayBuffer should just focus on providing basic support for folding.
Scanning the structure of the code, looking at scopes, etc is more the
domain of the LanguageMode object.
2013-04-25 14:06:53 -06:00
Nathan Sobo
ca3b0c97da 💄 getter renames 2013-04-25 14:06:52 -06:00
Kevin Sawicki & Nathan Sobo
b1527a7982 Add getter and setter for buffer text 2013-04-23 08:39:26 -07:00
Kevin Sawicki
eec6518278 Add package to open links on ctrl-O 2013-04-23 08:39:26 -07:00
Garen Torikian
5ee388cede Get it to a proper 80% 2013-04-18 18:50:22 -07:00
Garen Torikian
e478d9b7a0 Add more corrections off of the #Internal syntax 2013-04-18 13:38:26 -07:00
Garen Torikian
a50cfa26cc Updates for new biscotto 2013-04-18 13:05:40 -07:00
Garen Torikian
8bd02358d2 Should I regret a lack of better commit messages? 2013-04-12 22:35:54 -05:00
Garen Torikian
f3b7874007 Get a good chunk of Selection} 2013-04-12 15:54:56 -05:00
Garen Torikian
286e70cc57 Hella Editor updates 2013-04-12 15:17:11 -05:00
Garen Torikian
0c5e38680d Internalize a bunch of methods 2013-04-12 14:37:21 -05:00
Garen Torikian
7e5b6bf5c4 Massive updates 2013-04-11 21:11:12 -05:00
Garen Torikian
bb8f5bb40c Fix errors 2013-04-11 02:29:48 -05:00
Garen Torikian
79562f51fd Some more low hanging fruit 2013-04-10 01:28:50 -05:00
Garen Torikian
fad987c0f3 More updates--25% 2013-04-09 18:03:39 -05:00
Garen Torikian
dbd924cfb0 Stash 2013-04-09 16:20:49 -05:00
Garen Torikian
bf76083939 Merge master 2013-04-09 14:54:17 -05:00
Garen Torikian
49e42c0510 Updates 2013-04-09 14:49:58 -05:00
Mutwin Kraus
c91de1e515 Merge remote-tracking branch 'origin/master' into vim-core-changes
Conflicts:
	src/app/pane.coffee
2013-04-09 18:52:36 +02:00
Garen Torikian
a16428c5b6 Merge master 2013-04-09 01:37:46 -05:00
Garen Torikian
d042fadab1 More updates 2013-04-09 01:18:12 -05:00
Kevin Sawicki
2f67312a80 Don't prompt to save if buffer is opened elsewhere
This corrects a regression where closing an edit session that
is opened somewhere else should not prompt to save since it
won't be lost if closed immediately since it is still open in
another pane.
2013-04-08 16:30:35 -07:00
Kevin Sawicki
5e504d6c08 Support more than just editors in the status bar
The status bar view now tracks the active pane item
and hides and shows elements that apply for the active
item such as path, cursor position, grammar, etc.
2013-04-08 13:26:57 -07:00
Mutwin Kraus
2445829f83 Specs for moveCursorToBeginningOfNextWord 2013-04-08 14:15:25 +02:00
Garen Torikian
f2698bc6a9 More updates 2013-04-08 02:14:45 -05:00
Garen Torikian
fe0dc8181a More doc updates--now at 15% 2013-04-05 14:33:58 -07:00
Nathan Sobo
abc5ed5190 Add editor:add-selection-above command 2013-04-05 14:52:35 -06:00
Nathan Sobo
2efed9f42c Add EditSession.consolidateSelections() 2013-04-05 14:52:30 -06:00
Nathan Sobo
131df22c11 Skip lines that are too-short when adding non-empty selection below 2013-04-05 14:17:21 -06:00
Nathan Sobo
ff8491f8d3 Base cursor visibility on marker emptiness instead of tail status 2013-04-05 14:17:20 -06:00
Nathan Sobo
f22461e5e8 Clear goal range when selection is modified
Just like the cursor clears its goal column when it is moved in any
way other than vertically, the selection clears its goal range (the
range it will attempt to use when adding a selection below) when it
is changed in any way.
2013-04-05 14:17:20 -06:00
Nathan Sobo
31579703f0 Ensure new non-empty selections have an invisible cursor. 2013-04-05 14:17:20 -06:00
Nathan Sobo
af923cca9b Preserve original selection's range when adding selection's below
Just like the cursor tries to stay in its "goal column" when moving
vertically, here we try to keep the same selection even when adding
across shorter lines.
2013-04-05 14:17:20 -06:00
Nathan Sobo
26e53584c1 Add 'editor:add-selection-below' command
It still needs work, but the basic idea is for every selection to
add another another selection over the same column range of the line
below.
2013-04-05 14:17:20 -06:00
Garen Torikian
9e38537239 Hella docs, we're up to 10% coverage 2013-04-04 18:54:36 -07:00
Kevin Sawicki
e442dfff11 Support joining editor lines with ctrl-J
This can be used with or without a selection to join one
or more lines with the line below it separated by a space.

Refs #134
2013-04-04 11:07:59 -07:00
Corey Johnson & Nathan Sobo
144984c726 Make LanguageMode unsubscribe from syntax global when destroyed 2013-04-03 18:34:54 -06:00
Nathan Sobo
ed1c5d3417 Localize grammar reloading / setting to LanguageMode
Previously, logic associated with swapping grammars was a bit
scattered. Now grammar reloading / assignment methods delegate to
LanguageMode directly, and it emits a 'grammar-changed' event when
the grammar changes. Now EditSession and TokenizedBuffer listen for
this event and perform necessary actions for grammar change.
2013-04-03 18:34:53 -06:00
Nathan Sobo
f03b6207de Make all requires of 'fs-utils' assign to fsUtils var instead of fs 2013-04-03 12:01:37 -06:00
Nathan Sobo
5df78812ef Rename EditSession.scanInRange to scanInBufferRange
This is more consistent with other range-oriented methods on
EditSession. At this layer, we need to be explicit about what kind
of range we are talking about.
2013-04-03 11:28:55 -06:00
Nathan Sobo
59a5a5bc8f Always pass a hash to TextBuffer.scanInRange iterators
This makes it easy to only assign variables for the information you
need in the iterator. Before, we always forced you to take a match and
a range as the first two arguments even if you weren't using them.
2013-04-03 11:16:49 -06:00
Nathan Sobo
ec93dc38b7 Version serialized state of EditSession
Since buffers are now serialized directly, previous versions of the
EditSession state which used the buffer's path as the `buffer` key
are no longer valid.
2013-04-03 10:21:56 -06:00
Mutwin Kraus
cc87595e4e Serialize TextBuffer inside EditSession serialize 2013-04-02 15:45:16 -06:00
Mutwin Kraus
693d8258ad Preserve buffer contents for unsaved files when reloading 2013-04-02 15:45:16 -06:00