Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Create aliases for specific margin and padding types #5445

Closed
zackshapiro opened this issue Oct 8, 2013 · 9 comments
Closed

Create aliases for specific margin and padding types #5445

zackshapiro opened this issue Oct 8, 2013 · 9 comments
Assignees

Comments

@zackshapiro
Copy link

I find myself typing margin-left, margin-right, padding-top, padding-bottom, etc., over and over in my CSS.

It would be fantastic to have aliases for my CSS like this:

Instead of margin-left: 64px;

I could type mr: 64px;

margin-top would be mt
margin-bottom would be mb

padding-left would be pl
padding-right would be pr

@marcelgerber
Copy link
Contributor

Maybe this is a good extension idea, and maybe there is already an extension that does exactly this. But I don't think that this has to be in brackets core.

@sbruchmann
Copy link

@zackshapiro Take a look at emmet, which was formerly known as zen coding. There’s already a Brackets extension in the registry.

@zackshapiro
Copy link
Author

Just did. Thanks guys

On Tue, Oct 8, 2013 at 7:55 PM, Steffen Bruchmann
notifications@github.comwrote:

@zackshapiro https://github.com/zackshapiro Take a look at emmethttp://emmet.io,
which was formerly known as zen coding. There’s already a Brackets
extension in the registry.


Reply to this email directly or view it on GitHubhttps://github.com//issues/5445#issuecomment-25943545
.

@ghost ghost assigned JeffryBooher Oct 14, 2013
@njx
Copy link
Contributor

njx commented Oct 14, 2013

I wonder if a good way to fix this would be to use the same StringMatch algorithm in CSS code hints that we use elsewhere (e.g. Quick Open). I suspect that if we did that, things like "mr" would quickly match margin-right. We already use that in JS code hints, so it actually seems inconsistent that we don't use it in CSS code hints.

Medium priority to @JeffryBooher to investigate--it should be pretty easy to put this in and see how it feels. If it's more complicated, or doesn't seem like it would address the original filer's goal, we could move this to the backlog.

@zackshapiro
Copy link
Author

Sounds good to me!

Best,
Zack

On Mon, Oct 14, 2013 at 11:24 AM, Narciso Jaramillo
notifications@github.com wrote:

I wonder if a good way to fix this would be to use the same StringMatch algorithm in CSS code hints that we use elsewhere (e.g. Quick Open). I suspect that if we did that, things like "mr" would quickly match margin-right. We already use that in JS code hints, so it actually seems inconsistent that we don't use it in CSS code hints.

Medium priority to @JeffryBooher to investigate--it should be pretty easy to put this in and see how it feels. If it's more complicated, or doesn't seem like it would address the original filer's goal, we could move this to the backlog.

Reply to this email directly or view it on GitHub:
#5445 (comment)

@peterflynn
Copy link
Member

@zackshapiro The Snippets extension is another one you might find useful in the meantime. You can fully customize the set of shorthand mnemonics and what they map to.

@zackshapiro
Copy link
Author

@peterflynn Noted! Thanks!

@dangoor
Copy link
Contributor

dangoor commented Apr 24, 2014

This is now fixed on master, in the way that @njx suggests which means that it's not specific aliases but rather fancy searching and sorting.

@dangoor dangoor closed this as completed Apr 24, 2014
@mackenza
Copy link
Contributor

good job @JeffryBooher ! I just fetched this commit on my Brackets install and the feature seems pretty solid. Nice work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants