Syntax highlighting for DemoTape (.tape) files in Vim/Neovim.
Add to your .vimrc or init.vim:
Plug 'fnando/demotape', {'rtp': 'editors/vim'}Plugin 'fnando/demotape', {'rtp': 'editors/vim'}cd ~/.vim/bundle
git clone https://github.com/fnando/demotape.git
ln -s ~/.vim/bundle/demotape/editors/vim ~/.vim/bundle/demotape-vimCopy the files to your Vim directory:
# For Vim
cp -r editors/vim/* ~/.vim/
# For Neovim
cp -r editors/vim/* ~/.config/nvim/- Syntax highlighting for all DemoTape commands
- Support for key combinations and special keys
- String literals (single, double, and triple-quoted multiline)
- Duration values with time units
- Regular expressions
- Comments
- Set command options
Once installed, any file with a .tape extension will automatically use DemoTape syntax highlighting.
You can also manually set the filetype:
:set filetype=demotapeYou can customize the colors by overriding the highlight groups in your .vimrc:
" Example: Make commands bold
hi demotapeCommand gui=bold cterm=bold
" Example: Custom color for strings
hi demotapeString guifg=#98c379 ctermfg=114Available highlight groups:
demotapeComment- CommentsdemotapeCommand- Commands (Type, Sleep, etc.)demotapeKey- Special keys (Enter, Tab, etc.)demotapeModifier- Modifier keys (Ctrl, Alt, etc.)demotapeOperator- Operators (+ and @)demotapeOption- Set command optionsdemotapeString- String literalsdemotapeStringMulti- Multiline stringsdemotapeEscape- Escape sequencesdemotapeRegex- Regular expressionsdemotapeNumber- Integer numbersdemotapeFloat- Floating point numbersdemotapeDuration- Duration valuesdemotapeBoolean- Boolean valuesdemotapeSeparator- Separators (commas)