Sensible Deletion remapping for Vim

I often find myself in this scenario:

var testVar = "Hello World!";

Imagine that my cursor is on the !. I want to delete all the text within the double quotes. If I was at the beginning of the text at H, I could run (in Normal mode) dt" and that would delete all the text in the double quotes. Now if I want to delete from ! back, I could run dT", but there is one problem with that. Here is what is remaining:

var testVar = "!";

When deleting backwards, by default it does not delete the character that your cursor is focused on. So add this sensible remapping in your vim config.

nnoremap dT" dT"dlh
nnoremap dT' dT'dlh

If you are using nvim, and are using lua for your config, it would look something like this:

vim.api.nvim_set_keymap('n', 'dT"', 'dT"dlh', { noremap = true })
vim.api.nvim_set_keymap('n', 'dT\'', 'dT\'dlh', { noremap = true })

Now when you go to delete backwards, it will delete the character under the cursor, and place you on the left double quote or single quote.