VIM 8.2 Backspace Delete behavior - vim

I uninstalled vim 8.1 which is the available version through my package manager and installed 8.2 from source. But Backspace and Delete buttons behave in a different way in this version.
If you are in insert mode and press Backspace then it does not delete or move indentation to the left. Delete button in insert mode deletes up to the end of the current line and does not continue to the next one.
Why these changes in behavior and how do I revert to the previous one?

I looked at the docs. You need to set:
set backspace=indent,eol,start
My previous installation was vim-gtk. I suppose this package has this value set as default.
Now both backspace and delete work as before.

Related

Cmder cursor and highlight issues with Neovim

Currently in normal mode and the cursor is still just a | instead of the usual block
This doesn't change regardless of the mode, I have tried reinstalling both neovim and cmder and the same result happens regardless of the .vim file being used.
using the / command to search for the word "there" and it makes the word im searching for invisible with or without a stock config for both cmder and neovim
currently in visual select highlighting all of the text but the highlight on the text is clear/can't see it but it is working.
For all of these issues I have tried using a new .vim file and a stock cmder config and have reinstalled both and the issue still occurs, the issue doesn't happen when I use neovim through the command prompt or from powershell.
Note:
The highlight issue doesn't occur when using regular vim through cmder only with Neovim, however the cursor staying a | persists in regular vim as well.
Update with regular vim:
Regular vim is working properly with highlighting cursor and everything, the issue only happens with neovim now, if this doesn't get fixed then ill just switch to regular vim.
I've never used cmder before, but for iterm2, for example, there is a setting associated to this:
If you're on osx you can hit <⌘ + ,> to get to the preferences for the current application.

Vertical delete in IdeaVIM

In my normal VIM installation, I can select vertically with ctrl+v, move down and over however many lines, and then hit x to delete everything I've highlighted.
In IdeaVIM, doing the same thing only deletes the single character that I am highlighting with my cursor at the time.
Does anyone know how to change the IdeaVIM behavior to the regular VIM behavior?
This is fixed in IdeaVIM version 0.36, released 2014-10-14. The bug is tracked in VIM-632. Note off-by-one error tracked in VIM-501 is fixed in an upcoming release (probably will be called 0.38).

Selection automatically put into X11 clipboard - VIM

In my previous Linux install, when I selected some text in visual mode (without the mouse!), it would automatically put it in my X11 clipboard. Then I could naturally paste this text anywhere else using the mouse middle button.
With my new Linux installation, this doesn't work anymore (merely selecting text in visual mode doesn't put it in X11 clipboard anymore).
How can I get this nice feature back?
(I am not interested into the "*y or "+y solutions, which by the way don't work on my system.)
Thanks in advance!
The visual selection (v, V, or CTRL-V) can automatically be copied to the
X11 selection (* buffer).
In non-gui mode the clipboard option controls this (only supported if
+xterm_clipboard appears when you type vim --version). In gui mode
guioptions controls it.
This makes all Visual mode selections automatically go to the X11 primary
selection:
set clipboard+=autoselect
set guioptions+=a
This turns it off:
set clipboard-=autoselect
set guioptions-=a
In vim see:
help 'clipboard'
(single quotes required)
Use:
set guioptions+=a
This works with the GUI (Gvim). Reference is at :help guioptions_a.
*guioptions_a* *'go-a'*
'a' Autoselect: If present, then whenever VISUAL mode is started,
or the Visual area extended, Vim tries to become the owner of
the windowing system's global selection. This means that the
Visually highlighted text is available for pasting into other
applications as well as into Vim itself. When the Visual mode
ends, possibly due to an operation on the text, or when an
application wants to paste the selection, the highlighted text
is automatically yanked into the "* selection register.
Thus the selection is still available for pasting into other
applications after the VISUAL mode has ended.
If not present, then Vim won't become the owner of the
windowing system's global selection unless explicitly told to
by a yank or delete operation for the "* register.
The same applies to the modeless selection.
When using Vim inside gnome-terminal on Arch and Gentoo Linux this functionality just works.
When using Vim inside Konsole this does not work.
Using gvim -v will launch a terminal version of GVim where set guioptions+=a works:
any text selected within that Vim is automatically copied to Linux's selection buffer.
To paste text from the selection buffer press the middle mouse button
On my Debian I got it working after installing vim-gnome package.
A comment from pkg-vim-maintainers mailing list instructs to install either vim-gtk, vim-gnome or vim-lesstif.
With my new installation of Kali, I solved the issue above by installing vim-gtk package for gnome-terminal. The vim-gtk package changes the "-xterm_clipboard" to "+xterm_clipboard", and the problem is solved. After selecting text in vim, the text will be copied to system clipboard automatically.

Cannot delete indents nor past insertion point

When I enter insert mode, vim will not allow deleting text behind where I entered insert. Also when I use auto indent, I cannot delete the indentations that get automatically created.
I've tried a blank vimrc and even tried my own version of vim compiled from source. How can I delete properly in vim?
Are you attempting to delete them using backspace? Try :set backspace=indent,eol,start
By default you can't backspace over auto-indentation, previous edits or line breaks.
Try :set nocompatible

How can you delete old text in Insert Mode in GVIM

I've just downloaded GVIM for the PC and MacVIM for the Mac and they both have different behaviour to the VIM I was using in MSYS.
Here's the problem. I bring up a file in VIM and enter insert mode. I can no longer delete any of old text. I can insert new text and delete them just fine so I know my backspace and delete keys are working. What's even more annoying that if I move the cursor to another line and come back to my original one, the new text I've typed becomes undeletable as well.
The command line VIM allows me to delete old text in insert mode but the GUI versions do not. I've looked in the options and googled but have not come up with anything.
Does anyone know how I can make the GUI version behave like the command line version of VIM?
Check the output of
:set backspace?
It will likely say something like
backspace=indent,eol
This means you can hit backspace to delete over end of line and indent characters. To be able to delete text that was present before you went into insert mode, you need to add 'start'.
:set backspace=indent,eol,start
This is equivalent to
:set backspace=2
For more details see
:help 'backspace'
The vi in msys is just an older version of vim. (5.8.9 in msys 1.0.10). So either the defaults changed or you are using a different settings file for gvim than you are for msys.

Resources