-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is visual placeholder working? #8
Comments
Hi @purpleP, did you get this to work? I am also experiencing the same issue. |
Make sure your keymap is expected |
This is the mapping I have :
But it does not seem to work. Do I need to add the default mapping as well to make the visual placeholder work? |
You keymap is only used for expand & jump while |
Yes, I've read the readme. Visually selecting then hitting the default
<C-j> mapping lets me go to insert mode.
Then after hitting tab, the VISUAL text does not get replaced with the text
that was visually highlighted before.
Not sure what I'm doing wrong.
…On Wed, 2 Oct 2019, 4:10 PM Qiming zhao ***@***.***> wrote:
You have use keymap to visual select the text first, please read Readme.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8?email_source=notifications&email_token=AGAZJB45YVTUWMEVVUYY2NLQMRJNXA5CNFSM4GTC2KHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAD5UNY#issuecomment-537385527>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGAZJBYONH4TW25QVKB7QD3QMRJNXANCNFSM4GTC2KHA>
.
|
It's not default, you need add it to your vimrc. |
```
" Use <C-l> for trigger snippet expand.imap <C-l> <Plug>(coc-snippets-expand)
" Use <C-j> for select text for visual placeholder of snippet.vmap
<C-j> <Plug>(coc-snippets-select)
" Use <C-j> for jump to next placeholder, it's default of coc.nvimlet
g:coc_snippet_next = '<c-j>'
" Use <C-k> for jump to previous placeholder, it's default of
coc.nvimlet g:coc_snippet_prev = '<c-k>'
" Use <C-j> for both expand and jump (make expand higher
priority.)imap <C-j> <Plug>(coc-snippets-expand-jump)
```
This configuration is added before the tab support mapping config which
lets me use <Ctrl-j>.
What else do I need to do to make the visual placeholder to work?
…On Wed, 2 Oct 2019, 5:12 PM Qiming zhao ***@***.***> wrote:
then hitting the default mapping lets me go to insert mode.
It's not default, you need add it to your vimrc.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8?email_source=notifications&email_token=AGAZJB4EQYVYBZOA4DBLJGLQMRQYPA5CNFSM4GTC2KHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAEDCGA#issuecomment-537407768>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGAZJB73XWSKQHZ25DZJBCTQMRQYPANCNFSM4GTC2KHA>
.
|
Don't know, can't reproduce, you can debug the plugin in chrome https://github.com/neoclide/coc.nvim/wiki/Debug-coc.nvim |
I do
vmap <tab> <Plug>(coc-snippets-expand)
, and select text visually, and then trigger the snippet. But visual placeholder is empty.The text was updated successfully, but these errors were encountered: