diff options
author | Kurtis Rader <krader@skepticism.us> | 2016-04-16 20:03:14 -0700 |
---|---|---|
committer | Kurtis Rader <krader@skepticism.us> | 2016-04-19 18:38:58 -0700 |
commit | 2f8d0e9aba3662fcb1032ffe33bc6faf2e04eb8f (patch) | |
tree | dd98834c4104f74f02d745fc2e35034f8579dd65 /share/functions/fish_vi_key_bindings.fish | |
parent | bd4622a0d01c7d882c37c46f6730567750dda657 (diff) |
add way to comment/uncomment a command
Fixes #2375
Diffstat (limited to 'share/functions/fish_vi_key_bindings.fish')
-rw-r--r-- | share/functions/fish_vi_key_bindings.fish | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/share/functions/fish_vi_key_bindings.fish b/share/functions/fish_vi_key_bindings.fish index b1fc2659..c2a40361 100644 --- a/share/functions/fish_vi_key_bindings.fish +++ b/share/functions/fish_vi_key_bindings.fish @@ -222,4 +222,12 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish' bind -M visual -m default \e end-selection force-repaint set fish_bind_mode $init_mode + + # Make it easy to turn an unexecuted command into a comment in the shell history. Also, remove + # the commenting chars so the command can be further edited then executed. + bind -M default \# __fish_toggle_comment_commandline + bind -M visual \# __fish_toggle_comment_commandline + bind -M default \e\# __fish_toggle_comment_commandline + bind -M insert \e\# __fish_toggle_comment_commandline + bind -M visual \e\# __fish_toggle_comment_commandline end |