My personal dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.2 KiB

#########
# HOOKS #
#########
# add lines numbers
hook global WinCreate .* %{addhl number_lines}
# add brackets highliting
hook global WinCreate .* %{addhl show_matching}
# use only spaces do not use tabs
hook -group TabExpander global InsertChar \t %{ exec -draft h@}
# Add autowrap to 72 characters in git-commit
hook -group GitWrapper global WinSetOption filetype=git-commit %{
set buffer autowrap_column 72
autowrap-enable
hook window WinSetOption filetype=(?!git-commit).* %{ autowrap-disable }
}
# show all trailing whispaces red
hook -group TrailingWhitespaces global WinCreate .* %{
addhl regex '\h+$' 0:default,red
}
####################
# GENERAL SETTINGS #
####################
colorscheme mydefault
set global tabstop 4
map global user n ':eval %{buffernext}<ret>'
map global user b ':eval %{bufferprev}<ret>'
# yank and paste to/from external clipboard
map global user y '<a-|>xsel -b --input<ret>:echo -color Information "Yanked to clipboard"<ret>'
map global user p '<a-!>xsel -b -o<ret>:echo -color Information "Pasted from clipboard"<ret>'
# yank to system clipboard always
hook global NormalKey y|d|c %{ nop %sh{
echo "$kak_selection" | xsel --input
}}
# select all occurrences in this buffer
map global user a '*%s<c-/><ret>'