From f16ca574620a52b1617e0953690681b809016aa4 Mon Sep 17 00:00:00 2001 From: Benjamin VAUDOUR Date: Mon, 11 Apr 2022 11:57:33 +0200 Subject: [PATCH] =?UTF-8?q?Utilisation=20de=20emacs=20comme=20=C3=A9diteur?= =?UTF-8?q?=20par=20d=C3=A9faut=20+=20raccourcis=20=C3=A0=20la=20emacs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aliases/vi.elv | 8 +++++--- rc.elv | 12 ++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/aliases/vi.elv b/aliases/vi.elv index 2ff2179..75abe6c 100644 --- a/aliases/vi.elv +++ b/aliases/vi.elv @@ -1,5 +1,6 @@ #var cmd = $e:nvim~ -var cmd = $e:kak~ +#var cmd = $e:kak~ +var cmd = $e:emacs~ edit:add-var vi~ {|@argv| $cmd $@argv } edit:add-var vb~ {|@argv| $cmd $@argv ~/.bashrc } @@ -7,6 +8,7 @@ edit:add-var vc~ {|@argv| $cmd $@argv ~/.vimrc } edit:add-var ve~ {|@argv| $cmd $@argv ~/.config/elvish/rc.elv } edit:add-var vf~ {|@argv| $cmd $@argv ~/.config/fish/config.fish } edit:add-var vp~ {|@argv| $cmd $@argv PKGBUILD } -#edit:add-var vv~ {|@argv| $cmd -R $@argv } -edit:add-var vv~ {|@argv| $cmd -ro $@argv } +#edit:add-var vv~ {|@argv| $cmd -R $@argv } # vim/nvim +#edit:add-var vv~ {|@argv| $cmd -ro $@argv } # kak +edit:add-var vv~ {|@argv| $cmd $@argv --eval '(setq buffer-read-only t)' } # emacs edit:add-var vz~ {|@argv| $cmd $@argv ~/.zshrc } diff --git a/rc.elv b/rc.elv index f02ef11..913fa75 100644 --- a/rc.elv +++ b/rc.elv @@ -18,6 +18,18 @@ set notify-bg-job-success = $false set edit:insert:binding[Tab] = { edit:completion:smart-start; edit:navigation:trigger-filter } set edit:insert:binding[Ctrl-H] = $edit:histlist:start~ +set edit:insert:binding[Ctrl-F] = $edit:move-dot-right~ +set edit:insert:binding[Ctrl-B] = $edit:move-dot-left~ +set edit:insert:binding[Ctrl-E] = $edit:move-dot-eol~ +set edit:insert:binding[Ctrl-A] = $edit:move-dot-sol~ +set edit:insert:binding[Alt-B] = $edit:move-dot-left-word~ +set edit:insert:binding[Alt-F] = $edit:move-dot-right-word~ +set edit:insert:binding[Alt-T] = $edit:transpose-word~ +set edit:insert:binding[Ctrl-T] = $edit:transpose-rune~ +set edit:insert:binding[Ctrl-P] = $edit:history:start~ +set edit:history:binding[Ctrl-P] = $edit:history:up~ +set edit:insert:binding[Ctrl-N] = $edit:history:start~ +set edit:history:binding[Ctrl-N] = $edit:history:down-or-quit~ #set edit:prompt = { go-prompt } #set edit:rprompt = { nop }