mirror of
https://git.adityakumar.xyz/llama.cpp.git
synced 2024-11-09 15:29:43 +00:00
llm.vim : multiline autocompletion, get rid of "^@" (#2543)
This commit is contained in:
parent
e7f94d6fdc
commit
7ed8d1fe7f
1 changed files with 3 additions and 1 deletions
|
@ -18,8 +18,10 @@ function! Llm()
|
||||||
" Extract the content field from the response
|
" Extract the content field from the response
|
||||||
let content = json_decode(response).content
|
let content = json_decode(response).content
|
||||||
|
|
||||||
|
let split_newlines = split(content, '\n', 1)
|
||||||
|
|
||||||
" Insert the content at the cursor position
|
" Insert the content at the cursor position
|
||||||
call setline(line('.'), getline('.') . content)
|
call setline(line('.'), [ getline('.') . split_newlines[0] ] + split_newlines[1:])
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
command! Llm call Llm()
|
command! Llm call Llm()
|
||||||
|
|
Loading…
Reference in a new issue