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.

kakrc 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #########
  2. # HOOKS #
  3. #########
  4. # add lines numbers
  5. hook global WinCreate .* %{addhl number_lines}
  6. # add brackets highliting
  7. hook global WinCreate .* %{addhl show_matching}
  8. # use only spaces do not use tabs
  9. hook -group TabExpander global InsertChar \t %{ exec -draft h@}
  10. # Add autowrap to 72 characters in git-commit
  11. hook -group GitWrapper global WinSetOption filetype=git-commit %{
  12. set buffer autowrap_column 72
  13. autowrap-enable
  14. hook window WinSetOption filetype=(?!git-commit).* %{ autowrap-disable }
  15. }
  16. # show all trailing whispaces red
  17. hook -group TrailingWhitespaces global WinCreate .* %{
  18. addhl regex '\h+$' 0:default,red
  19. }
  20. ####################
  21. # GENERAL SETTINGS #
  22. ####################
  23. colorscheme mydefault
  24. set global tabstop 4
  25. map global user n ':eval %{buffernext}<ret>'
  26. map global user b ':eval %{bufferprev}<ret>'
  27. # yank and paste to/from external clipboard
  28. map global user y '<a-|>xsel -b --input<ret>:echo -color Information "Yanked to clipboard"<ret>'
  29. map global user p '<a-!>xsel -b -o<ret>:echo -color Information "Pasted from clipboard"<ret>'
  30. # yank to system clipboard always
  31. hook global NormalKey y|d|c %{ nop %sh{
  32. echo "$kak_selection" | xsel --input
  33. }}
  34. # select all occurrences in this buffer
  35. map global user a '*%s<c-/><ret>'