kstenschke / shifter-plugin

Intelligent string/code manipulation plugin for Jetbrains IDEs: Detects shiftable type of word/line/selection and manipulates it on keyboard shortcut
http://plugins.jetbrains.com/plugin/6149
Apache License 2.0
105 stars 13 forks source link
intellij intellij-plugin java open-api phpstorm plugin

Shifter Plugin

Extension plugin for the various Jetbrains IDEs, working in IntelliJ IDEA, PhpStorm, WebStorm, PyCharm, RubyMine, AppCode, CLion, Gogland, DataGrip, Rider and Android Studio

Description

Shifter performs string manipulations on a single keyboard shortcut, after detection of intended manipulation. The type of manipulation has to be selected manually only when several are possible.

When evoked, Shifter detects the type of selection (or lets the user choose when ambiguous) in the current line or keyword at the caret and performs the possible string manipulation. To manipulations with multiple steps, there is an "up"- and "down"-shifting mode available.

If there's only one shiftable word in a line, it can be manipulated without the caret touching it. Lowercase/uppercase or lower case with upper first character of shifted words is maintained. To shift values instantly multiple times, there are additional "Shift More" actions, the amount of repetitions can be configured in the plugin configurations (default: 10).

Default Keyboard Shortcuts

Shifter adds the following editing tools (you can change the keymap in the IDE preferences):

Mac Users: On Macs, the keyboard shortcuts are Comma or Period key together with Shift+Alt+Cmd

Shifting Types

Sorting

Numeric Shifting

String Manipulations

Code- and DOC Comments

PHP, JavaScript and TypeScript shifting

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:

Tip: Using Mouse Wheel

To setup the mouse wheel to invoke shifting, open the IDE preferences and go to: "Keymap". Search for "Shift", then right-click the shifter action items and use the option "Add mouse shortcut". Mouse shortcuts can include hotkeys, this way for instance "Shift + Wheel Up" can be assigned to "Shift-Up", "Shift + Wheel Down" to "Shift-Down".

Changelog

See https://github.com/kstenschke/shifter-plugin/blob/master/CHANGELOG.md

Contributors

Thanks for their input, ideas, help or other contribution

License

Copyright Kay Stenschke

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

"http://www.apache.org/licenses/LICENSE-2.0":http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.