Learn Docker With My Newest Course

Dive into Docker takes you from "What is Docker?" to confidently applying Docker to your own projects. It's packed with best practices and examples. Start Learning Docker →

Avoiding Insert Delay Related Problems around Deleting with Vim & tmux

blog/cards/avoiding-insert-delay-related-problems-around-deleting-with-vim-and-tmux.jpg

I had a problem with accidentally deleting lines when using the mouse with Vim. It turns out it was due to misconfiguring things a bit.

Quick Jump: Demoing the Issue & Fixing It with 2 Config Settings

A few months ago I added a couple of settings to my .vimrc and tmux.conf files which caused an issue where you could easily end up deleting paragraphs or lines from a file without control. It happened to me multiple times a day.

I recently was able to pin point the problem and the video below explains how the problem came into existence and what I changed to fix it. The fix has been pushed to my dotfiles repo on GitHub.

Demoing the Issue & Fixing It with 2 Config Settings

Timestamped Table of Contents

  • 1:09 – Vim will happily delete points between your cursor and where you mouse click
  • 2:35 – Attempting to fix the problem by tinkering with things until it worked
  • 4:29 – Why I even added NoInsertKeycodes to my vimrc in the first place
  • 6:45 – Things started to work after adjusting a tmux option for escape-time
  • 7:40 – I have not experienced the problem again in 9+ days, I think it works
  • 8:11 – Are you a Vim wizard? Let me know in the comments why this happened

Can you explain why things work now? Let me know below.

Never Miss a Tip, Trick or Tutorial

Like you, I'm super protective of my inbox, so don't worry about getting spammed. You can expect a few emails per month (at most), and you can 1-click unsubscribe at any time. See what else you'll get too.



Comments