装配vim的语法高亮

问题描述:

默认汇编语法文件没有工作和搜索有关气体组装网络,我发现一无所知气体(AT& T公司)用于VIM语法文件。有没有人发现呢?我不能写我自己的语法文件。

The default assembly syntax file didn't work well and searching the web about gas assembly I found nothing about a gas (AT&T) syntax file for vim. Has anyone found this? I can't write my own syntax file.

FT = NASM

ft=nasm

FT = ASM(默认)

ft=asm(default)

FT = TASM

ft=tasm

这可能的让你开始。是不是更喜欢你在寻找什么?

This may get you started. Is that more like what you're looking for?

刚刚有了一个快速搜索 - ?它看起来像有一些不同类型的汇编语法高亮显示建于哪一个是您使用

Just had a quick search - it looks like there are a few different sorts of assembly syntax highlighting built in. Which one are you using?

这是复制粘贴:帮助语法

Copy-pasted from :help syntax

Currently these syntax
files are included:
    asm		GNU assembly (the default)
    asm68k		Motorola 680x0 assembly
    asmh8300	Hitachi H-8300 version of GNU assembly
    ia64		Intel Itanium 64
 fasm Flat assemlby http://flatassembler.net
    masm		Microsoft assembly (probably works for any 80x86)
    nasm		Netwide assembly
    tasm		Turbo Assembly (with opcodes 80x86 up to Pentium, and
    		MMX)
    pic		PIC assembly (currently for PIC16F84)

The most flexible is to add a line in your assembly file containing:
    :asmsyntax=nasm
Replace "nasm" with the name of the real assembly syntax.  This line must be
one of the first five lines in the file.

这额外的语法脚本是从vim.org

This additional syntax script is from vim.org

它看起来像你的屏幕截图使用默认的ASM文件类型。
尝试

It looks like your screenshot is using the default asm filetype. Try

:set ft=nasm

和你应该得到一些颜色变化根据这些截图。

and you should get some colour changes as per these screenshots.


从你上面的截图,我做了几个快速修改到FASM VIM语法并把它称为gasm。
可以发现 href=\"http://pastebin.com/f65d3943e\">上引擎收录。

From your screenshots above I've made a couple of quick modifications to the fasm vim syntax and called it gasm. It can be found here on pastebin.

复制并粘贴到你个人的.vim /语法或vimfiles /语法目录,并把它称为gasm.vim
然后在您的汇编文件:一套英尺= gasm

Copy and paste that into your personal .vim/syntax or vimfiles/syntax directory and call it gasm.vim Then in your assembly file :set ft=gasm

本Vim脚本依赖于评论是形式
    注释%
与空间包括在内。
你可以看到这个(或改变它,如果你愿意的话)对脚本的116行。

This vim script relies on comments being of the form % comment with the space included. You can see this (or change it if you wish) on line 116 of the script.

请注意:不要复制的行号

Please note: Don't copy the line numbers.