Issue #34 resolved

Make warning message if ex-command does not exist

coldnew
created an issue

Hello Frank, I found you create vim-mode User Guide on emacswiki :P

Recently, I try to rewrite vim-elscreen.el (a vim-mode plugin that take elscreen as vim's tabpage) , and have a problem.

Is there a way to show an message when ex-command does not exist?

Sorry for so long time not to response your email

Comments (6)

  1. Frank Fischer repo owner

    Well, ex-mode now has a new feature of giving some additional info-message at the end of the command-line. This info-message can be set using vim:ex-set-info.

    The right function to set this message should be vim:ex-change which is called whenever the content of the ex-line is changed. This function could check whether a binding for the current command exists.

    Of course, when pressing [return] to execute a non-existing ex-command an error-message should be raised. This should by done in vim:ex-execute-command which currently just calls (ding) in case of an error.

    I appended a patch to this message which should do this though it is not tested yet.

  2. coldnew reporter
    • marked as bug

    This patch work seems ok, but it create a new bug ˊˋ

    I can't use TAB to complete commands if the first character in command does not a command

    example:

    :v Unknown command

    even press TAB, id won't show completion though we have a command call "vne"

    :S

    because s is a command, it can complete by TAB and show all commands start with 's'

  3. Frank Fischer repo owner

    The problem was the info-message which is part of the minibuffer. I disabled the info-message on completion, but this is only a quick hack.

    I think the best would be to show an info "Incomplete command" if a command completion is possible but not unique.

  4. Log in to comment