Author Topic: using nasm with Vim  (Read 16945 times)

Offline brethren

  • Jr. Member
  • *
  • Posts: 28
using nasm with Vim
« on: May 30, 2011, 08:28:22 AM »
i use Vim as my primary dev environment and for basic nasm source code the syntax highlighting is great:) theres just one problem, the nasm syntax highlighting support in Vim seems to have not been updated for some time so the more modern nasm features are highlighted as errors.

do any of you guys have a better syntax highlighting script for Vim than the one that comes with the default install?

thanks ;)
nick

Offline JoeCoder

  • Jr. Member
  • *
  • Posts: 72
  • Country: by
Re: using nasm with Vim
« Reply #1 on: May 31, 2011, 05:10:14 PM »
I don't know because I don't use Vi-like editors much but have you looked on vim.org and done a search through their scripts? Anybody who writes a vim script is more than likely going to upload it to their site.
If you can't code it in assembly, it can't be coded!

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: using nasm with Vim
« Reply #2 on: May 31, 2011, 06:18:04 PM »
Not a Vim user. Does this help any?

http://www.vim.org/scripts/script.php?script%5Fid=966

I suspect, if you don't care to become a "Vim script guru" yourself, your best bet might be to find one to update the file for you. I dug up an old "nasm.vim" - pretty incomprehensible to me. :(

We'd be glad to consult on what Nasm syntax is, and probably provide a home for such an updated file, but I doubt if anyone wants to commit to "maintaining" it.

Best,
Frank


Offline brethren

  • Jr. Member
  • *
  • Posts: 28
Re: using nasm with Vim
« Reply #3 on: May 31, 2011, 10:56:02 PM »
there is a nasm.vim script that is one of the hundreds of languages vim supports
http://www.vmunix.com/vim/lang.html

the problem is it was written back when nasm 0.98 was the state of the art, so all the modern macro features show up highlighted red because vim doesn't know of their existence. one day, if i get the time ::), i'm gonna have a bash at learning vim script to try and do this myself. i just have so many other things that i want to learn that i can't seem to find the time

anyway vims support for nasm is adequate and will do for the forseeable future:)

btw found this one which is much more modern than the one that came from the debian squeeze repos
http://code.google.com/p/vim/source/browse/runtime/syntax/nasm.vim?spec=svn5c4b2fc4f067cd04bed4fd0a13bdec7d26036d26&r=fae782ef63dd77e2130473e53a787e91297b338f
« Last Edit: May 31, 2011, 11:32:25 PM by brethren »

Offline MJaoune

  • Jr. Member
  • *
  • Posts: 94
Re: using nasm with Vim
« Reply #4 on: June 01, 2011, 06:10:30 AM »
If you gave up on vim, you can use Notepad++ (Or any IDE, even the default notepad we use works, only if the IDE have saving feature) and use a command-line to assemble it, this is the classic original way of using NASM