 (global-set-key "\M-W" 'copy-buffer-as-kill)
 
 (global-set-key (kbd "C-M-5") 'replace-string)
+(global-set-key (kbd "C-S-K") 'kill-whole-line)
 
 ;;; --------------------------------------------------------------------
 ;;; Semi-automatic rstripping

     (let* ((git-toplevel (string-trim-right
			   (shell-command-to-string
			    "git rev-parse --show-toplevel 2>/dev/null")))
	    (git-p (not (string-empty-p git-toplevel))))
       (when git-p
	 (setq default-directory git-toplevel))
       (list (read-shell-command "Run: "
				 (if git-p
				     "git --no-pager grep -nHE "


(with-eval-after-load "counsel"
  ;; XXX Workaround for https://github.com/abo-abo/swiper/issues/866
  ;;
  ;; `string' parameter of `counsel-git-grep-function' may be equal to
  ;; "\n\n3 chars more". In this case the command
  ;; git --no-pager grep --full-name -n --no-color -i -e \"\(
  ;;
  ;; 3\).*\(chars\).*\(more\)\"
  ;; will be executed, resulting in
  ;; "fatal: -e option, '\(': Unmatched ( or \(" error.
  (defun vvv/first-line (args)
    (let ((string (car args)))
      (list (car (split-string string "[\f\n\r\v]+")))))
  (advice-add #'counsel-git-grep-function :filter-args #'vvv/first-line))

(when (require 'avy nil 'noerror)
  (setq avy-all-windows 'all-frames)
