{"action":"created","issue":{"url":"https://api.github.com/repos/yochiyochirb/vimrc/issues/13","repository_url":"https://api.github.com/repos/yochiyochirb/vimrc","labels_url":"https://api.github.com/repos/yochiyochirb/vimrc/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/yochiyochirb/vimrc/issues/13/comments","events_url":"https://api.github.com/repos/yochiyochirb/vimrc/issues/13/events","html_url":"https://github.com/yochiyochirb/vimrc/issues/13","id":155485288,"number":13,"title":"install vim-wakatime","user":{"login":"ta1kt0me","id":1412864,"avatar_url":"https://avatars.githubusercontent.com/u/1412864?v=3","gravatar_id":"","url":"https://api.github.com/users/ta1kt0me","html_url":"https://github.com/ta1kt0me","followers_url":"https://api.github.com/users/ta1kt0me/followers","following_url":"https://api.github.com/users/ta1kt0me/following{/other_user}","gists_url":"https://api.github.com/users/ta1kt0me/gists{/gist_id}","starred_url":"https://api.github.com/users/ta1kt0me/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ta1kt0me/subscriptions","organizations_url":"https://api.github.com/users/ta1kt0me/orgs","repos_url":"https://api.github.com/users/ta1kt0me/repos","events_url":"https://api.github.com/users/ta1kt0me/events{/privacy}","received_events_url":"https://api.github.com/users/ta1kt0me/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-18T12:09:07Z","updated_at":"2016-05-18T13:58:19Z","closed_at":null,"body":"[wakatime/vim-wakatime](https://github.com/wakatime/vim-wakatime) を入れたいのですが、データが送られて困る人もいそうなので、有効無効を切り替えられる用にしようと思っています。なのでデフォルトは無効。\r\n\r\n特定のpluginの有効無効の切り替えで以下の方法を考えています。どちらがいいか or 別の案があれば意見下さい🐵 \r\n\r\nA. 環境変数を使う\r\n```\r\n# exec vim\r\n$ ENABLE_WATATIME=1 vim\r\n\r\n# .vimrc\r\nif $ENABLE_WATATIME == 1\r\n  Plug 'wakatime/vim-wakatime'\r\nendif\r\n```\r\n\r\nB. フラグ用のファイルを用意する\r\n```\r\n# .vimrc.env\r\nlet g:enable_wakatime = 1 # if no use, comment out this line\r\n\r\n# .vimrc\r\nsource .vimrc.env # first line\r\n...\r\nif exists(\"g:enable_wakatime\")\r\n  Plug 'wakatime/vim-wakatime'\r\nendif\r\n\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/yochiyochirb/vimrc/issues/comments/220034203","html_url":"https://github.com/yochiyochirb/vimrc/issues/13#issuecomment-220034203","issue_url":"https://api.github.com/repos/yochiyochirb/vimrc/issues/13","id":220034203,"user":{"login":"ta1kt0me","id":1412864,"avatar_url":"https://avatars.githubusercontent.com/u/1412864?v=3","gravatar_id":"","url":"https://api.github.com/users/ta1kt0me","html_url":"https://github.com/ta1kt0me","followers_url":"https://api.github.com/users/ta1kt0me/followers","following_url":"https://api.github.com/users/ta1kt0me/following{/other_user}","gists_url":"https://api.github.com/users/ta1kt0me/gists{/gist_id}","starred_url":"https://api.github.com/users/ta1kt0me/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ta1kt0me/subscriptions","organizations_url":"https://api.github.com/users/ta1kt0me/orgs","repos_url":"https://api.github.com/users/ta1kt0me/repos","events_url":"https://api.github.com/users/ta1kt0me/events{/privacy}","received_events_url":"https://api.github.com/users/ta1kt0me/received_events","type":"User","site_admin":false},"created_at":"2016-05-18T13:58:19Z","updated_at":"2016-05-18T13:58:19Z","body":"> Git 管理できたならオプション扱いのプラグインはデフォルトは全部無効 (コメント状態) で、有効にするときだけアンコメントするようにしたい (# if no use, comment out this line とあるので多分逆を想定しているかなと)\r\n\r\n👍  git管理 + 有効にしたいときだけアンコメント賛成です。\r\n\r\n> ファイル名なにがいいかなあ\r\n\r\n`.vimrc.preset` はどうでしょう？\r\n\r\n"}}