Rename python indentation command to be more consistent

We use `-` as word separator, and there is no need for leading
underscore.
This commit is contained in:
Maxime Coste 2017-01-02 04:20:05 +00:00
parent d5231c713e
commit 5ab60cde51

View File

@ -63,7 +63,7 @@ addhl -group /python/comment fill comment
# Commands # Commands
# ‾‾‾‾‾‾‾‾ # ‾‾‾‾‾‾‾‾
def -hidden _python_indent_on_new_line %{ def -hidden python-indent-on-new-line %{
eval -draft -itersel %{ eval -draft -itersel %{
# preserve previous line indent # preserve previous line indent
try %{ exec -draft <space> K <a-&> } try %{ exec -draft <space> K <a-&> }
@ -82,7 +82,7 @@ def -hidden _python_indent_on_new_line %{
hook -group python-highlight global WinSetOption filetype=python %{ addhl ref python } hook -group python-highlight global WinSetOption filetype=python %{ addhl ref python }
hook global WinSetOption filetype=python %{ hook global WinSetOption filetype=python %{
hook window InsertChar \n -group python-indent _python_indent_on_new_line hook window InsertChar \n -group python-indent python-indent-on-new-line
# cleanup trailing whitespaces on current line insert end # cleanup trailing whitespaces on current line insert end
hook window InsertEnd .* -group python-indent %{ try %{ exec -draft \; <a-x> s ^\h+$ <ret> d } } hook window InsertEnd .* -group python-indent %{ try %{ exec -draft \; <a-x> s ^\h+$ <ret> d } }
} }