nus-cs2030 / 2021-s1

28 stars 48 forks source link

Vim not sourcing vimrc #19

Open CWei88 opened 4 years ago

CWei88 commented 4 years ago

Summary

My vim does not apply the vimrc settings no matter where I put the vimrc file. Settings such as tabstop is set to 8 instead of the 4 in vimrc.

Description

I have tried to put the vimrc in different folders within Ubuntu. However, no matter where I put the vimrc file. Vim does not apply the settings within .vimrc at all in vim. For example, the tabstop=4 setting in vimrc is not applied, but instead the default setting of tabstop=8 is applied

Screenshots (if any):

Slide1 Slide2 Slide3

yonggqiii commented 4 years ago

@CWei88 What are the contents of .vimrc?

CWei88 commented 4 years ago

When I access .vimrc using vim .vimrc, it is blank. I had copy and pasted from the downloaded vimrc into the vimrc file in Ubuntu, save it using both :w! and :wq! since it is a read-only file. But, when I access it again, the .vimrc file becomes blank even though I had over-written the .vimrc file

yonggqiii commented 4 years ago

@CWei88 Could you upload a screenshot of running ls -la in the home directory? It's to check what the permissions for that file are.

CWei88 commented 4 years ago

image

SkyBlaise99 commented 4 years ago

if im not wrong you have absolutely no permission on .vimrc ur vimrc should show something like -rw-r--r-- (mine) Try chmod 700 .vimrc then copy paste the content, save and quit again

CWei88 commented 4 years ago

Thanks, it worked!