Tony wrote:

> I just noticed that hitting : without a command name is a valid
> ex-command which does nothing (other than going to a range if there is
> one). I propose to document it, see attached patch.
> 
> The range (if present) can IIUC be any valid range, not just an
> absolute line number but also e.g. a relative line number or even a
> search command. If there is not even a range, then no error is given
> and nothing happens, just like when reading an empty line in a sourced
> script.
> 
> I don't know of what use it would be to type : with neither a range
> nor a command, but who knows? OTOH it "makes logical" what happens
> when typing :1234 (go to line 1234) or even :1000;/sometext (go to the
> first line containing "sometext" after line 1000); and IIUC the "Vim
> philosophy" is that every feature should be documented, and to my mind
> "this isn't a bug, it's a feature". ;-)

Using the range to jump to a line is documented at ":help :range".

Weirdly ":" does nothing, but ":|" prints the current line.

-- 
In Joseph Heller's novel "Catch-22", the main character tries to get out of a
war by proving he is crazy.  But the mere fact he wants to get out of the war
only shows he isn't crazy -- creating the original "Catch-22".

 /// 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    ///

-- 
-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201909022116.x82LGhAA024631%40masaka.moolenaar.net.

Raspunde prin e-mail lui