How to avoid exposing secret information in vimrc when clicking on Github

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

But there are some problems. In the vimrc file, I put some secret information to use some plugins.

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

let twitvim_login = "user:pass"

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

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

+5
source share
1 answer

Create a file named .secretpassand add

let twitvim_login = "user: pass"

.vimrc do;

source .secretpass
+14

All Articles