From 5f3a432db798f0b73ff5dce4bc7273948ca319a4 Mon Sep 17 00:00:00 2001 From: Andre Schaf Date: Tue, 19 May 2026 12:05:45 +0200 Subject: [PATCH] fzf and winmove --- init.el | 45 +++++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/init.el b/init.el index 11be859..691d438 100644 --- a/init.el +++ b/init.el @@ -1,7 +1,7 @@ (setq custom-file "./custom") (setq display-line-numbers-type 'relative) (global-display-line-numbers-mode 1) -(tool-bar-mode 0) +;;(tool-bar-mode 0) (menu-bar-mode 0) (column-number-mode 1) (setq select-enable-clipboard t) @@ -10,7 +10,7 @@ auto-save-default nil) ;; keys -(global-set-key (kbd "C-x C-c") 'comment-line) +(global-set-key (kbd "C-x c") 'comment-line) ;; packages (require 'package) @@ -28,29 +28,42 @@ (setq use-package-always-ensure t) (require 'use-package) -(setq evil-want-C-u-scroll t - evil-want-keybinding nil - evil-want-integration t - evil-undo-system 'undo-tree) +(use-package fzf + :bind + ;; Don't forget to set keybinds! + :config + (setq fzf/args "-x --color bw --print-query --margin=1,0 --no-hscroll" + fzf/executable "fzf" + fzf/git-grep-args "-i --line-number %s" + ;; command used for `fzf-grep-*` functions + ;; example usage for ripgrep: + fzf/grep-command "rg --no-heading -nH" + ;; fzf/grep-command "grep -nrH" + ;; If nil, the fzf buffer will appear at the top of the window + fzf/position-bottom t + fzf/window-height 15)) + +(global-set-key (kbd "C-x p f") 'fzf-git-files) + +(use-package tree-sitter-langs + :config + (global-undo-tree-mode)) (use-package undo-tree :config (global-undo-tree-mode)) -(use-package evil - :config - (evil-mode 1)) - -(use-package evil-collection - ;; :after evil - :config - (evil-collection-init)) - +;; window-management (use-package zoom-window :ensure t :config (setq zoom-window-mode-line-color "DarkGreen") - :bind ("C-x C-z" . zoom-window-zoom)) + :bind ("C-x w z" . zoom-window-zoom)) +;; keys +(global-set-key (kbd "C-x w l") 'windmove-right) +(global-set-key (kbd "C-x w h") 'windmove-left) +(global-set-key (kbd "C-x w j") 'windmove-down) +(global-set-key (kbd "C-x w k") 'windmove-up) (use-package doom-themes :config