Re: how to delete a full word with cursor in the middle of the word?
Andreas Radke <[email protected]> Tue, 15 Nov 2022 18:36:49 +0100
| Newsgroups | gmane.editors.nano.general |
|---|---|
| Organization | ArchLinux |
| Message-ID | <20221115183649.53af798b@workstation64> |
Am Tue, 15 Nov 2022 18:03:31 +0100 schrieb Benno Schulenberg <[email protected]>: > The example given above would work here too. But if you don't want > to use --afterends, you could make a binding specific for this case: > > bind ^D "{end}{left}{chopwordleft}" main fails here missing the 2nd quote: md5sums=('20e5b706ee3201aa2741dabca824cd8b') md5sums=(') > > If the closing quote is not guaranteed to be at end-of-line, something > a little more complicated could work: > > bind ^D "{home}{whereis}'{enter}{findnext}{chopwordleft}" main This works better placing the cursor to any place from/incl () md5sums=('20e5b706ee3201aa2741dabca824cd8b') md5sums=('') but both bindings fail when placing the cursor on the leading "md5sum" not deleting md5sum but still removing the checksum itself and not the word under cursor. So this is only a special case searching the quote but fails for a more generic "delete word under cursor". -Andy
signature.asc
(application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEErcih/MFeAdRTEEGelGV6sg8qCSsFAmNzzjEACgkQlGV6sg8q CSvQBAf/W7Ds6mtO+852R9t8XgN4YuD43Ew5jq0S3Sckdno3CUSbQv14T3a73nZE etxG7rZh6eQpmfTSG/NRMxIArJ+Bw9qP958TMMAD1NTFHu2fu+tJ+EkwvAY1Jawb r2FCSwCT5McrNGDin9dJkJ8G9/OMHBcpe82AolDC9VSSs++YU4taPVnPpheyWFhd Vf/w8D9mC0UAXdMDqai5Imqoao8x3Uz2zi3OizUxoy5eWJLipVEV870LOokZ5B54 595gQfLcy7CoNXHcrBpMjsYih4Rs77GnjsQVJGQMOn2egZzPegjDIDN2LyRt71Wj UDt3GomE7M7zWF1uoqt0FnKEBaU8Vg== =W+ts -----END PGP SIGNATURE-----