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.
Default keyboard shortcuts:
- Ctrl+Shift+Alt+Comma - Shift Down
- Ctrl+Shift+Alt+Period - Shift Up
- Ctrl+Shift+Alt+K - Shift Up More*
- Ctrl+Shift+Alt+J - Shift Down More*
Shift more: repeats shifting the selected value multiple times. The amount of repetitions can be configured in the plugin configuration (default: 10).
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 (and millisecond based) 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
- 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
Please note: This plugin is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Recent change notes:
...Read full changelog on github
- Implemented toggle of order of selected PHP concatenation items (if two)
- Improved lines sorting to detect and maintain common lines delimiter
- Implemented toggling of operator signs, if surrounded by whitespace (+, -, *, /, <, >)
- Improved shifting of CSS lengths: 0px (or other unit) is auto-corrected to 0
- Improved shifting of CSS lengths: numbers different to 0 are appended with the unit most prominently used in the current file (cm / em / in / mm / pc / pt / px. Fallback: px)
- Bugfix: "Shift-Down More" of CSS shorthand was shifting also right-hand-sided value during shift of left-hand-sided value when decreasing digits amount
- Added actions to instantly shift values more than 1 time: "Shift-Up More" and "Shift-Down More"
- Added configuration of repetition amount of "Shift-Up More" / "Shift-Down More" to plugin configuration
- Added timestamp configuration: shift day-wise in seconds or milliseconds?
- Improved timestamp shifting: leading zeros of timestamps are now maintained
- Made icons retina and darcula compatible
- Reduced inline changelog to previous five versions, moved full changelog into separate file
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