Commit Graph

4444 Commits

Author SHA1 Message Date
Nathan Sobo
abc5ed5190 Add editor:add-selection-above command 2013-04-05 14:52:35 -06:00
Nathan Sobo
3e07351552 Also bind escape to consolidate selections in mini editors 2013-04-05 14:52:35 -06:00
Nathan Sobo
a7091c8d94 Remove *all* !important expressions once specificity is calculated 2013-04-05 14:52:35 -06:00
Nathan Sobo
37e16bb163 Clear multiple selections on escape
The binding uses the `!important` selector to ensure that the editor
always gets a chance to clear multiple selections before other bindings
for escape are processed.
2013-04-05 14:52:35 -06:00
Nathan Sobo
7018f33ad7 Allow !important flag in keymap selectors 2013-04-05 14:52:35 -06:00
Nathan Sobo
2efed9f42c Add EditSession.consolidateSelections() 2013-04-05 14:52:30 -06:00
Nathan Sobo
bd58834e7d Merge goal ranges when merging selections 2013-04-05 14:17:21 -06:00
Nathan Sobo
be009e87c2 Skip empty lines when adding selections below empty selections
Unless the selection's column is 0
2013-04-05 14:17:21 -06:00
Nathan Sobo
393cba4d42 Don't skip shorter lines when the adding empty selection below 2013-04-05 14:17:21 -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
7b7c77645c Rename SelectionView.destroyed to .needsRemoval to match CursorView 2013-04-05 14:17:20 -06:00
Nathan Sobo
f6bfab5dd7 Don't freak when selections are added & removed before display update
Previously, if a selection was added and removed before the editor got
a chance to update its display, it would try to add a selection view
for the destroyed selection. Now we check the new selections and
cursors to make sure they aren't destroyed before we add views for
them.
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
34019951d3 💄 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
Kevin Sawicki
c8dd9f8d82 Use indexOf instead of substring to check path 2013-04-05 09:07:31 -07:00
Kevin Sawicki
1e3d157f49 💄 2013-04-05 09:01:02 -07:00
Kevin Sawicki
84107317bb Support opening non-existent files from the CLI
This required changing text-buffer to support having a
path but not underlying file that exists yet.

Now calling RootView.open() with a non-existed path will
open a dirty empty editor to the path and the file will be
created on first save.
2013-04-04 17:08:05 -07:00
Kevin Sawicki
931ae677c1 💄 2013-04-04 16:37:52 -07:00
Kevin Sawicki
8745ef8723 💄 2013-04-04 16:29:15 -07:00
Kevin Sawicki
6166f8e681 Remove unused require 2013-04-04 13:40:48 -07:00
Kevin Sawicki
bb2ab15753 Open files specified via CLI in existing window
Activate the window and open an editor when a path is specified
that is already present in an existing window's project.

Closes #357
2013-04-04 13:40:48 -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
Kevin Sawicki
9773751e79 Delete left when meta-backspacing at start of line
Previously EditSession.backspaceToBeginningOfLine() would do nothing
if at the beginning of the line.

Now it selects left and does a delete so it can be used to delete
multiple lines continuously without having to move the cursor.

Refs #134
2013-04-04 09:25:35 -07:00
Kevin Sawicki
bac2209449 Remove unneeded syntax.off() call
syntax.on() is no longer called anywhere in the package.
2013-04-03 17:51:24 -07:00
Corey Johnson & Nathan Sobo
2f4bbd90a6 Don't emit grammars-loaded event 2013-04-03 18:34:54 -06:00
Corey Johnson & Nathan Sobo
5c9dd50e39 Start spell-checking immediately
When the grammar changes, spell check will detect this and toggle
itself accordingly. Before a grammar matches a buffer, it has the
NullGrammar, which won't be spell-checked.
2013-04-03 18:34:54 -06:00
Corey Johnson & Nathan Sobo
2973a81293 Don't assign text grammar by default. Just use the null grammar. 2013-04-03 18:34:54 -06:00
Corey Johnson & Nathan Sobo
144984c726 Make LanguageMode unsubscribe from syntax global when destroyed 2013-04-03 18:34:54 -06:00
Corey Johnson & Nathan Sobo
1b56cfb270 LanguageMode switches to a better-matching grammar when it is added 2013-04-03 18:34:54 -06:00
Corey Johnson & Nathan Sobo
16b53d3183 Eliminate syntax.grammarsByFileType hash 2013-04-03 18:34:53 -06:00
Corey Johnson & Nathan Sobo
05d6adc6c7 Change syntax.selectGrammar to choose the highest-scoring grammar
This sets us up to switch to a grammar when it is loaded if it is a
better match for the current file.
2013-04-03 18:34:53 -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
Kevin Sawicki
cf357376b3 Only add wrap guide to pane-based editors 2013-04-03 17:30:24 -07:00
Kevin Sawicki
b4eb7d072e Only expand folder when needed for file asserts
Closes #470
2013-04-03 17:07:23 -07:00
Kevin Sawicki
b50b2231d6 Render all operations when moving to bottom 2013-04-03 15:55:07 -07:00
Kevin Sawicki
a762291de9 Render more operations when path is collapsed
Previously the command panel would shrink when a path was
collapsed since operations that hadn't been rendered yet weren't
properly added to the DOM.

This removes the collapse/expand animation since it becomes jittery
when combined with rendering new path and operation views.
2013-04-03 15:53:07 -07:00
Kevin Sawicki
ec2b116674 💄 2013-04-03 15:53:07 -07:00
Kevin Sawicki
0b9f6b14ba Put 'atom' in window title when no panes are open
Previously the title would revert to 'index.html' when
focus was gained and no panes were open.
2013-04-03 15:53:07 -07:00
Corey Johnson & Nathan Sobo
101605e50f Add atom.crashMainProcess and atom.crashRenderProcess 2013-04-03 15:08:16 -07:00
Kevin Sawicki
5d2a0a0223 Use fs.chmod() to make atom.sh executable 2013-04-03 15:01:23 -07:00
Kevin Sawicki
8447a22419 Support reloading the window from the event palette 2013-04-03 14:48:11 -07:00
Kevin Sawicki
d1fd3c8d7c Invoke callback with empty array on non-zero exit code 2013-04-03 13:54:52 -07:00
Kevin Sawicki
a5870cedd2 Use more generic core.excludeVcsIgnoredPaths config key 2013-04-03 11:45:55 -07:00
Kevin Sawicki
ede5e88a19 Merge origin/master into nak-powered-search
Conflicts:
	src/packages/command-panel/lib/preview-list.coffee
	src/packages/fuzzy-finder/lib/load-paths-task.coffee
2013-04-03 11:43:35 -07:00
Kevin Sawicki
0b3a91b5fe Rename VCS ignore config setting to fuzzyFinder.hideVcsIgnoredPaths 2013-04-03 11:39:16 -07:00
Kevin Sawicki
ace71acb3c Invoke callback even when command fails 2013-04-03 11:34:27 -07:00