From 4f1851c50912ce9f8cd8d7c963d3a1eaf5ce287e Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Mon, 28 Dec 2020 22:36:29 -0600 Subject: [PATCH] Add Remove The Delay On The Escape Key as a tmux til --- README.md | 3 ++- tmux/remove-the-delay-on-the-escape-key.md | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 tmux/remove-the-delay-on-the-escape-key.md diff --git a/README.md b/README.md index 0eb6cda..6026dae 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ pairing with smart people at Hashrocket. For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud). -_985 TILs and counting..._ +_986 TILs and counting..._ --- @@ -883,6 +883,7 @@ _985 TILs and counting..._ - [Paging Up And Down](tmux/paging-up-and-down.md) - [Pane Killer](tmux/pane-killer.md) - [Reclaiming The Entire Window](tmux/reclaiming-the-entire-window.md) +- [Remove The Delay On The Escape Key](tmux/remove-the-delay-on-the-escape-key.md) - [Rename The Current Session](tmux/rename-the-current-session.md) - [Reset An Option Back To Its Default Value](tmux/reset-an-option-back-to-its-default-value.md) - [Show The Current Value For An Option](tmux/show-the-current-value-for-an-option.md) diff --git a/tmux/remove-the-delay-on-the-escape-key.md b/tmux/remove-the-delay-on-the-escape-key.md new file mode 100644 index 0000000..854c58a --- /dev/null +++ b/tmux/remove-the-delay-on-the-escape-key.md @@ -0,0 +1,19 @@ +# Remove The Delay On The Escape Key + +By default, tmux imposes a 500ms delay on presses of the escape key. This is in +case the escape key is used as part of a tmux key binding. + +I don't use the escape key for any of my tmux key bindings, but I do use the +escape key quite in other contexts, like Vim. + +The 500ms delay on the escape key being registered in contexts like Vim is +annoying at best. This delay can be removed by overriding the `escape-time` +option. + +``` +set -sg escape-time 0 +``` + +Adding this line to your `~/.tmux.conf` file will set the delay to 0ms. The +`-s` and `-g` flags set the option for the _server_ and the _global server_ +contexts respectively.