gvim colorscheme looks different when I open it with sudo

Amey patil

Ok this is a weird problem. I am using gvim and I wanted to edit the gvimrc so I opened with
sudo gvim gvimrc and it looks nice but when I open it normally by typing only gvim it looks different.

This is how it looks when I start with sudo:

enter image description here

This is how it looks when I start it normally:

enter image description here

Why is this happening?

romainl

First, /usr/share/vim/ is where Vim's system-wide runtime files are stored. That directory is off-limits: you have no business adding, changing, or removing anything in there.

  1. Copy /usr/share/vim/gvimrc to its normal location:

    $ sudo cp /usr/share/vim/gvimrc ~/.gvimrc
    
  2. Remove everything you have added manually to /usr/share/vim/gvimrc in order to revert to its pristine state.

  3. Remove everything from ~/.gvimrc that you didn't put yourself back when the file was in /usr/share/vim/.

Once you are done, you should have the exact opposite of what you currently have:

  • a "nice looking" normal gvim,
  • and a "not so nice looking" sudo gvim, which should be useless anyway.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

JSON object architecture looks different when I pass it to the client side

I open a file in write multiple times, but looks like the different writes stack on each other

Stuff looks really small when I open it on my phone, how can I fix this with CSS

How do you change the default colorscheme in gvim?

MaterialTheme showing a different colorScheme

ASP.Net Identity ASPNET.ApplicationCookie looks different when I inspect it

Why does my checkboxes looks different on chrome when I accessed it on localhost?

Angular app looks different when deployed on Firebase

SVG icon looks different when included in the page

UIImage looks different when used in iOS

Plot looks different everytime i run the code

sudo vim and vim open different editors

gvim how to change exisitng colorscheme's syntax colors?

Open terminal from gVim

DjangoRestFramework browsable api looks different locally vs when deployed on server?

Maven Generated Project looks different when importing to Eclipse

User controls looks different when running the program (Visual studio 2015)

Why the SceneKit Material looks different, even when the image is the same?

HTML Page looks different when generated using JS

Font looks different when site is server over https

Neovim losing colorscheme when in tmux. All past solutions I see don't work for me

When I run sudo -i or sudo su I get an error

Why there are '~(tilde)' in every file's extention when I edited with gVIM?

How can I stop gvim from crashing when opening a file?

Where do I override EDITOR to gvim when in X?

How to use different colorscheme and syntax highlighting in vim?

How to change vim colorscheme to point to different directory

When do su and sudo use different passwords?

Can I have a different $HOME for myself as sudo?