Smart Duplicate
Line duplicate plugin that changes .width into .height etc.
Details
Installs
- Total 1K
- Win 770
- Mac 389
- Linux 217
| Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | Mar 1 | Feb 28 | Feb 27 | Feb 26 | Feb 25 | Feb 24 | Feb 23 | Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | Feb 16 | Feb 15 | Feb 14 | Feb 13 | Feb 12 | Feb 11 | Feb 10 | Feb 9 | Feb 8 | Feb 7 | Feb 6 | Feb 5 | Feb 4 | Feb 3 | Feb 2 | Feb 1 | Jan 31 | Jan 30 | Jan 29 | Jan 28 | Jan 27 | Jan 26 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| Mac | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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.