From: Hiroshi Shirosaki Date: Fri, 15 Dec 2017 04:31:17 +0000 (+0900) Subject: Merge pull request #312 from memeplex/namedanchor X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/a4c57c4b032a660fed80f72a8106dab145a3b0f3?ds=inline;hp=-c Merge pull request #312 from memeplex/namedanchor Follow named anchors with ge --- a4c57c4b032a660fed80f72a8106dab145a3b0f3 diff --combined README.md index 0d03b34,e01ccc3..ca7eef2 --- a/README.md +++ b/README.md @@@ -150,13 -150,6 +150,13 @@@ To disable conceal regardless of `conce let g:vim_markdown_conceal = 0 ``` +To disable math conceal with LaTeX math syntax enabled, add the following to your `.vimrc`: + +```vim +let g:tex_conceal = "" +let g:vim_markdown_math = 1 +``` + ### Fenced code block languages You can use filetype name as fenced code block languages for syntax highlighting. @@@ -174,6 -167,37 +174,37 @@@ This will cause the following to be hig Default is `['c++=cpp', 'viml=vim', 'bash=sh', 'ini=dosini']`. + ### Follow named anchors + + This feature allows ge to follow named anchors in links of the form + `file#anchor` or just `#anchor`, where file may omit the `.md` extension as + usual. Two variables control its operation: + + ```vim + let g:vim_markdown_follow_anchor = 1 + ``` + + This tells vim-markdown whether to attempt to follow a named anchor in a link or + not. When it is 1, and only if a link can be split in two parts by the pattern + '#', then the first part is interpreted as the file and the second one as the + named anchor. This also includes urls of the form `#anchor`, for which the first + part is considered empty, meaning that the target file is the current one. After + the file is opened, the anchor will be searched. + + Default is `0`. + + ```vim + let g:vim_markdown_anchorexpr = "'<<'.v:anchor.'>>'" + ``` + + This expression will be evaluated substituting `v:anchor` with a quoted string + that contains the anchor to visit. The result of the evaluation will become the + real anchor to search in the target file. This is useful in order to convert + anchors of the form, say, `my-section-title` to searches of the form `My Section + Title` or `<>`. + + Default is `''`. + ### Syntax extensions The following options control which syntax extensions will be turned on. They are off by default. @@@ -237,7 -261,7 +268,7 @@@ let g:vim_markdown_new_list_item_inden ### Do not require .md extensions for Markdown links -If you want to have a link like this `[link text](link-url)` and follow it for editing in vim using the "ge" command, but have it open the file "link-url.md" instead of the file "link-url", then use this option: +If you want to have a link like this `[link text](link-url)` and follow it for editing in vim using the `ge` command, but have it open the file "link-url.md" instead of the file "link-url", then use this option: ```vim let g:vim_markdown_no_extensions_in_markdown = 1 @@@ -248,7 -272,7 +279,7 @@@ Normal behaviour would be that vim-mark ### Auto-write when following link -If you follow a link like this `[link text](link-url)` using the "ge" shortcut, this option will automatically save any edits you made before moving you: +If you follow a link like this `[link text](link-url)` using the `ge` shortcut, this option will automatically save any edits you made before moving you: ```vim let g:vim_markdown_autowrite = 1