*altercmd.txt*  Alter built-in Ex commands by your own ones

Version 0.0.0
Script ID: 2675
Copyright (C) 2009 kana <http://whileimautomaton.net/>
License: MIT license  {{{
    Permission is hereby granted, free of charge, to any person obtaining
    a copy of this software and associated documentation files (the
    "Software"), to deal in the Software without restriction, including
    without limitation the rights to use, copy, modify, merge, publish,
    distribute, sublicense, and/or sell copies of the Software, and to
    permit persons to whom the Software is furnished to do so, subject to
    the following conditions:

    The above copyright notice and this permission notice shall be included
    in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
}}}

CONTENTS                                        *altercmd-contents*

Introduction            |altercmd-introduction|
Interface               |altercmd-interface|
  Commands                |altercmd-commands|
  Functions               |altercmd-functions|
Bugs                    |altercmd-bugs|
Changelog               |altercmd-changelog|




==============================================================================
INTRODUCTION                                    *altercmd-introduction*

*altercmd* is a Vim plugin to provide an easy way to alternate built-in Ex
commands by user-defined Ex commands.  This plugin provides |:AlterCommand|
for this purpose.  For example, if you define :CD, a custom version of |:cd|,
add the following in your vimrc.
>
        AlterCommand cd  CD
<
With the above setting, you can use :cd as if it is :CD.  It means that :CD
will be automatically inserted if you type :cd as an Ex command, so you don't
have to type :CD to use :cd and you'll never encounter mistyping :cd and :CD.

:AlterCommand also supports partial command names.  For example, |:help| can
be invoked with :h, :he, :hel or :help.
>
        AlterCommand h[elp]  HELP
<
With the above setting, you can use :h, :he, :hel and :help as if they are
:HELP, your own version of :help.


Requirements:
- Vim 7.2 or later

Latest version:
http://github.com/kana/config/commits/vim-altercmd

Document in HTML format:
http://kana.github.com/config/vim/altercmd.html




==============================================================================
INTERFACE                                       *altercmd-interface*

------------------------------------------------------------------------------
COMMANDS                                        *altercmd-commands*

                                                *:AlterCommand*
:AlterCommand [<buffer>] {original}  {alternative}
                        Declare to use {alternative} Ex command instead of
                        {original} Ex command.

                        If <buffer> is given, this declaration is only
                        available for the current buffer.  Otherwise, this
                        declaration is available globally.

                        See also |altercmd-introduction| for examples.

                        Technically, this Ex command does just define some
                        |abbreviations| in Command-line mode.


------------------------------------------------------------------------------
FUNCTIONS                                       *altercmd-functions*

altercmd#define({original}, {alternative})      *altercmd#define()*
altercmd#define('<buffer>', {original}, {alternative})
                        Function version of |:AlterCommand|.

altercmd#load()                                 *altercmd#load()*
                        Load this plugin.  You have to call this in your vimrc
                        if you want to use |:AlterCommand| in your vimrc.




==============================================================================
BUGS                                            *altercmd-bugs*

- Not all cases are supported.  For example:

  - [range] is not supported yet.  If [range] is given, altercmd doesn't work.

  - If any argument is not given to an Ex command which has an alternative Ex
    command, altercmd doesn't work.

  - And there may be more cases where altercmd doesn't work well.




==============================================================================
CHANGELOG                                       *altercmd-changelog*

0.0.0   2009-06-14T03:47:25+09:00
        - Initial version.




==============================================================================
vim:tw=78:ts=8:ft=help:norl:fen:fdl=0:fdm=marker: