rename clean_around_selections command to filter_around_selections
This commit is contained in:
parent
e621814a78
commit
46d086fbbc
10
rc/fish.kak
10
rc/fish.kak
|
@ -33,10 +33,10 @@ addhl -group /fish/code regex %sh{ printf '\<(%s)\>' $(printf '\Q%s\\E|' $(fish
|
||||||
# Commands
|
# Commands
|
||||||
# ‾‾‾‾‾‾‾‾
|
# ‾‾‾‾‾‾‾‾
|
||||||
|
|
||||||
def -hidden _fish_clean_around_selections %{
|
def -hidden _fish_filter_around_selections %{
|
||||||
eval -draft -itersel %{
|
eval -draft -itersel %{
|
||||||
exec <a-x>
|
exec <a-x>
|
||||||
# trailing white spaces
|
# remove trailing white spaces
|
||||||
try %{ exec -draft s \h+$ <ret> d }
|
try %{ exec -draft s \h+$ <ret> d }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,8 +45,8 @@ def -hidden _fish_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-&> }
|
||||||
# cleanup previous line
|
# filter previous line
|
||||||
try %{ exec -draft k : _fish_clean_around_selections <ret> }
|
try %{ exec -draft k : _fish_filter_around_selections <ret> }
|
||||||
# copy '#' comment prefix and following white spaces
|
# copy '#' comment prefix and following white spaces
|
||||||
try %{ exec -draft k x s ^\h*\K#\h* <ret> y j p }
|
try %{ exec -draft k x s ^\h*\K#\h* <ret> y j p }
|
||||||
# indent after (begin|for|function|if|switch|while) commands and add 'end' command
|
# indent after (begin|for|function|if|switch|while) commands and add 'end' command
|
||||||
|
@ -60,7 +60,7 @@ def -hidden _fish_indent_on_new_line %{
|
||||||
hook global WinSetOption filetype=fish %{
|
hook global WinSetOption filetype=fish %{
|
||||||
addhl ref fish
|
addhl ref fish
|
||||||
|
|
||||||
hook window InsertEnd .* -group fish-hooks _fish_clean_around_selections
|
hook window InsertEnd .* -group fish-hooks _fish_filter_around_selections
|
||||||
hook window InsertChar \n -group fish-indent _fish_indent_on_new_line
|
hook window InsertChar \n -group fish-indent _fish_indent_on_new_line
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user