DanSnow / nasm-indent.vim

NASM indent script for VIM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nasm-indent

NASM indent script for vim. Vim doesn't provide a default indent script for NASM. So here is one which follow the below rules:

  1. If a line is a label (contains :), reset its indentation.
label: ; indent level = 0
  1. If previous non-empty and not comment line is a label, increase the indenting level
label: ; indent level = 0
  mov rax, 0 ; indent level = 1
  1. Otherwise, copy the indenting level of the previous non-empty and not comment line
  mov rax, 0 ; indent level = 1
  mov rbx, 0 ; indent level = 1

Installation

With Plugin manager (recommended):

dein.vim (my favorite)

call dein#add('DanSnow/nasm-indent.vim')

Vundle

Plugin 'DanSnow/nasm-indent.vim'

vim-plug

Plug 'DanSnow/nasm-indent.vim'

Install from Source (not recommended)

Download the indent/nasm.vim and put it to the indent under your vim runtime directory.

License

MIT

About

NASM indent script for VIM

License:MIT License


Languages

Language:Vim Script 100.0%