Skip to content

Use <ESC> key instead of <C-o> in accepting changes#89

Open
jagd wants to merge 1 commit intoggml-org:masterfrom
jagd:patch-1
Open

Use <ESC> key instead of <C-o> in accepting changes#89
jagd wants to merge 1 commit intoggml-org:masterfrom
jagd:patch-1

Conversation

@jagd
Copy link
Copy Markdown

@jagd jagd commented Oct 31, 2025

After testing a few days, #38 seems to be solved with this commit. The previous way might rely on the UI response time.

After using a few days, ggml-org#38 seems to be solved with this commit.
The previous <C-o> way might rely on the UI response time.
@ggerganov
Copy link
Copy Markdown
Member

Are you using NeoVim? I just tested with classic Vim and this change breaks the accept - it does not work. For example, pressing tab simply inputs a tab instead of accepting.

@jagd
Copy link
Copy Markdown
Author

jagd commented Nov 2, 2025

Are you using NeoVim? I just tested with classic Vim and this change breaks the accept - it does not work. For example, pressing tab simply inputs a tab instead of accepting.

I tested on NeoVim v0.11.4 and Vim 9.1 (included patches: 1-1841). Both are working as expected.

@nolsto
Copy link
Copy Markdown

nolsto commented Nov 21, 2025

I won't claim to understand why, but using <C-\><C-O> instead of <C-O> in the insert mappings seems to prevent the problem in #38 (in my case, caused by a conflict with ALE autocomplete).

    " setup accept shortcuts
    exe 'inoremap <buffer> ' . g:llama_config.keymap_accept_full . ' <C-\><C-O>:call llama#fim_accept(''full'')<CR>'
    exe 'inoremap <buffer> ' . g:llama_config.keymap_accept_line . ' <C-\><C-O>:call llama#fim_accept(''line'')<CR>'
    exe 'inoremap <buffer> ' . g:llama_config.keymap_accept_word . ' <C-\><C-O>:call llama#fim_accept(''word'')<CR>'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants