Andy Delcambre
759fe2dd5b
Bind meta-= to autoindent currently selected rows
...
Closes #142
2013-01-18 11:33:20 -08:00
Corey Johnson
f5ee676e5e
Pass autoIndent as an option flag
...
Instead of querying EditSession for autoIndenting
2013-01-09 15:24:04 -08:00
Nathan Sobo
46331ded03
Merge remote-tracking branch 'origin/command-extensions' into dev
...
Conflicts:
spec/app/editor-spec.coffee
spec/app/root-view-spec.coffee
src/app/editor.coffee
src/extensions/strip-trailing-whitespace.coffee
2013-01-09 14:18:10 -07:00
Nathan Sobo
0a08d03c68
Rename Buffer, TokenizedBuffer, and Selection events
2013-01-04 13:59:11 -07:00
Nathan Sobo
f4f3002e6d
Rename Cursor and CursorView events to passive-voice scheme
...
Any events emitted from DOM nodes should be prefixed with an identifier
for the node that emits them. This eliminates the possibility of ambiguity
when the events bubble up the DOM away from their emitter.
2013-01-02 13:48:11 -07:00
Jon Rohan
92a9831201
writing spec for .backspaceToBeginningOfLine()
2012-12-28 17:24:57 -08:00
Jon Rohan
006a6d958d
Adding meta-backspace which will backspace from cursor to the beginning of line
2012-12-28 16:58:22 -08:00
Corey Johnson & Nathan Sobo
de5bd91055
Paste indent normalization works with on lines w/ mixed indentation
...
Normalizing the indent no longer explodes when pasting on a line that has mixed tabs and spaces when the edit session is using hard tabs.
2012-12-06 11:59:23 -07:00
Corey Johnson & Nathan Sobo
be2b9ee100
Store autoscroll state on Selection and Cursor models
2012-11-30 12:08:41 -07:00
Corey Johnson & Nathan Sobo
f9c7c08641
Selected results of a find operation are centered in the viewport
2012-11-29 18:52:34 -07:00
Corey Johnson & Nathan Sobo
7eb1f14f05
Don't need to assign retainSelection on the SelectionView anymore
2012-11-29 17:46:58 -07:00
Nathan Sobo
833ccb30ab
Pass old and new screen position with Anchor/Cursor move events
2012-11-29 13:39:00 -07:00
Nathan Sobo
91e899456a
Rename 'change-screen-position' event to 'moved' on Anchor and Cursor
2012-11-29 13:39:00 -07:00
Corey Johnson & Nathan Sobo
bfb1742285
ctrl-a on an empty line stays on that same line.
...
Fixes #95
2012-11-19 10:02:31 -08:00
Nathan Sobo
c68d5fac7d
Attach precipitating bufferChange to DisplayBuffer change events
...
The gutter can use this to determine if the change might have altered line numbers, for example if it's inside a fold.
2012-11-14 13:07:42 -07:00
Nathan Sobo
19fedbcffc
💄
2012-11-07 16:24:07 -07:00
Nathan Sobo
19c8a39fc8
Don't autoscroll to bottom of buffer on selectAll
2012-11-07 16:01:10 -07:00
Nathan Sobo
b87d7cd0df
Auto-indent skips cursor over leading whitespace before inserting more
...
This preserves the user's intent to bring the line's total amount of leading whitespace to the desired indent level.
2012-11-05 15:15:00 -07:00
Nathan Sobo
ea87c55db5
Don't clear the selection if it's empty
...
This avoids emitting selection change events when they aren't really needed. This extra event was causing the highlighted line to be updated when it didn't need to be.
2012-11-01 14:50:51 -06:00
Corey Johnson & Nathan Sobo
b85f3c47eb
Rewrite Seleciton.setScreenRange in terms of setBufferRange
2012-10-30 17:07:15 -07:00
Nathan Sobo
007e032224
Expand selection linewise after triple-click (dragging or shift-click)
2012-10-30 14:48:33 -06:00
Corey Johnson & Nathan Sobo
c55332a3a4
WIP: Make selections remember if they are wordwise/linewise
...
Also always expand from the initial selection after a double/triple click in either direction until directionality of the selection is established.
2012-10-30 13:56:35 -06:00
Nathan Sobo
aa20fbac6d
Ignore an empty last line when indenting/outdenting selected lines
...
This provides more intuitive behavior now that the cursor isn't visible when there's a selection.
2012-10-29 16:16:19 -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
Nathan Sobo
88e246b622
Hide the cursor when the selection is not empty
2012-10-29 15:51:32 -06:00
Nathan Sobo
c8c581dfd0
Remove Selection#modifyScreenRange and rely on cursor/anchor events
2012-10-29 13:11:17 -06:00
Corey Johnson & Nathan Sobo
86d5c1ccff
💄
2012-10-26 12:20:59 -06: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
1bb2531f31
Tab can auto-indent at the beginning of a line
2012-10-25 16:27:28 -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
d3b7fbb37b
Use window.pasteboard in cut/copy/paste
2012-10-24 18:35:55 -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
ee09c20214
Merge branch 'master' into paste-indentation
2012-10-24 12:37:50 -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
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
Corey Johnson
e2a917fcf3
Change tabText to tabLength
2012-10-18 11:31:39 -07:00
Kevin Sawicki
e87cb34d1d
Support selecting inserted text
2012-10-10 18:02:48 -07:00
Kevin Sawicki
f2306f444a
💄
2012-10-01 15:44:58 -07:00
Kevin Sawicki
33abaff747
Don't highlight line if selection is multiline
2012-10-01 15:44:57 -07:00
Corey Johnson
f95e67d8cd
Triple click selects entire line (including \n). Fixes #44
2012-09-26 13:53:51 -07:00
Kevin Sawicki
f241bc5d2b
Delete entire region when deleting a folded line
2012-09-19 18:16:45 -07:00
Kevin Sawicki
b18627ab9b
Add delete line support bound to meta-d key
2012-09-19 15:23:10 -07:00
Nathan Sobo
c3e748a17c
WIP: Use rake to start compiling resources (like require.coffee)
2012-08-26 16:29:46 -05:00
Nathan Sobo
c2c8724ad0
Initial commit
2012-08-10 13:32:19 -06:00