Skip to content

Commit

Permalink
chat syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
madox2 committed Mar 5, 2023
1 parent 4ff3a42 commit 1cc7f4d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
Binary file modified demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ftdetect/aichat.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
autocmd BufNewFile,BufRead *.aichat setfiletype aichat
1 change: 1 addition & 0 deletions plugin/vim-ai.vim
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ function! ScratchWindow()
setlocal buftype=nofile
setlocal bufhidden=hide
setlocal noswapfile
setlocal ft=aichat
endfunction

function! AIRun(...) range
Expand Down
5 changes: 5 additions & 0 deletions syntax/aichat.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
syntax match aichatRole ">>> system"
syntax match aichatRole ">>> user"
syntax match aichatRole "<<< assistant"

highlight default link aichatRole Comment

0 comments on commit 1cc7f4d

Please sign in to comment.