mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-05 23:22:25 +00:00
33 lines
1 KiB
Text
33 lines
1 KiB
Text
# universal tags
|
|
# ctags -R --options=oberon.ctags --extras=+q
|
|
|
|
--langdef=Oberon{_autoFQTag}
|
|
|
|
--map-Oberon=+.mod
|
|
--map-Oberon=+.Mod
|
|
|
|
--kinddef-Oberon=m,module,modules
|
|
--kinddef-Oberon=p,procedure,procedures
|
|
|
|
--regex-Oberon=/^\s*MODULE\s+([a-zA-Z][a-zA-Z0-9]*)\s*;/\1/m/{scope=push}
|
|
--regex-Oberon=/^\s*END\s+([a-zA-Z][a-zA-Z0-9]*)\s*\./\1/m/{scope=pop}
|
|
--regex-Oberon=/^\s*PROCEDURE\s*(\^|-)?\s*([a-zA-Z][a-zA-Z0-9]*)/\2/p/{scope=ref}
|
|
# NOTE Oberon-2 receiver procedures not supported
|
|
|
|
### using ctags with vim
|
|
# examples:
|
|
# vim -t "Compiler"
|
|
# vim -t "OPS.Get"
|
|
# vim -c ":ts Platform.Read"
|
|
#
|
|
# you need to jump to the fully qualified name, since procedure names alone
|
|
# sometimes resolve to an incorrect module. that is to say putting cursor on
|
|
# W in Platform.Write and jumping will probably not work as expected, so you
|
|
# might have to do some of these
|
|
# autocmd FileType oberon,modula2 setlocal iskeyword+=.
|
|
# select the name fully
|
|
# v 3e <C-]>
|
|
# :ta Platform.Write
|
|
# resolve ambiguities interactively
|
|
# :ts Write
|
|
# g <C-]>
|