From 4d5b849d6ad8993e311ab5b91d177b44adfc89ba Mon Sep 17 00:00:00 2001 From: Jeschli Date: Tue, 24 Sep 2019 15:57:55 +0200 Subject: j emacs: set up function key binding section --- jeschli/2configs/emacs.nix | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'jeschli') diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index 396cf241d..bc9cfdb4b 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -127,12 +127,26 @@ let (global-set-key "\C-x\ \C-r" 'recentf-open-files) ''; - killActualBuffer = '' + myFunctionKeys = '' (fset 'kill-actual-buffer [?\C-x ?k return]) - (global-set-key (kbd "") 'kill-actual-buffer) + + (defun mh/open-term-and-rename (name) + "open a new bash and rename it" + (interactive "sName of new terminal: ") + (term "/run/current-system/sw/bin/bash") + (rename-buffer name) + ) + (global-set-key (kbd "M-") 'kill-actual-buffer) + + (global-set-key (kbd "") 'mh/open-term-and-rename) + (global-set-key (kbd "") 'other-window) + (global-set-key (kbd "") 'split-window-right) + (global-set-key (kbd "") 'delete-other-windows) ''; + + dotEmacs = pkgs.writeText "dot-emacs" '' ${packageRepos} @@ -147,7 +161,7 @@ let ${windowCosmetics} ${orgAgendaView} - ${killActualBuffer} + ${myFunctionKeys} ''; emacsWithCustomPackages = (pkgs.emacsPackagesNgGen pkgs.emacs).emacsWithPackages (epkgs: [ @@ -181,7 +195,7 @@ let epkgs.melpaPackages.smex epkgs.melpaPackages.org-mime - epkgs.melpaPackages.which-key + epkgs.elpaPackages.which-key ]); myEmacs = pkgs.writeDashBin "my-emacs" '' -- cgit v1.2.3