From bb915b4e59695b152ae01736bdc9e1762c73d223 Mon Sep 17 00:00:00 2001 From: DustVoice Date: Sun, 16 Oct 2022 15:59:59 +0200 Subject: [PATCH] Switch to emacsclient fully with aliases and everything --- .config/fish/conf.d/env.fish | 4 +++- .config/fish/functions/em.fish | 3 +++ .config/fish/functions/ems.fish | 3 +++ .config/fish/functions/et.fish | 3 +++ .config/fish/functions/ets.fish | 3 +++ .gitconfig | 2 +- 6 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .config/fish/functions/em.fish create mode 100644 .config/fish/functions/ems.fish create mode 100644 .config/fish/functions/et.fish create mode 100644 .config/fish/functions/ets.fish diff --git a/.config/fish/conf.d/env.fish b/.config/fish/conf.d/env.fish index b6204bd..ee88de2 100644 --- a/.config/fish/conf.d/env.fish +++ b/.config/fish/conf.d/env.fish @@ -1,5 +1,7 @@ set -gx LANG "en_US.UTF-8" -set -gx EDITOR "nvim" +set -gx ALTERNATE_EDITOR "" +set -gx EDITOR "emacsclient -ut" +set -gx VISUAL "emacsclient -uc" set -gx TERMINAL "alacritty" set -gx GIT_PAGER "delta" set -gx DOOMPAGER "delta" diff --git a/.config/fish/functions/em.fish b/.config/fish/functions/em.fish new file mode 100644 index 0000000..c87f323 --- /dev/null +++ b/.config/fish/functions/em.fish @@ -0,0 +1,3 @@ +function em --wraps='emacsclient -a "" -nc' --description 'Start emacsclient (+daemon if neccessary)' + emacsclient -a "" -nc $argv; +end diff --git a/.config/fish/functions/ems.fish b/.config/fish/functions/ems.fish new file mode 100644 index 0000000..450864a --- /dev/null +++ b/.config/fish/functions/ems.fish @@ -0,0 +1,3 @@ +function ems --wraps='emacsclient -a "" -nc "/sudo:root@localhost:"' --description 'Start emacsclient (+daemon if neccessary) with sudo' + emacsclient -a "" -nc "/sudo:root@localhost:$argv"; +end diff --git a/.config/fish/functions/et.fish b/.config/fish/functions/et.fish new file mode 100644 index 0000000..8412cdb --- /dev/null +++ b/.config/fish/functions/et.fish @@ -0,0 +1,3 @@ +function et --wraps='emacsclient -a "" -t' --description 'Start emacsclient (+daemon if neccessary) in terminal mode' + emacsclient -a "" -ut $argv; +end diff --git a/.config/fish/functions/ets.fish b/.config/fish/functions/ets.fish new file mode 100644 index 0000000..b143b70 --- /dev/null +++ b/.config/fish/functions/ets.fish @@ -0,0 +1,3 @@ +function ets --wraps='emacsclient -a "" -t "/sudo:root@localhost:"' --description 'Start emacsclient (+daemon if neccessary) in terminal mode with sudo' + emacsclient -a "" -ut "/sudo:root@localhost:$argv"; +end diff --git a/.gitconfig b/.gitconfig index e68e6ae..17518f2 100644 --- a/.gitconfig +++ b/.gitconfig @@ -4,7 +4,7 @@ signingkey = 7A9CA430D426100E [core] - editor = nvim + editor = emacsclient -a "" -ut pager = delta [interactive]