Ⅰ. 插件描述
Music Macro Language (MML) VIM plug-in. Edit, compile, and play NES chiptunes.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'stephencelis/vim-mml'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'stephencelis/vim-mml'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'stephencelis/vim-mml'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/stephencelis/vim-mml
Ⅳ. 文档说明
# mml.vim
Edit, compile, and play chiptune music written in the
Music Macro Language (see :help mml for more information).
As simple as :MmlMake. If you'd like to make it simpler, add the following
(or similar) to your ~/.vimrc:
autocmd FileType mml nnoremap <leader>m :MmlMake<cr>Installation
I recommend using either pathogen.vim or Vundle.
Pathogen
Once pathogen.vim is installed, simply run the following commands:
% cd ~/.vim/bundle
% git clone git://github.com/stephencelis/vim-mml.gitVundle
If you're using Vundle, add the following line to your ~/.vimrc
(with the rest of your Bundle declarations):
Bundle 'stephencelis/vim-mml'Then, :source $MYVIMRC and :BundleInstall.
Dependencies
Right now, automatically playing the compiled NES Sound Format (NSF) files
requires Mac OS X and either Nestopia or Audio Overload.
Getting Started
vim secret.mml and insert the following:
#TITLE Secret!
@v0 = { 8 12 15 14 12 10 8 6 }
@v1 = { 6 5 4 3 2 1 0 }
AB @t3,20 @2 @v0 l4 o5
A g d+ < g+ > @q9 @vr1 g+2^8
B r8 f+ < a > e > @q9 @vr1 c2Then :w, :MmlMake, and...!
Related Links
- Shaun Inman made a TextMate Bundle and mirrors an excellent
MML Reference.
License
Copyright © 2012 Stephen Celis. Distributed under the same terms as Vim
itself (see :help license).