Tuesday, October 15, 2019

Re: restore ^h to be the same as backspace in insert mode

On Wed, Oct 16, 2019 at 1:06 AM Tim Mooney <timothy.v.mooney@gmail.com> wrote:
>
> Hello fellow vimmers!
>
> I've been a happy vim user on Unix and later Linux since the vim 3.0 days (approximately 25 years!). I was on the vim mailing list for years, but dropped off when it moved to Google Groups in 2007. Vim has worked so comfortably and reliably for me that I haven't had any questions that couldn't be answered with a quick web search.
>
> However, a recent OS update has changed vim behavior that I've relied on for years, and I'm really struggling with how to restore the previous behavior.
>
> Specifically, in insert mode, the behavior I've used for ages is that both control-h and backspace do the same thing: move the cursor 1 character to the left and then delete the character under the new cursor position.
>
> Since the update, though, the backspace key continues to do that (move 1 left & delete) in insert mode, but control-h instead now deletes the character to the right. This has the unfortunate effect that when I'm at the end of a line of text in insert mode, if muscle memory has me press control-h with the intent of moving left and deleting the character, what I instead get is the removal of the newline after the cursor and the next line becomes joined to the current line.
>
> How do I restore the previous behavior?
>
> This changed (broke) after a round of OS updates. The updates included ncurses, vim, and other components, so it's not going to be easy to isolate which component is responsible for the change.
>
> Before the update, I was using vim 8.1.1002, after the update I'm on vim 8.1.1721
>
> The .vimrc that I've been using for the past 15 or more years looks like:
>
> set nobackup
> set ts=4 noai nohlsearch magic beautify nowrapscan wrapmargin=1
> :au VimEnter pico* set tw=74 spell spelllang=en_us
> :au VimEnter pico* set wrap
> :au VimEnter cvs* set tw=74
> :au VimEnter cvs* set wrap
> :au VimEnter *.py set ts=4 expandtab sm
> :au VimEnter *.pl set modeline ts=4 sm
>
>
> I tried adding :fixdel based on some web searches, but that didn't solve the issue. Both my control-h and backspace key are recognized just fine, it's just that now control h behavior is different than it was previously.
>
> When I'm not in vim, for example when I'm just typing at the shell (bash 5.0.11) command line, both control-h and backspace do the "move left and delete" action I would expect. stty reports:
>
> $ stty -a
> speed 9600 baud;
> rows = 41; columns = 80; ypixels = 0; xpixels = 0;
> csdata UTF-8
> eucw 1:0:0:0, scrw 1:0:0:0
> intr = ^c; quit = ^\; erase = ^?; erase2 = ^h; kill = ^u;
> eof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>;
> start = ^q; stop = ^s; susp = ^z; dsusp = ^y;
> rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
> status = ^t;
> -parenb -parodd cs8 -cstopb -hupcl cread -clocal -loblk -crtscts -crtsxoff -parext
> -ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc
> ixon -ixany -ixoff imaxbel
> isig icanon -xcase echo echoe echok -echonl -noflsh
> -tostop echoctl -echoprt echoke -defecho -flusho -pendin iexten
> opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3
>
>
>
>
> Anyone have any suggestions for what I can set to get the old behavior back?
>
> If there's additional informatio I can provide, please let me know!
>
> Thanks!
>
> Tim

You might want to check what Ctrl-V followed by Backspace and Ctrl-V
followed by Delete insert when in Insert mode, then lookup the help
for |:fixdel|

Best regards,
Tony.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJkCKXtTLFoZ6oEDqH7qc2Q4Lhun3JfMCk7dSMb0yuApyp18vw%40mail.gmail.com.

No comments: