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". ;-) Best regards, Tony. -- -- 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/CAJkCKXui8FaqWVYPh%2BUcRb%3DiGNue030O%2BZxQzYY8uorc8b_5wg%40mail.gmail.com.
# HG changeset patch # Parent 7745177f87310d64807e8d1b3f73781e223b2470 diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1123,16 +1123,18 @@ You found it, Arthur! *holy-grail* *: 6. EX commands *ex-cmd-index* *:index* This is a brief but complete listing of all the ":" commands, without mentioning any arguments. The optional part of the command name is inside []. The commands are sorted on the non-optional part of their name. tag command action ~ ------------------------------------------------------------------------------ + : (the empty or "no operation" ex-command): + do nothing (but go to a |[range]| if any) |:!| :! filter lines or execute an external command |:!!| :!! repeat last ":!" command |:#| :# same as ":number" |:&| :& repeat last ":substitute" |:star| :* execute contents of a register |:<| :< shift lines one 'shiftwidth' left |:=| := print the cursor line number |:>| :> shift lines one 'shiftwidth' right
