> What’s New ? <

Vim Syntax Highlighter

Bret Olsen has created the VIM plugin we have always wanted. Thanks Bret !

Homepage

Visit Bret’s project page at https://github.com/OleOaks/Mecrisp-Stellaris-VIM-Syntax-Highlighter/tree/main for all the details.

Main Features

  • Uses the SVD file for your MCU to generate most of the features below.

  • All text in your .fs code should be syntax highlighted, there should be no black/white remaining.

  • For standard Mecrisp words, type Ctrl-k to open a help file.

  • For any MCU Peripheral-Register-Bitfield words, type Ctrl-k to open a help file.

  • For any forth words you’ve defined in project .fs files, type Ctrl-] to jump to it’s definition

  • For help completing a word, type Ctrl-p. Works with all word types listed, 2, 3, and 4 above.

For users of the Bluepill, STM32F411 and STM32F051 this plugin will even open the Reference Manual PDF at the correct Register section from the Helpfile. This is a massive time saver. Because it is manually created at the moment, only the three MCU’s above have it. If you make one for your MCU, please share and I’ll add it to this page.

Note

The PDF reader selected depends on your XDG-OPEN config.

I went a different way and added the following to my ~/.vimrc. How it works is when I place the cursor on the Helpfile page number and press F8, Xpdf pops open at that page number.

nnoremap <silent> <F8> :execute ':!xpdf ../pdf/reference_manual.pdf' shellescape(expand(':<cword>')) '&'<Cr>