Vim not syntax highlighting in sudo/root huh..

Vim not syntax highlighting in sudo/root huh..

So I had to deal with the server issue and I ssh into it. Then opened the file looked at it and wanted to change the content, I had to be on root and I noticed the syntax highlighting was off..
Here are the steps I took to check what went wrong.
Basically when I am sudo-ing the user has changed a bit. So the configuration per that user is the area of focus.
Also, there could be multiple installations and vanilla versions for the vim as well, so check which one the sudo is using

sudo which vim

I was able to locate the right vim the sudo was using and I applied that one to fix the issue

See how you would solve these known algorithm problems

Array reversal in Recurrsion

binary tree problems with solution

Find K Complementary numbers from array Java implementation

Find longest palindrom from sequence of characters

Check if there are three numbers a, b, c giving a total T from array A

Implementing tokenizer and adding tokens to the linked list

String Ordered Permutation Algorithm Problem

Finding missing numbers from billion sequential number list file

Find the pairs that makes K Complementary in the given array java solution

Check if two strings are anagrams or not

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*