Fix extra_word_chars in various scripts

Add '_' to the list now that it is not built-in anymore
This commit is contained in:
Maxime Coste 2018-11-28 18:13:55 +11:00
parent d1274836cd
commit 086db6a9d3
7 changed files with 8 additions and 8 deletions

View File

@ -23,7 +23,7 @@ add-highlighter shared/clojure/code/ regex \
\\(?:space|tab|newline|return|backspace|formfeed|u[0-9a-fA-F]{4}|o[0-3]?[0-7]{1,2}|.)\b 0:string \\(?:space|tab|newline|return|backspace|formfeed|u[0-9a-fA-F]{4}|o[0-3]?[0-7]{1,2}|.)\b 0:string
hook global WinSetOption filetype=clojure %{ hook global WinSetOption filetype=clojure %{
set-option window extra_word_chars . / * ? + - < > ! : "'" set-option window extra_word_chars '_' . / * ? + - < > ! : "'"
} }
evaluate-commands %sh{ evaluate-commands %sh{

View File

@ -67,7 +67,7 @@ hook global WinSetOption filetype=css %[
hook window ModeChange insert:.* -group css-hooks css-filter-around-selections hook window ModeChange insert:.* -group css-hooks css-filter-around-selections
hook window InsertChar \n -group css-indent css-indent-on-new-line hook window InsertChar \n -group css-indent css-indent-on-new-line
hook window InsertChar \} -group css-indent css-indent-on-closing-curly-brace hook window InsertChar \} -group css-indent css-indent-on-closing-curly-brace
set-option buffer extra_word_chars '-' set-option buffer extra_word_chars '_' '-'
] ]
hook -group css-highlight global WinSetOption filetype=(?!css).* %{ remove-highlighter window/css } hook -group css-highlight global WinSetOption filetype=(?!css).* %{ remove-highlighter window/css }

View File

@ -94,7 +94,7 @@ define-command -hidden haskell-indent-on-new-line %{
hook -group haskell-highlight global WinSetOption filetype=haskell %{ add-highlighter window/haskell ref haskell } hook -group haskell-highlight global WinSetOption filetype=haskell %{ add-highlighter window/haskell ref haskell }
hook global WinSetOption filetype=haskell %{ hook global WinSetOption filetype=haskell %{
set-option window extra_word_chars "'" set-option window extra_word_chars '_' "'"
hook window ModeChange insert:.* -group haskell-hooks haskell-filter-around-selections hook window ModeChange insert:.* -group haskell-hooks haskell-filter-around-selections
hook window InsertChar \n -group haskell-indent haskell-indent-on-new-line hook window InsertChar \n -group haskell-indent haskell-indent-on-new-line
} }

View File

@ -45,7 +45,7 @@ evaluate-commands %sh{
# Add the language's grammar to the static completion list # Add the language's grammar to the static completion list
printf '%s\n' "hook global WinSetOption filetype=kak %{ printf '%s\n' "hook global WinSetOption filetype=kak %{
set-option window static_words $(join "${keywords} ${attributes} ${types} ${values}" ' ')' set-option window static_words $(join "${keywords} ${attributes} ${types} ${values}" ' ')'
set-option -- window extra_word_chars '-' set-option -- window extra_word_chars '_' '-'
}" }"
# Highlight keywords (which are always surrounded by whitespace) # Highlight keywords (which are always surrounded by whitespace)
@ -100,7 +100,7 @@ hook global WinSetOption filetype=kak %~
hook window InsertChar (?![[{(<>)}\]])[^\s\w] -group kak-indent kak-indent-on-closing-char hook window InsertChar (?![[{(<>)}\]])[^\s\w] -group kak-indent kak-indent-on-closing-char
# cleanup trailing whitespaces on current line insert end # cleanup trailing whitespaces on current line insert end
hook window ModeChange insert:.* -group kak-indent %{ try %{ execute-keys -draft \; <a-x> s ^\h+$ <ret> d } } hook window ModeChange insert:.* -group kak-indent %{ try %{ execute-keys -draft \; <a-x> s ^\h+$ <ret> d } }
set-option buffer extra_word_chars '-' set-option buffer extra_word_chars '_' '-'
~ ~
hook -group kak-highlight global WinSetOption filetype=(?!kak).* %{ remove-highlighter window/kakrc } hook -group kak-highlight global WinSetOption filetype=(?!kak).* %{ remove-highlighter window/kakrc }

View File

@ -53,7 +53,7 @@ hook -group sass-highlight global WinSetOption filetype=sass %{ add-highlighter
hook global WinSetOption filetype=sass %{ hook global WinSetOption filetype=sass %{
hook window ModeChange insert:.* -group sass-hooks sass-filter-around-selections hook window ModeChange insert:.* -group sass-hooks sass-filter-around-selections
hook window InsertChar \n -group sass-indent sass-indent-on-new-line hook window InsertChar \n -group sass-indent sass-indent-on-new-line
set-option buffer extra_word_chars '-' set-option buffer extra_word_chars '_' '-'
} }
hook -group sass-highlight global WinSetOption filetype=(?!sass).* %{ remove-highlighter window/sass } hook -group sass-highlight global WinSetOption filetype=(?!sass).* %{ remove-highlighter window/sass }

View File

@ -121,7 +121,7 @@ hook -group scheme-highlight global WinSetOption filetype=(?!scheme).* %{
} }
hook global WinSetOption filetype=scheme %{ hook global WinSetOption filetype=scheme %{
set-option -add buffer extra_word_chars %{-:!:%:?:<:>:=} set-option buffer extra_word_chars '_' '-' '!' '%' '?' '<' '>' '='
hook window InsertEnd .* -group scheme-hooks lisp-filter-around-selections hook window InsertEnd .* -group scheme-hooks lisp-filter-around-selections
hook window InsertChar \n -group scheme-indent lisp-indent-on-new-line hook window InsertChar \n -group scheme-indent lisp-indent-on-new-line
} }

View File

@ -36,7 +36,7 @@ hook global WinSetOption filetype=scss %[
hook window ModeChange insert:.* -group scss-hooks scss-filter-around-selections hook window ModeChange insert:.* -group scss-hooks scss-filter-around-selections
hook window InsertChar \n -group scss-indent scss-indent-on-new-line hook window InsertChar \n -group scss-indent scss-indent-on-new-line
hook window InsertChar \} -group scss-indent scss-indent-on-closing-curly-brace hook window InsertChar \} -group scss-indent scss-indent-on-closing-curly-brace
set-option buffer extra_word_chars '-' set-option buffer extra_word_chars '_' '-'
] ]
hook -group scss-highlight global WinSetOption filetype=(?!scss).* %{ remove-highlighter window/scss } hook -group scss-highlight global WinSetOption filetype=(?!scss).* %{ remove-highlighter window/scss }