2016-03-27 15:54 GMT+03:00 tyru <[email protected]>: > On Sun, Mar 27, 2016 at 9:23 PM, Bram Moolenaar <[email protected]> wrote: >> >> The backticks work like bars, but highlight the text as a command. I >> started doing this a year ago, so there are still lots of commands in >> bars. The idea is to use backticks where possible. > > Oh, I didn't notice that K command works for also `command` not only > |command|. thanks. > But what's the difference between backtick(`) and bar(|) ?
The message you reply to contains the answer: “The backticks work like bars, ***but highlight the text as a command***.” Good documentation is pleasant to see, so this is enough reason. Though I would rather like to see backticks have the same meaning as in markdown (i.e. quotes for inline blocks of code), and quick helpgrep shows that no matter what Bram intended to use backticks for, they are actually widely used for inline code blocks and not always as a “bar (i.e. link) with different highlighting”. Simply because a) in markdown backticks are used for inline code blocks and markdown is very popular among plugin writers, b) the result is highlighted as an inline code block as long as it does not contain spaces and c) <C-]> will work for jumping to tags no matter whether item below is surrounded by bars, backticks or nothing at all. Thus choosing bar, backtick, quote or whatever is mostly a matter of preference and also a matter of what online documentation plugin author is aware of and cares about: e.g. http://vimcommunity.bitbucket.org/doc/index.txt.html supports only `|reference|` and `'optionreference'` (highlighting is always correct because that uses Vim own highlighting directly, but), “official” documentation at http://vimdoc.sourceforge.net/htmldoc/index.html works like <C-]> (i.e. finds every word that `<C-]>` may use as a tag, even if it happens to be “as” in “using Vim as a server or client” where “as” obviously does not meant to be a link at all), there are also other locations which use different scripts for formatting documentation. > >> >> -- >> hundred-and-one symptoms of being an internet addict: >> 137. You decide to stay in college for an additional year or two, >> just so you can have the free Internet access. >> >> /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ >> /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ >> \\\ an exciting new programming language -- http://www.Zimbu.org /// >> \\\ help me help AIDS victims -- http://ICCF-Holland.org /// > > > > -- > Takuya Fujiwara > > -- > -- > You received this message from the "vim_dev" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
