shawjia
shawjia

Reputation: 1737

How to avoid exposing secret informations in vimrc when pushing it to Github

I created a new repository in Github to share my vimfiles.

But there's some problems. In the vimrc file, I put some secret informations there to use some plugins.

For example, to use TwitVim( a Twitter client for Vim ), I should add the following codes.

let twitvim_login = "user:pass"

So every time I want to push my vimrc to Github, I have to delete them, and then add them again.

How could I avoid this. Is there any good solution to make this easier?

Upvotes: 5

Views: 284

Answers (1)

ismail
ismail

Reputation: 47662

Create a file called .secretpass and add

let twitvim_login = "user:pass"

in that file, in your .vimrc do;

source .secretpass

Upvotes: 14

Related Questions