smart-shift is a minor mode for conveniently shift the line/region to the left/right by the current major mode indentation width.
Once you have setup Melpa you can use
package-install command to install. The package name is
1 2 3
smart-shift will infer the indentation level of current major mode, if none of major modes listed below match, use the
tab-width as default.
It can also be set to a number explictly.
Or, for some major mode we haven’t support, add following snippets to your config file. Test it and send a PR.
1 2 3 4
Supported major modes
||Shift the line or region ARG times to the left.|
||Shift the line or region ARG times to the right.|
smart-shift-right the first time, you can simply hit
] to continuously shift to left or right, respectively.
If you use the key-chord like me. I strongly recommend you add the following snippets:
Repo is here, forks and pull requests are welcome!