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 19:04] 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 11: | Line 60: | ||
| { | { | ||
| " | " | ||
| - | "shell_cmd": " | + | "working_dir": |
| - | "working_dir": "$project_path" | + | " |
| + | " | ||
| + | }, | ||
| + | "osx": | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | } | ||
| } | } | ||
| ], | ], | ||
| Line 32: | Line 89: | ||
| ] | ] | ||
| } | } | ||
| - | |||
| </ | </ | ||
| + | |||
| + | ==== Syntax Highlighting ==== | ||
| + | |||
| + | BrightScript Language Definition Bundle for Sublime Text 2 is available here: [[https:// | ||
| + | |||
| + | Once you've git cloned the project, remove the extra git-only files, and zip it up to BrightScript.sublime-package. | ||
| + | |||
| + | < | ||
| + | $ rm TODO | ||
| + | $ rm .gitignore | ||
| + | $ rm -rf .git | ||
| + | $ cd .. | ||
| + | $ zip BrightScript.sublime-package BrightScript.tmbundle/ | ||
| + | </ | ||
| + | |||
| + | ===== Vim ===== | ||
| + | |||
| + | Add [[https:// | ||
| + | |||