1

Using Ubuntu Bionic (server image pre-GA), coming from Centos 7 (i.e. this may not be limited to just Bionic), I find that the vim editor has some very annoying defaults. How can I disable the following;

  1. Auto-tab insertion in bash code when using if and pressing enter
  2. Search with '/' requires one to press enter to go back to editing mode and pressing something else - like cursor right - swaps back to the original location instead of the location where one is at.

Both these do not feel like standard/default vim

dpb
  • 6,989
  • 1
  • 34
  • 60
Roel Van de Paar
  • 676
  • 7
  • 21
  • 1
    [Ubuntu Development version / How to participate](https://askubuntu.com/questions/1018033/ubuntu-development-version-how-to-participate) – sudodus Apr 21 '18 at 05:43
  • @sudodus That's useful information in general, but if you're suggesting that this particular question should be closed this near to the release of 18.04, I don't think that's the case. Note that [we do not actually regard all Ubuntu+1 questions as off-topic](https://meta.askubuntu.com/questions/871/when-are-questions-about-ubuntu1-appropriate). I don't think this question is about a bug, and the behavior it is asking about [is not going to change before the release](https://wiki.ubuntu.com/FeatureFreeze). – Eliah Kagan Apr 21 '18 at 10:45
  • @EliahKagan, I see your point, and I agree. (I did not vote for closing.) – sudodus Apr 21 '18 at 15:25
  • I think this may be a bug or shortcoming in Bionic only, unrelated to VIM. ref discussion below. Also, does a feature freeze mean there are no more code changes, even if there are bugs? – Roel Van de Paar Apr 27 '18 at 07:52

1 Answers1

2

I found the answer in another thread

Open ~/.vimrc and add this;

:set nocompatible

This fixes all 3 issues to how they were in 17.10:

  1. No more odd reactions when you search with '/'
  2. No more odd tab/space inserts when editing
  3. No more odd character inserts when using arrow keys in edit mode

I believe this to be a bug in Ubuntu Bionic, at least in the pre-GA release.

dpb
  • 6,989
  • 1
  • 34
  • 60
Roel Van de Paar
  • 676
  • 7
  • 21