[vim/vim] feat: objectscript routine detection for .mac, .int, and .inc files (PR #19805)

4 views
Skip to first unread message

Hannah Kimura

unread,
Mar 23, 2026, 5:19:39 PM (yesterday) Mar 23
to vim/vim, Subscribed

Summary

Extends *.inc,*.mac,*.int filetype detection to recognize ObjectScript Routines.

Problem

*.mac, *.int,*.inc, files currently don't detect ObjectScript Routines.

Solution

  • Updated runtime/filetype.vim
    • route *.mac to dist#ft#FTmac()
    • route *.int to dist#ft#FTint()
  • Updated runtime/autoload/dist/ft.vim (FTmac(),FTinc(),FTinc()):
    • add objectscript routine (IsObjectScriptRoutine()) (checks for routine header in first line)
    • preserve existing fallback behavior
    • add overrule options for int and mac : "g:filetype_int" and "g:filetype_mac"

Tests

Extended src/testdir/test_filetype.vim with routine detection coverage:

  • Test_inc_file()
    • add ROUTINE ... case -> objectscript_routine
    • keep existing .inc behavior checks unchanged
  • Test_int_file()
    • Intel HEX case remains hex
    • add ROUTINE ... case -> objectscript_routine
  • Test_mac_file()
    • asm-like case remains asm
    • add ROUTINE ... case -> objectscript_routine

You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/19805

Commit Summary

  • ba06434 feat(filetype): add objectscript routine detection for .mac, .int, and .inc files
  • 30eaa2d feat(filetype): add overrule for filetype_mac
  • 674db67 feat(filetype): add overrule for filetype_int
  • 9659ad1 update routine check to only check first line

File Changes

(4 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19805@github.com>

Christian Brabandt

unread,
3:52 PM (7 hours ago) 3:52 PM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19805)

thanks


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19805/c4120950609@github.com>

Christian Brabandt

unread,
4:05 PM (7 hours ago) 4:05 PM
to vim/vim, Subscribed

Closed #19805 via 25f6539.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19805/issue_event/23865778412@github.com>

Reply all
Reply to author
Forward
0 new messages