-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Support format on paste #13945
Comments
related to #4039 |
On OS X, could this be mapped to "Paste and Match Style"? ⌥⇧⌘V |
@rebornix Do you want me to get started on this? We already have the concept for formatting a range so, my plan is to do the following:
|
@jrieken previously I implemented it in another way but we think that's not good, I'll follow your suggestions and do this again :) |
Like @coreh I'm also interested to know whether this can be a command separate from paste so the user can choose which to use on demand (i.e. one keyboard shortcut for paste, one for paste + format) |
Firstly, thanks for adding this, it's been the one feature I really missed from Sublime Text. Having a play around with it, it seems to create two entries into undo history per single paste. I can't decide if that's a bug or a feature. |
@jakearchibald It's not a bug but I can't say it's a feature :( The behavior is consistent with FormatOnType or Save as we hook the formatting handler to Type/Save/Paste event, which makes it two entries in undo/redo stack. cc @jrieken |
Another "is this a bug or not?" If I paste: self.addEventListener('fetch', function(event) {
event.respondWith(
promiseAny([
caches.match(event.request),
fetch(event.request)
])
);
}); It adds a space between |
@mjbvz I suppose what @jakearchibald mentioned is actually TypeScript formatter's default behavior, right? |
Yes, you can disable this formatting using |
We should add support for format on paste. Idea is to simply invoke selection formatters when paste has happened.
The text was updated successfully, but these errors were encountered: