On May 3, 10:28 am, Ben Fritz <[email protected]> wrote: > On May 2, 7:34 pm,Peng Yu<[email protected]> wrote: > > > I'm wondering where if there is any guideline in defining commands in > > vim. I've looked at index.txt. Although I could come up a command name > > and check it against index.txt, I'd like to stick to the naming > > convention in vim. Could you let me know what is the naming convention? > > The ":command" command only allows you to create names that start with > a capital letter. You cannot, therefore, either by accident or > intentionally, overwrite a built-in Vim command (with a couple of > excetpions...":Next" and ":Print" are built-in). You may accidentally > override a plugin command however. > > There is no naming convention that I am aware of. I find the easiest > way to check whether an existing command, mapping, etc. exists is to > check if there are any help entries for it.
I think there are filetype dependent commands/mappings. That is, certain commands/mappings will be available for certain file types. Even if I found a command/mapping is not available in gvim (without opening any files), will it be available for some file types? > The :help entries certainly have a naming convention. See ":help help- > context" for the conventions used. For an example, :help c_CTRL-D will > give you the help entry for the CTRL-D key combination in command-line > mode. > > -- > 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, visithttp://www.vim.org/maillist.php -- 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
