diff --git a/config/zsh/.zshrc b/config/zsh/.zshrc index a2f5464..da26029 100644 --- a/config/zsh/.zshrc +++ b/config/zsh/.zshrc @@ -194,6 +194,14 @@ fs_setup_zle() { zle accept-line } + # Open nvim, preserving the current command line. + zle -N fs_zle_open_nvim + fs_zle_open_nvim() { + zle push-line + BUFFER="nvim" + zle accept-line + } + autoload edit-command-line && zle -N edit-command-line # from zshcontrib ############################# @@ -211,7 +219,7 @@ fs_setup_zle() { # ^r history search using fzf # ^t paste file/directory using fzf bindkey -M viins '^u' kill-whole-line - bindkey -s '^v' '^unvim\r' + bindkey -M viins '^v' fs_zle_open_nvim bindkey -M viins '^x^e' edit-command-line bindkey -M viins '^y' yank