vim-mipssyntax


Ⅰ. 插件描述

MIPS Syntax file

Ⅱ. 基本信息

创建日期:  2013-04-22
使用用户:  11
Github星:  14
插件作者:  Harenome Ranaivoarivony-Razanajato

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'harenome/vim-mipssyntax'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'harenome/vim-mipssyntax'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'harenome/vim-mipssyntax'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/harenome/vim-mipssyntax

Ⅳ. 文档说明

vim-mipssyntax

MIPS Syntax file.

This is a fork of mips.vim by Alex Brick. In order to improve Alex Brick's syntax file, I processed GNU Binutils's opcodes/mips.c and include/opcode/mips.h files using grep, cut, sort and comm.

Revisions supported

This syntax file should support the following revisions of the MIPS instruction set:

  • MIPS I
  • MIPS II
  • MIPS III
  • MIPS IV
  • MIPS V
  • MIPS 32
  • MIPS 64

It also supports a few pseudo instructions such as subi or subiu and additionnal directives such as MARS's .macro, .eqv and .include directives.

Installation

Regular installation

Just put the file mips.vim in your ~/.vim/syntax folder.

Pathogen

If you're using pathogen, you can also:

cd ~/.vim/bundle
git clone git://github.com/HarnoRanaivo/vim-mipssyntax.git

Unless you are managing your vim files using git, in which case you will need to use gitmodules. Go to the root of your repository and type:

git submodule add git://github.com/HarnoRanaivo/vim-mipssyntax.git [<path to .vim/bundle>/vim-mipssyntax]

Remember you will need to init and update your submodules on your other computers:

git submodule init
git submodule update

Highlights

If you want to be able to tell the difference between actual instructions, aliases, macros and pseudo instructions, change the lines 466 to 476 to something like this, for instance:

hi def link mipsComment             Comment
hi def link mipsNumber              Number
hi def link mipsString              String
hi def link mipsLabel               Label
hi def link mipsRegister            Identifier
hi def link mipsDirective           Type
hi def link mipsInstruction         Statement
hi def link mipsAlias               PreProc
hi def link mipsMacro               PreProc
hi def link mipsPseudoInstruction   Special
hi def link mipsPseudoDirective     Special

Of course, this requires your colorscheme to set different colours for these highlights.

添加新评论