Sunday, March 29, 2015

Re: How to get to the helppage of shiftwidth in options.txt?

On Sun, Mar 29, 2015 at 05:52:04PM -0500, Tim Chase wrote:
> On 2015-03-29 15:26, Peng Yu wrote:
> > > > When I ":help shiftwidth", I get to eval.txt. But I'd like to
> > > > get to options.txt. How to do so? Thanks.
> > >
> > > :help 'shiftwidth'
> >
> > What is the difference between with the single quote and without
> > the single quote? Where is this difference documented?

> By convention, Vim's settings are targeted in the help by putting
> single-quotes around them. If they're unique, you can find them in
> the help without the quotes, as Vim does a best-guess matching for
> substrings. Thus if you do something like

> :help formatexpr

> it will take you to the same place as

> :help 'formatexpr'

> However, as you discovered, if you leave off the single-quotes and
> some other target is found, it will take you there instead. E.g.

> :help 'list' " takes you to the help on the 'list' setting
> vs
> :help list " takes you to the help on ":list"

> So generally, if you want to find an option/setting, make sure to
> include the single-quote. The conventions are listed at

> :help help-context

> which is visible right from the first page of just typing

> :help

> You can also hit control+D to have Vim show you the potential matches
> such as

> :help list<C-D>

> which shows that there are Ex commands, settings, functions,
> build-time options, variables, and data-types all containing the
> search-term "list".

and, if you want to dive in and spend an afternoon reading up on various
things in the docs try using

:helpgrep <whatever-you're-interested-in>

with

let mapleader = ','

nnoremap <Leader>hhh :call HelpgrepScrollers()<CR>

function! HelpgrepScrollers()
silent! nmap <F6> :cnext<CR>
silent! nmap <S-F6> :cprev<CR>
echo 'helpgrep scrollers :cn and :cp mapped to F6 and S-F6'
endfunction

in your .vimrc you then hit ,hhh to map F6 and S-F6 to scroll through
the helpgrep results at your leisure

--
_|_ _ __|_|_ ._ o|
|_(_)(_)|_| ||_)||<
|

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: