Add private pastie #2

wants to merge 1 commit into

5 participants


Here is a quick fix to allow users to add private pasties. Simply set pastie_private to 1 in your vim config or on the fly :let pastie_private=1.


The glob in the autocmds only matches pasties that end in a number, no? Should probably broaden it to [0-9a-f].

You say you can put let pastie_private=1 in your vimrc, but you clobber it at the top of the plugin. You should wrap it in a if !exists('g:pastie_private')

I'm not a huge fan of using a global variable, but the :Pastie interface is so overloaded it's hard to come up with a better interface.


Indeed it should be [0-9a-f] so it'll be possible to edit the paste. I'm not sure how to fix this though, this is my first Vim script attempt.

Using global variable isn't the cleanest way but I don't see how else I could have done that.

Any suggestions? I'd love to update my pull request with something more decent ;)


Basically just replace all occurrences of [0-9] with [0-9a-f], and give it a spin afterwards to make sure it didn't have any unintended consequences.

If I had a better suggestion than a global variable, I would have told you :) It's the reason I didn't add support for them several years ago.


I have commited the proposed fixes that Tim suggested in


garno did you update your pull request with the changes too?


Thanks simmel. You should probably make a pull request though, since it solves an issue in the original release. Currently using yours since I'm using Vundle.

@simmel simmel referenced this pull request May 11, 2015

Add private pastie #4


Thanks @timss. While cleaning old forks I found your comment = )

@tpope tpope closed this in #4 May 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment