aboutsummaryrefslogtreecommitdiff
path: root/vim/.vim/ftplugin/tic80.vim
blob: 087ccafad9d272293065f861368e51e1b4695eae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
" TIC-80: configs and bindings related to the fantasy console TIC-80
" Last Changed: 2021-01-01
" Author: Federico Igne <git@federicoigne.com>
" License: This file is placed in the public domain.

setlocal conceallevel=2
setlocal concealcursor=n

setlocal makeprg=tic80\ --skip\ --fs\ %:p:h

setlocal errorformat=\%E>[string\ \"%.%#\"]:%l:\ %m

" Load and run cartridge
nnoremap <buffer> <leader>cl :make --cmd "load %"<cr>
nnoremap <buffer> <leader>cc :make --cmd "load % & run & exit"<cr>
" Open editor in TIC-80
nnoremap <buffer> <leader>ce :make --cmd "load % & edit"<cr>
" Export cartridge
nnoremap <buffer> <leader>ct :make --cmd "load % & save %:t:r.tic & exit"<cr>
nnoremap <buffer> <leader>ch :make --cmd "load % & export html %:t:r.zip & exit"<cr>
nnoremap <buffer> <leader>cn :make --cmd "load % & export linux %:t:r & exit"<cr>