Black Friday Course Sales, Save 50%!

Ready to learn Flask and Docker this year? This deal applies to Build a SAAS App with Flask and Dive into Docker, it's available for .

Remapping x, X and Del in Vim to Not Overwrite Your Clipboard


A few remappings that let you delete characters or a selection of characters, although it does change the default behavior of Vim.

Quick Jump: Demo Video

Deleting 1 or more characters without wanting them to overwrite what’s in my clipboard is something I do many times a day. It’s pretty easy to remap what Vim provides by default to do this. This 3 minute video shows how it works and how to do it.

Demo Video

Vim Configuration

noremap x "_x
noremap X "_x
noremap <Del> "_x


  • 0:09 – Going over how the remappings work in Vim
  • 0:56 – Checking out the remappings in Vim
  • 2:02 – The remappings work with visual selection mode too
  • 2:19 – This does change a default behavior of Vim

Are you going to use these remappings in your vimrc? 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.