Вопрос

I use gist-vim from mattn together with gVim. Works great and everything but I don't appreciate the auth token laying around in my home directory.

So I started looking around in the plugin files and found the variable called s:configfile which the dev sets to expand('~/.gist-vim').

Which makes me believe I can include let s:configfile = expand('~/some/other/path/gist-vim') in my vimrc to change the location of my token.

But it doesn't work. Is the devs command called again when I run :Gist, so my setting gets overwritten? Just thought I need to ask before I start forking and tinkering with the code.

Это было полезно?

Решение

The .gist-vim config file name is not open for customization.

You could ask the plugin author to make it customizable.

Why can't you set the variable in your vimrc though, you may want to know. First, you need to learn about Vim's variable name namespaces, documented at :h internal-variables.

Variables prefixed with s: are variables local to a script. See :h script-variable. Thus you cannot access those from your vimrc.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top