20. Editor Support

20.1. Overview

ELD provides editor integration files that add syntax highlighting for ELD linker scripts and map files. The integration is currently available for Vim (version 9.1 or later).

20.2. Vim Syntax Highlighting

20.2.1. Supported File Types

The filetype-detection file recognises the following files automatically:

Pattern

Description

*.ld, *.lds, *.lcs, *.lcs.template, *.t, *.x

ELD linker scripts

*.map (first line matches # Linker)

ELD map files

To set the filetype manually inside an open Vim buffer:

:set filetype=eld

20.2.2. Installation

Copy the two Vim files into your Vim runtime directories:

cp etc/vim/eld.vim          ~/.vim/syntax/eld.vim
cp etc/vim/ftdetect_eld.vim ~/.vim/ftdetect/eld.vim

Vim resolves syntax files by filetype name (filetype=eldsyntax/eld.vim), so the filenames must be kept exactly as shown.

After copying the files, open any linker script or map file and Vim will apply syntax highlighting automatically.