Nathan Sobo
fb6fe04023
Passivize more event names: 'change(d)' & 'screen-lines-change(d)'
2013-01-03 18:16:19 -07:00
Nathan Sobo
6d9402b5c9
Rename Anchor and Buffer events to passive-voice scheme
2013-01-02 13:48:10 -07: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
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
1dde562c6b
Don't explode when pasting on fractionally-indented lines w/ hard tabs
2012-12-06 12:01:59 -07: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
Nathan Sobo
5b143d4b93
Add 'autosave' option, which saves when unfocusing or switching tabs
2012-11-30 14:11:27 -07:00
Nathan Sobo
4b88a9f5ea
Expanded snippets are destroyed when the cursor leaves a tab stop
...
For this to work, I needed to make the updating of anchors transactional. Now, all anchors are updated and *then* they emit their events. That way when the cursor moves based on the user typing, the tab stop they're in has a chance to expand before we handle the move event. This prevents spurious cancellation of the snippet when typing on a tab stop.
2012-11-29 13:39:00 -07:00
Corey Johnson & Nathan Sobo
eb0414f4e7
Emit a contents-conflicted` event instead of contents-change-on-disk
2012-11-28 15:21:12 -07:00
Nathan Sobo
a1ae819908
Only tokenize in background if when a buffer is visible in an editor
...
This will prevent running a bunch of background tokenization when Atom is reloaded. We only perform tokenization to support content that is actually on screen.
2012-11-23 12:41:08 -07:00
Nathan Sobo
5aba8596a9
Make tokenization synchronous in all specs
...
Disabled some specs that need to make it asynchronous again… will deal with those soon.
2012-11-21 08:22:13 -07:00
Corey Johnson & Nathan Sobo
e52dbb682e
WIP: Perform tokenization in chunks when edit session is shown
2012-11-19 16:50:49 -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
f7b1f0521a
Emit row-oriented events from DisplayBuffer
2012-11-16 07:36:36 -07:00
Nathan Sobo
cf4e87103e
Emit row-oriented screen lien change events from EditSession
2012-11-16 07:36:35 -07:00
Nathan Sobo
6a5b66a687
💄
2012-11-14 20:51:59 -07: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
Corey Johnson
e9f69ee203
EditSession.isFoldedAtScreenRow returns false for screen rows that do not exist.
2012-11-12 09:12:47 -08:00
Corey Johnson & Nathan Sobo
8184c0248b
Don't store tabLength on EditSession
2012-11-06 11:56:18 -08:00
Corey Johnson & Nathan Sobo
139f5d0b50
EditSession.setTabLength assigns tabLength on the TokenizedBuffer.
2012-11-06 11:35:13 -08:00
Corey Johnson & Nathan Sobo
dacb5f063f
Remove unused references to stateForScreenRow
2012-11-06 11:13:42 -08:00
Corey Johnson & Nathan Sobo
874af0f2bc
Eliminate reference to TokenizedBuffer on EditSession
2012-11-06 11:09:38 -08:00
Nathan Sobo
2efc91aad1
Optimize highlightCursorLine by using cached element references
2012-11-01 13:51:22 -06:00
Nathan Sobo
085adb72ce
Pass translation options through when setting buffer position
2012-11-01 07:15:51 -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
Corey Johnson & Nathan Sobo
8c7152a59b
Eliminate 'move-cursor-to-next-word' command
...
We have move-to-end-of-word and move-to-beginning-of-word, which is what we use for the current keybindings.
2012-10-30 11:56:05 -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 & Nathan Sobo
adf00b60f3
Detect softTabs/hardTabs when an EditSession is created
2012-10-26 12:20:14 -06:00
Corey Johnson & Nathan Sobo
487245311e
EditSession#indentLevelForLine detects tabs/spaces for each line
...
This allows folding, auto-indent, etc to work in a file in which *both* tabs and spaces are used to indent. Not that this is a good idea, but at least we handle it gracefully.
2012-10-26 11:52:37 -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
29351ee5fc
Move setIndentationForBufferRow and indentationForBufferRow to EditSession
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
Nathan Sobo
ee09c20214
Merge branch 'master' into paste-indentation
2012-10-24 12:37:50 -06:00
Nathan Sobo
b5b552737d
Enable indent normalization on paste
2012-10-23 16:30:49 -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 & Nathan Sobo
a72d0399f7
Add Editor.setShowInvisibles and remove showInvisibles from EditSession
2012-10-18 14:10:36 -07:00
Corey Johnson & Nathan Sobo
ae0a60f4a9
Eliminate unused showInvisibles parameter.
2012-10-18 11:52:51 -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
Chris Wanstrath
fa10a8e6ac
use the local selection instance
2012-10-08 20:13:16 -07:00
Chris Wanstrath
f5f18abbf0
ctrl-t: transpose
2012-10-08 20:08:07 -07:00
Kevin Sawicki
b18627ab9b
Add delete line support bound to meta-d key
2012-09-19 15:23:10 -07:00
Kevin Sawicki
9ba3b74a9d
Add support for Page Up and Page Down keys
2012-09-18 19:53:23 -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