{"action":"created","issue":{"url":"https://api.github.com/repos/iamcco/markdown-preview.vim/issues/17","repository_url":"https://api.github.com/repos/iamcco/markdown-preview.vim","labels_url":"https://api.github.com/repos/iamcco/markdown-preview.vim/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/iamcco/markdown-preview.vim/issues/17/comments","events_url":"https://api.github.com/repos/iamcco/markdown-preview.vim/issues/17/events","html_url":"https://github.com/iamcco/markdown-preview.vim/issues/17","id":155425383,"number":17,"title":"能否把 s:serverStart() 和 s:serverClose() 变成全局命令？","user":{"login":"xgfone","id":2664392,"avatar_url":"https://avatars.githubusercontent.com/u/2664392?v=3","gravatar_id":"","url":"https://api.github.com/users/xgfone","html_url":"https://github.com/xgfone","followers_url":"https://api.github.com/users/xgfone/followers","following_url":"https://api.github.com/users/xgfone/following{/other_user}","gists_url":"https://api.github.com/users/xgfone/gists{/gist_id}","starred_url":"https://api.github.com/users/xgfone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xgfone/subscriptions","organizations_url":"https://api.github.com/users/xgfone/orgs","repos_url":"https://api.github.com/users/xgfone/repos","events_url":"https://api.github.com/users/xgfone/events{/privacy}","received_events_url":"https://api.github.com/users/xgfone/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-18T06:26:33Z","updated_at":"2016-05-19T02:10:16Z","closed_at":null,"body":"如果我有个文件的后缀名是 `.txt`，但内容是 Markdown，我想手动启动 Markdown Preview，但是 `s:serverStart()` 和 `s:serverClose() `是不可见的，无法完成 Preview。\r\n\r\n如果要想 Preview Markdown 的内容，该文件名必须是 `*.{md,mkd,markdown,mdown,mkdn,mdwn}`。\r\n\r\n如果 `s:serverStart()` 和 `s:serverClose() ` 是个全局命令，用户可以自由地 **`启动`** 和 **`停止`** Markdown Preview。\r\n\r\n一个样例：\r\n\r\n```vim\r\nfu! StartMarkdownPreview()\r\n\tcall s:serverStart()\r\nendfu\r\n\r\nfu! StopMarkdownPreview()\r\n\tcall s:serverClose()\r\nendfu\r\n```\r\n\r\n这样，用户就可以自定义快捷键，如：\r\n```vim\r\nnmap <F8> :call StartMarkdownPreview()<cr>\r\nnmap <F9> :call StopMarkdownPreview()<cr>\r\n```"},"comment":{"url":"https://api.github.com/repos/iamcco/markdown-preview.vim/issues/comments/220209888","html_url":"https://github.com/iamcco/markdown-preview.vim/issues/17#issuecomment-220209888","issue_url":"https://api.github.com/repos/iamcco/markdown-preview.vim/issues/17","id":220209888,"user":{"login":"xgfone","id":2664392,"avatar_url":"https://avatars.githubusercontent.com/u/2664392?v=3","gravatar_id":"","url":"https://api.github.com/users/xgfone","html_url":"https://github.com/xgfone","followers_url":"https://api.github.com/users/xgfone/followers","following_url":"https://api.github.com/users/xgfone/following{/other_user}","gists_url":"https://api.github.com/users/xgfone/gists{/gist_id}","starred_url":"https://api.github.com/users/xgfone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xgfone/subscriptions","organizations_url":"https://api.github.com/users/xgfone/orgs","repos_url":"https://api.github.com/users/xgfone/repos","events_url":"https://api.github.com/users/xgfone/events{/privacy}","received_events_url":"https://api.github.com/users/xgfone/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T02:10:16Z","updated_at":"2016-05-19T02:10:16Z","body":"It works. +1"}}