Authors:
kstenschke
Apache

Shifter

Products: IntelliJ IDEA, RubyMine, WebStorm, PhpStorm, PyCharm, AppCode, Android Studio, 0xDBE

Vendor: Kay Stenschke

Email:

Website: N/A

SourceCode: https://github.com/kstenschke/shifter-plugin

License: http://www.apache.org/licenses/LICENSE-2.0.html

Description:

Detects type of selection, line or keyword at caret and shifts it "up" or "down" on keyboard shortcut. If there's only one shiftable word in a line, it can be shifted without the caret touching it. Lowercase/uppercase or lower case with upper first character of shifted words is maintained.

Supported generic shifting types:
  • Shifting a multi-line selection sorts the lines alphabetically ascending/descending.
  • Shifting a single-line selection, that is a comma separated list, sorts the items ascending/descending.
  • Shifting a selection within a single line (that is not CSV), detects and swaps characters: single quote vs. double quote OR slash vs. backslash
  • Numeric values - Increments/decrements numbers by 1
  • UNIX timestamps - Increments/decrements by one day, shows a balloon info with the shifted date in human-readable format
  • PHP variables - Shifts to alphabetically next/previous variable name found in current document
  • Strings wrapped in single/double quotes and backticks - Shifts to alphabetically next/previous quoted string found in current document
  • CSS hex RGB colors - Shifts color value lighter/darker
  • CSS length values - Shifts numeric length values up/down by 1 (units: em, in, px, pt, cm)
  • Encoding/decoding of HTML special characters
  • Single characters and string consisting from any amount of the same character can be shifted to the prev/next ASCII value
  • Strings ending with numbers - increments/decrements the postfix
Dictionaric keyword shifting: Shifter comes with a customizable, file extension specific and globally usable dictionary of shiftable keywords. Some keyword types from the default dictionary:
  • PHP core magical constants - Shifts PHP's magic constants (__FILE__/__LINE__ etc.)
  • CSS orientations and positioning: top/right/bottom/left and absolute/relative, and geographical directions (north/east/south/west)
  • Accessibility types: public/private/protected
  • MySql data types: Shifts to next bigger/smaller numeric/string type
  • Primitive data types of Java, JavaScript, PHP, Objective-C
  • Doc comment tags (Java, JavaScript, PHP)
  • JavaScript event types (mouse, keyboard, frame/object, form, control, touch)
  • Named colors from the sRGB color space (white/lightgray/gray...)
  • Text styles (bold, italic...)
  • Web image (gif/jpg/png) and audio (au/aif/wav etc.) format extensions
  • Full and abbreviated names of months and weekdays and units of time
  • Logical operators (and/or/xor/not), arithmetic operations (addition/subtraction...) and arithmetic elements (sum/difference/product..)
  • Meta-syntax terms: foo/bar/baz...
  • Names of common data collection types (list/set/bag/dictionary/tree...)
  • Names of numbers (one/two/three etc.) and ordinal numbers (first/second/third etc.)
  • Boolean (paired) keyword values - Toggles true/false, on/off, yes/no (e.g. Objective-C), shown/hidden, show/hide, positive/negative, from/until, enable(d)/disable(d), pass/fail, min/max, expand/collapse, asc/desc, first/last

Default keyboard shortcuts:
  • Ctrl+Shift+Alt+Comma - Shift Down
  • Ctrl+Shift+Alt+Period - Shift Up

Please note: This plugin is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Downloads: 53021
Rating:
Participated in rating: 10
Version Since Build Until Build File/URL Size (Kb) Date Details
1.1.11. 80.8000. . Download 83.02 2014-07-28 17:42:13 details
. .
25 updates are hidden show all updates
Screenshot #14343
Screenshot #14340

Recent change notes:

  • 1.1.11
    • Made icons retina and darcula compatible
    • Reduced inline changelog to previous five versions, moved full changelog into separate file
  • 1.1.10
    • Improved pattern detection: better distinguishing between quoted strings and comma separated lists
    • Reduced memory expense (changed Boolean objects into boolean primitives)
  • 1.1.9
    • Added setting: Preservation of camel- and upper case is now configurable
    • Added case-insensitive fallback to failed word shifting
  • 1.1.8 Bugfix: Line shifting was overriding word shifting with 1.1.7
  • 1.1.7 Added shifting of column mode selections (with identical items per line)

...Read full changelog on github

General usage instructions:

Ctrl+Shift+Alt+Comma - Shift down word at caret / in line / sort selected lines ascending Ctrl+Shift+Alt+Period - Shift up word at caret / in line / sort selected lines descending

Comments:

Anonymous
Rated:
2013-11-22 17:36:31
I'm used to the shift-line feature from other editors, but shifting whole methods is really nice!
.
Anonymous
Rated:
2013-11-08 22:37:35
.
axl.jb
Rated:
2013-05-29 12:44:53
If http://youtrack.jetbrains.com/issue/IDEA-108024 gets implemented, this will be the most awesome plugin in the world! Love it!!!
.
kstenschke
2013-03-03 00:52:30
Thanks for your ratings, comments and suggestions. With shifter version 1.1.0 you'll find a customizable dictionary of "shiftable" keywords inside the application settings. Feel free to suggest improvements for the default dictionary directly via github / mail / here.
.
MosheElisha
Rated:
2013-02-05 16:05:47
.
debugger
2013-01-26 22:41:42
Also I've noticed a bug while shifting font-weight, font-style and text-decoration values. The allowed values for font-weight are bold|bolder|lighter|normal. While Shifter considers that out of all of them only 'bold' value is allowed (not even 'normal'). Also it considers 'italic' or 'strikethrough' or some other erroneous values as allowed for font-weight. The same thing is with font-style and text-decoration. Is this a Shifter problem? If so please check the correct values for these properties. https://developer.mozilla.org/en-US/docs/CSS/font-style https://developer.mozilla.org/en-US/docs/CSS/font-weight https://developer.mozilla.org/en-US/docs/CSS/text-decoration
.
debugger
Rated:
2013-01-26 15:43:25
Thank you for your useful plugin. I've noticed some buggy behaviour while dealing with negative pixel values. How to reproduce: 1. In a css file create some element rule with the property with positive pixel value (e.g. body { margin: 10px; }). 2. Start decreasing this value with the Shift-down hotkey. 3. When the value reaches "-1px" you'll notice some buggy behaviour, i. e. while pressing the Shift-down hotkey the sequence of values will be "-1px", "-0px", "--1px", "--0px", "---1px" and so on.
.
Anonymous
Rated:
2013-01-10 20:43:02
It would be great if there would be a config file in which we could enter thigs we would line to shift: enabled,disabled add,remove x,y,z Just shift through the lines, changing to next/prev statement There are many languages, this could be really usefull.
.
JetFuel
Rated:
2012-07-14 14:34:30
Works great!
.
kstenschke
2012-07-11 11:19:40
thank you for your feedback. number incrementing and some other options are now added. please feel free to share other ideas you might have.
.
michaelangela
Rated:
2011-10-14 20:32:44
Great idea for a plugin and very helpful. I second the idea of number increments as well. Perhaps adding the arrow keys as other possibilities so the "," and "." would be +-1, the up/down would be +- 10, the left/right would be +- 100.

Just a thought.

Thanks!
.
Anonymous
Rated:
2011-06-17 19:46:52
.
raveren
Rated:
2011-06-17 18:40:04
Really useful, do you plan to add say css possible value shifting (like _left, right, both_ after clear: ) or number incrementing/decrementing?
.