44
55[ 中文] ( ./README_cn.md )
66
7- Using the markdown-preview.vim plugin you can preview markdown on real-time
8- through a browser
7+ Using the markdown-preview.vim plugin, you can preview Markdown in real-time
8+ with a web browser.
99
10- > this plugin needs your vim to support py2/py3 features
11- > tested on windows/ubuntu14/ Mac OS X
10+ > This plugin needs your Vim to support Python 2 / Python 3 features.
11+ > Tested on Windows / Ubuntu 14 / Mac OS X.
1212
13- ### screenshot
13+ ### Screenshots
1414
15- ** markdown preview**
15+ ** Markdown preview**
1616
1717![ screenshot] ( https://cloud.githubusercontent.com/assets/5492542/15363504/839753be-1d4b-11e6-9ac8-def4d7122e8d.gif )
1818
@@ -22,11 +22,11 @@ through a browser
2222
2323### Installation
2424
25- with [ vim-plug] ( https://github.com/junegunn/vim-plug ) :
25+ With [ vim-plug] ( https://github.com/junegunn/vim-plug ) :
2626
27- add ` Plug 'iamcco/markdown-preview.vim' ` to the ` vimrc ` or ` init.vim ` file and type ` :PlugInstall `
27+ Add ` Plug 'iamcco/markdown-preview.vim' ` to the ` vimrc ` or ` init.vim ` file and type ` :PlugInstall ` .
2828
29- or with MathJax support for typesetting math:
29+ Or with MathJax support for typesetting math:
3030
3131```
3232Plug 'iamcco/mathjax-support-for-mkdp'
@@ -39,58 +39,58 @@ Plug 'iamcco/markdown-preview.vim'
3939
4040```
4141 MarkdownPreview
42- " open preview window in markdown buffer
42+ " Open preview window in markdown buffer
4343
4444 MarkdownPreviewStop
45- " close the preview window and server
45+ " Close the preview window and server
4646
4747```
48- > when MarkdownPreview command can't open preview window, you can use the
49- MarkdownPreviewStop command before using MarkdownPreview command
48+ > When ` MarkdownPreview ` command can't open the preview window, you can use the
49+ ` MarkdownPreviewStop ` command before using ` MarkdownPreview ` command.
5050
5151** Default Setting:**
5252
5353```
5454 let g:mkdp_path_to_chrome = ""
55- " path to the chrome or the command to open chrome(or other modern browsers)
56- " if set, g:mkdp_browserfunc would be ignored
55+ " Path to the chrome or the command to open chrome(or other modern browsers).
56+ " If set, g:mkdp_browserfunc would be ignored.
5757
5858 let g:mkdp_browserfunc = 'MKDP_browserfunc_default'
59- " callback vim function to open browser, the only param is the url to open
59+ " Callback Vim function to open browser, the only parameter is the url to open.
6060
6161 let g:mkdp_auto_start = 0
62- " set to 1, the vim will open the preview window once enter the markdown
63- " buffer
62+ " Set to 1, Vim will open the preview window on entering the Markdown
63+ " buffer.
6464
6565 let g:mkdp_auto_open = 0
66- " set to 1, the vim will auto open preview window when you edit the
67- " markdown file
66+ " Set to 1, Vim will automatically open the preview window when you edit a
67+ " Markdown file.
6868
6969 let g:mkdp_auto_close = 1
70- " set to 1, the vim will auto close current preview window when change
71- " from markdown buffer to another buffer
70+ " Set to 1, Vim will automatically close the current preview window when
71+ " switching from one Markdown buffer to another.
7272
7373 let g:mkdp_refresh_slow = 0
74- " set to 1, the vim will just refresh markdown when save the buffer or
75- " leave from insert mode, default 0 is auto refresh markdown as you edit or
76- " move the cursor
74+ " Set to 1, Vim will just refresh Markdown when saving the buffer or
75+ " leaving from insert mode. With default 0, it will automatically refresh
76+ " Markdown as you edit or move the cursor.
7777
7878 let g:mkdp_command_for_global = 0
79- " set to 1, the MarkdownPreview command can be use for all files,
80- " by default it just can be use in markdown file
79+ " Set to 1, the MarkdownPreview command can be used for all files,
80+ " by default it can only be used in Markdown files.
8181
8282 let g:mkdp_open_to_the_world = 0
83- " set to 1, preview server available to others in your network
84- " by default, the server only listens on localhost (127.0.0.1)
83+ " Set to 1, the preview server will be available to others in your network.
84+ " By default, the server only listens on localhost (127.0.0.1).
8585```
8686
8787** Key Mapping:**
8888
89- By default this Plugin has no mapping, if you want to has your own mapping
90- you can map the keys to ` <Plug>MarkdownPreview ` for opening markdown preview window and
91- map keys to ` <Plug>StopMarkdownPreview ` for closing the preview window
89+ By default this plugin has no mapping: if you want to have your own mappings,
90+ you can map the keys to ` <Plug>MarkdownPreview ` for opening the Markdown preview window and
91+ map keys to ` <Plug>StopMarkdownPreview ` for closing the preview window.
9292
93- Examples for mapping the ` F8 ` key to open markdown preview window and ` F9 ` key to
93+ Examples for mapping the ` F8 ` key to open Markdown preview window and ` F9 ` key to
9494close preview window:
9595
9696```
@@ -100,35 +100,35 @@ nmap <silent> <F9> <Plug>StopMarkdownPreview " for normal mode
100100imap <silent> <F9> <Plug>StopMarkdownPreview " for insert mode
101101```
102102
103- For ** OS X** users you can set the ` g:mkdp_path_to_chrome ` as below (if you use chrome ):
103+ For ** OS X** users, you can set the ` g:mkdp_path_to_chrome ` as below (if you use Chrome ):
104104
105105```
106106let g:mkdp_path_to_chrome = "open -a Google\\ Chrome"
107107" or
108108let g:mkdp_path_to_chrome = "/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome"
109109```
110- see issue [ #1 ] ( https://github.com/iamcco/markdown-preview.vim/issues/1 ) for detail
110+ See [ issue #1 ] ( https://github.com/iamcco/markdown-preview.vim/issues/1 ) for details.
111111
112112### FAQ
113113
114- Q: the firefox preview window didn't close when leave the markdown file in vim
114+ Q: The Firefox preview window didn't close when leaving the Markdown file in Vim.
115115
116- A: if you want the plugin auto close the preview window on firefox , you have to do some config :
116+ A: If you want the plugin to auto- close the preview window in Firefox , you have to do some configuration :
117117
118- 1 . open firefox
119- 2 . type ` about:config ` in the address bar and press Enter key
120- 3 . search ` dom.allow_scripts_to_close_windows ` item and set the value to ` true `
118+ 1 . Open Firefox.
119+ 2 . Type ` about:config ` in the address bar and press the ` Enter ` key.
120+ 3 . Search for ` dom.allow_scripts_to_close_windows ` and set its value to ` true ` .
121121
122- > you have to know what will happend when you do the config above
122+ > You have to know what will happen when you make the above changes.
123123
124124### Changelog
125125
126- * 2017年07月16日: add ` g:mkdp_open_to_the_world ` option
127- * 2016年11月19日: MathJax support with [ mathjax-support-for-mkdp] ( https://github.com/iamcco/mathjax-support-for-mkdp ) plugin
128- * 2016年08月28日: set the title of preview page with file name
129- * 2016年05月18日: support key mapping and new ` g:mkdp_command_for_global ` option item
130- * 2016年03月12日: new Githublike markdown styles [ markdown.css] ( https://github.com/iamcco/markdown.css ) and support task list
131- * 2016年01月24日: support display the local picture in markdown
126+ * 2017年07月16日: Add ` g:mkdp_open_to_the_world ` option.
127+ * 2016年11月19日: MathJax support with [ mathjax-support-for-mkdp] ( https://github.com/iamcco/mathjax-support-for-mkdp ) plugin.
128+ * 2016年08月28日: Set the title of preview page with filename.
129+ * 2016年05月18日: Support key mapping and new ` g:mkdp_command_for_global ` option item.
130+ * 2016年03月12日: New Github- like Markdown styles [ markdown.css] ( https://github.com/iamcco/markdown.css ) and support task list.
131+ * 2016年01月24日: Support to display the local picture in Markdown.
132132
133133### Buy Me A Coffee ☕️
134134
0 commit comments