This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
brightscript [2015/09/12 21:10] dblume |
brightscript [2021/05/21 00:04] (current) |
||
|---|---|---|---|
| Line 2: | Line 2: | ||
| Here are some BrightScript tips. | Here are some BrightScript tips. | ||
| + | |||
| + | ===== tags ===== | ||
| + | |||
| + | Make [[https:// | ||
| + | |||
| + | Add this to your $HOME/ | ||
| + | |||
| + | < | ||
| + | --langdef=BrightScript | ||
| + | --langmap=BrightScript: | ||
| + | --regex-BrightScript=/ | ||
| + | --regex-BrightScript=/ | ||
| + | --regex-BrightScript=/ | ||
| + | </ | ||
| + | |||
| + | Then, run ctags from the channel' | ||
| + | |||
| + | <code bash> | ||
| + | #/bin/bash | ||
| + | set -eu -o pipefail # See: https:// | ||
| + | |||
| + | # Make the tags file at the project root | ||
| + | ctags -n --if0=yes --c++-kinds=+p --file-tags=yes -R \ | ||
| + | --links=no --extra=fq \ | ||
| + | --exclude=' | ||
| + | |||
| + | # Append to it symbols from the BrightScript SDK | ||
| + | ctags --append=yes -n --if0=yes --c++-kinds=+p --file-tags=yes -R \ | ||
| + | | ||
| + | | ||
| + | # | ||
| + | |||
| + | # Then do the tags in /source and its subdirectories | ||
| + | find . -mindepth 1 \ | ||
| + | ' | ||
| + | -or ' | ||
| + | do | ||
| + | pushd " | ||
| + | ctags -n --if0=yes --c++-kinds=+p --file-tags=yes -R \ | ||
| + | --links=no --extra=fq | ||
| + | popd 1> /dev/null | ||
| + | done | ||
| + | |||
| + | # Finally, there' | ||
| + | # find . -name tags -size -2 -mtime -1 -print | xargs rm | ||
| + | find . -name tags -size -2 -mtime -1 -delete | ||
| + | </ | ||
| + | |||
| + | ===== Sublime Text 3 ===== | ||
| On a Windows system, here's a template Sublime project: | On a Windows system, here's a template Sublime project: | ||
| Line 16: | Line 65: | ||
| }, | }, | ||
| " | " | ||
| - | " | + | " |
| }, | }, | ||
| " | " | ||
| - | " | + | " |
| } | } | ||
| } | } | ||
| Line 42: | Line 91: | ||
| </ | </ | ||
| - | ===== Syntax Highlighting | + | ==== Syntax Highlighting ==== |
| BrightScript Language Definition Bundle for Sublime Text 2 is available here: [[https:// | BrightScript Language Definition Bundle for Sublime Text 2 is available here: [[https:// | ||
| Line 55: | Line 104: | ||
| $ zip BrightScript.sublime-package BrightScript.tmbundle/ | $ zip BrightScript.sublime-package BrightScript.tmbundle/ | ||
| </ | </ | ||
| + | |||
| + | ===== Vim ===== | ||
| + | |||
| + | Add [[https:// | ||
| + | |||