46 lines
1.4 KiB
Text
46 lines
1.4 KiB
Text
# arrow keys for completions
|
|
|
|
hook global InsertCompletionShow .* %{
|
|
map window insert <down> <c-n>
|
|
map window insert <up> <c-p>
|
|
}
|
|
|
|
hook global InsertCompletionHide .* %{
|
|
unmap window insert <up>
|
|
unmap window insert <down>
|
|
}
|
|
|
|
map global insert <c-m> <home>
|
|
map global insert <a-m> <home>
|
|
map global insert <c-i> <end>
|
|
map global insert <a-i> <end>
|
|
map global insert <a-e> "<a-semicolon>[p<a-semicolon><semicolon>"
|
|
map global insert <a-n> "<a-semicolon>]p<a-semicolon><semicolon>"
|
|
map global insert <a-s> "<a-semicolon>: write<ret>"
|
|
# indentation
|
|
map global insert <c-.> <a-semicolon><gt>
|
|
map global insert <a-.> <a-semicolon><gt>
|
|
map global insert <c-,> <a-semicolon><lt>
|
|
map global insert <a-,> <a-semicolon><lt>
|
|
|
|
# word movement (based version)
|
|
map global insert <c-b> <a-semicolon>b
|
|
map global insert <c-left> <a-semicolon>b
|
|
map global insert <c-w> <a-semicolon>w
|
|
map global insert <c-right> <a-semicolon>w
|
|
map global insert <c-l> <a-semicolon>e
|
|
map global insert <c-up> "<a-semicolon>[p<a-semicolon><semicolon>"
|
|
map global insert <c-down> "<a-semicolon>]p<a-semicolon><semicolon>"
|
|
|
|
define-command -hidden insert-char-no-hook %{
|
|
execute-keys '<a-;>\i'
|
|
hook -always -once window InsertChar .* %{
|
|
execute-keys '<esc>'
|
|
}
|
|
}
|
|
define-command -hidden insert-no-hook %{
|
|
execute-keys '<a-;>\i'
|
|
}
|
|
|
|
map global insert <a-/> '<a-;>: insert-char-no-hook<ret>'
|
|
map global insert <a-\> '<a-;>: insert-no-hook<ret>'
|