0

This question already has an answer here:

Evidently Ubuntu 18.10 is using a new version of vim ( 8.0.1766 ) which gives cool defaults I really like ( immediately jump to search matches while I type in more characters when doing a :/mysearchhere ) however once I create a new file

vi ~/.vimrc

and give it

set ts=4

that new vim behavior goes away - how to keep new defaults yet define the tab size ? I use no custom vim settings at all on a fresh Ubuntu 18.10 install

apt-cache policy vim
vim:
  Installed: 2:8.0.1766-1ubuntu1
  Candidate: 2:8.0.1766-1ubuntu1

after I delete ~/.vimrc those new default behaviors return

marked as duplicate by jamessan, Community Dec 5 '18 at 17:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

Seems like Vim now has some defaults.vim located at $VIMRUNTIME. It is loaded only if user doesn't have ~/.vimrc file. If you wan't to keep those defaults you can probably add something like this to the beggining of your ~/.vimrc

if filereadable("$VIMRUNTIME/defaults.vim")
    source $VIMRUNTIME/defaults.vim
endif

Not the answer you're looking for? Browse other questions tagged or ask your own question.