3

I was just started with Vim. While experimenting with basic customization techniques, it began to behave differently.

Somehow the default configurations changed to very basic for both GVim and terminal version.

  • No syntax highlighting.
  • Links are shown in bars ( |example| ).
  • No mouse support (for terminal version only).

Currently both .vimrc and .gvimrc files are empty and it was the same when it worked without issues. I think I can change them by editing them. But I wonder how did this happen.

I am using Gnome on debian 4.19. I tried reinstalling both Vim and GVim. It didn't work.

Any help would be highly appreciated.

8
  • 1
    the files and environment variables vim reads at startup are documented in :h startup - i suggest double-checking that those mentioned in steps 1 and 3 are in their default state
    – ngn
    Nov 13, 2019 at 14:43
  • 1
    btw, links in vimdoc files are written with bars around them but syntax highlighting conceals the bars :) for mouse support in the terminal you may need to :set mouse=a. also, please check that your version of vim was compiled with the necessary features - :ve should list +syntax and +mouse in its output. debian has several vim packages compiled with different flags.
    – ngn
    Nov 13, 2019 at 14:55
  • 2
    "Empty .vimrc" is not the same as "no .vimrc". Delete it, and you'll get your syntax and mouse back (hint: this is in defaults.vim).
    – Matt
    Nov 13, 2019 at 15:37
  • 1
    Very, very related
    – D. Ben Knoble
    Nov 13, 2019 at 17:32
  • 1
    @Anees np! Glad you got the answers you were looking for.
    – D. Ben Knoble
    Nov 13, 2019 at 18:01

1 Answer 1

3

Empty .vimrc is not the same as no .vimrc. Once I deleted it, it worked fine as before.

Thanks to @Matt

1
  • 4
    Usually one wants to have own .vimrc, so it often makes sense to include those "advanced" defaults manually by adding the line runtime defaults.vim on top of .vimrc, and then twiddling them a bit. Deleting the whole .vimrc certainly also works, but is a bit of a radical measure.
    – Matt
    Nov 13, 2019 at 16:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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