Skip to content

Commit

Permalink
Edit prompts for Vim script
Browse files Browse the repository at this point in the history
  • Loading branch information
w0rp committed Sep 16, 2023
1 parent 05b59bc commit 1b5ac4e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions autoload/neural/pre_process/vim.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
" Author: w0rp <[email protected]>
" Description: Pre-processing rules for Vim script

function! neural#pre_process#vim#Process(buffer, input) abort
let a:input.prompt = 'Write Vim script syntax. '
\ . a:input.prompt
endfunction
12 changes: 12 additions & 0 deletions test/vim/pre_process/test_vim.vader
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Before:
let g:input = {'prompt': 'Do something.'}
call neural#config#Load()

After:
unlet! g:input

Given vim(An empty Vim file):
Execute(Basic Vim prompt editing should be done):
call neural#PreProcess(bufnr(''), g:input)

AssertEqual 'Write Vim script syntax. Do something.', g:input.prompt

0 comments on commit 1b5ac4e

Please sign in to comment.