Smart Duplicate
Line duplicate plugin that changes .width into .height etc.
Details
Installs
- Total 1K
- Win 763
- Mac 385
- Linux 217
Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | Oct 7 | Oct 6 | Oct 5 | Oct 4 | Oct 3 | Oct 2 | Oct 1 | Sep 30 | Sep 29 | Sep 28 | Sep 27 | Sep 26 | Sep 25 | Sep 24 | Sep 23 | Sep 22 | Sep 21 | Sep 20 | Sep 19 | Sep 18 | Sep 17 | Sep 16 | Sep 15 | Sep 14 | Sep 13 | Sep 12 | Sep 11 | Sep 10 | Sep 9 | Sep 8 | Sep 7 | Sep 6 | Sep 5 | Sep 4 | Sep 3 | Sep 2 | Sep 1 | Aug 31 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 3 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
SmartDuplicate
SmartDuplicate is a Sublime Text 2 and 3 plug-in that allows duplicating lines while changing certain keywords.
Installation
Using Package Controller (recommended): Call Install Package and look for SmartDuplicate.
Manually: Clone repo into your packages folder (in Subime: Preferences > Browse Packages… menu item to open this folder).
Command
[CTRL+SHIFT+d] (or [CMD+SHIFT+d] for OSX) duplicates line using smart duplicate
Note: This overwrites the default duplicate line shortcut.
Examples
I wrote the first line of the pairs and hit [CTRL+SHIFT+d].
Grid.WIDTH = window.innerWidth();
Grid.HEIGHT = window.innerHeight();
element.x = other.width + 20 + element.width;
element.y = other.height + 20 + element.height;
target.x = stage.mouseX;
target.y = stage.mouseY;
marginTop: "30px"
marginBottom: "30px"
padding-left: 20px;
padding-right: 20px;
Supported keywords
width
<->height
(case insensitive)left
<->right
(case insensitive)top
<->bottom
(case insensitive).x
<->.y
.[word]X
<->.[word]Y
(any word ending in a capital X or Y)
Once again: work in progress. Constantly expanding and fine tuning the keywords
Motivation
I'm a front-end developer. It's been too many times that I duplicate a line and then go through and change all the
.height
to .width
etc.. In the manner of automate all the things I thought I write a little plugin for the editor
of my choice.
Let me know what you think. No you suck-emails please.