topher
VIM error

I recently started working on a Liquid Web staging server. I’m a shell kind of guy, so I immediately set up SSH and logged in. As soon as I started editing files I knew I needed to get my .vimrc file set up. I opened one up, put my stuff in, and went to quit and save and it said

".vimrc" E212: Can't open file for writing

Deep down I knew that I probably wasn’t going to get what I wanted, but I hit up the support chat. The person I talked to didn’t know much about it, but registered a support ticket and escalated it.

This morning I got an email that said, alas, we can’t make any files in our home directory. I can either make them in the html directory (where WordPress lives, I don’t want that) or the nginx directory, which is just a place I could put arbitrary nginx config files.

That was a no-brainer, so I dropped my .vimrc file in the nginx folder. Then I read up on side loading a .vimrc file, it goes like this:

vim -u ~/nginx/.vimrc

But I don’t want to write that every time I’m editing a file, so I just make an alias in .bashrc. But guess what I can’t edit because it’s in my home dir? You betcha.

So I made another file in ~/nginx called .bashrc. I put my alias in there, and now when I log in the first thing I do is

source nginx/.bashrc

Then everything gets set the way I like it with one command.

I did make an official request for the to make some mechanism for us to have a script run on login, we’ll see where that goes.

Leave a Reply

Your email address will not be published.