-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On Type Rename for #88424 #92597
Merged
Merged
On Type Rename for #88424 #92597
Changes from 16 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
84c838d
Scaffold on type rename
alexdima 67f7e75
Cleanup and implement HTML live region
octref 78968a0
tmp
octref 26ebc74
Rough implementation
octref c8919e0
Tmp cmd + f2 to rename
octref f3f729d
Tweak how mirrored ranges are kept in sync
alexdima 91068ad
Make sure semi-automatic mode is working correctly
octref 9b83dd5
Tests for synced regions
octref c833780
Clean up API and add stopPattern
octref 3ba143c
Clean up
octref bb6a598
Clean up
octref df68415
Up to date
octref 0523583
Failure test cases
octref 2bdb9af
Clean up
octref da8510c
autoRename -> onTypeRename
octref 30ac552
Merge remote-tracking branch 'origin/master' into octref/live-rename
octref b9d0ebc
Drop todo
octref 8870bcd
Merge remote-tracking branch 'origin/master' into octref/live-rename
octref c438bc2
Rename
octref af03b9a
Merge remote-tracking branch 'origin/master' into octref/live-rename
octref 467fddc
Comment out tests for now
octref 6701ced
Cmd + Shift + F2 for renaming
octref 600a776
Take HTML implementation out
octref 196562b
Merge remote-tracking branch 'origin/master' into octref/live-rename
octref File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -238,6 +238,11 @@ export interface IEditorOptions { | |
* Defaults to false. | ||
*/ | ||
automaticLayout?: boolean; | ||
/** | ||
* Rename matching regions on type. | ||
* Defaults to false. | ||
*/ | ||
renameOnType?: boolean; | ||
/** | ||
* Control the wrapping of the editor. | ||
* When `wordWrap` = "off", the lines will never wrap. | ||
|
@@ -3311,6 +3316,7 @@ export const enum EditorOption { | |
autoClosingQuotes, | ||
autoIndent, | ||
automaticLayout, | ||
renameOnType, | ||
autoSurround, | ||
codeLens, | ||
colorDecorators, | ||
|
@@ -3518,6 +3524,10 @@ export const EditorOptions = { | |
automaticLayout: register(new EditorBooleanOption( | ||
EditorOption.automaticLayout, 'automaticLayout', false, | ||
)), | ||
renameOnType: register(new EditorBooleanOption( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also here, please move it down a bit. |
||
EditorOption.renameOnType, 'renameOnType', false, | ||
{ description: nls.localize('renameOnType', "Controls whether the editor auto renames on type.") } | ||
)), | ||
autoSurround: register(new EditorStringEnumOption( | ||
EditorOption.autoSurround, 'autoSurround', | ||
'languageDefined' as 'languageDefined' | 'quotes' | 'brackets' | 'never', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
.monaco-editor .on-type-rename-decoration { | ||
background: rgba(255, 0, 0, 0.3); | ||
border-left: 1px solid rgba(255, 0, 0, 0.3); | ||
/* So border can be transparent */ | ||
background-clip: padding-box; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like to keep these sorted alphabetically, please move it down a bit.