Closed thecontinium closed 5 years ago
I will check it later.
snoremap <silent><ESC> <ESC>:NeoSnippetClearMarkers<CR>
fixes the issue.
Hi - thanks for the suggestion.
The problem I am having is still present after adding this. Some more details:
When I trigger the snippet def-doc
with autocmd InsertLeave * NeoSnippetClearMarkers
I get this:
(defn name
"doc"
[]
)
All the markers have been cleared and I can't move/tab through the placeholders.
When I trigger the snippet def-doc
without autocmd InsertLeave * NeoSnippetClearMarkers
I get
(defn name
"<`2:doc`>"
[<`3`>]
<`0`>)
and can move/tab through the placeholders but the markers are left if I don't complete filling in all the placeholders.
But, when I trigger the try
snippet ( which does not have a first placeholder default ) with or without autocmd InsertLeave * NeoSnippetClearMarkers
I get
(try
(catch <`2:Exception`> e <`3:nil`>))
and can move/tab through the placeholders.
With autocmd InsertLeave * NeoSnippetClearMarkers
it removes the markers if I don't fill them all in as we want. Without it does not.
I would expectdef-doc
to behave the same way as the try
snippet.
Do you get this behaviour with the def-doc and try snippets ?
cheers
@thecontinium I have not reproduce your problem. You have not upload the minimal vimrc. So I will ignore your issue.
ok - cheers; let me track it down.
And please upload the reproduce instructions like this.
def-docs
<tab>
key
...All the markers have been cleared and I can't move/tab through the placeholders.
The markers are cleared when you input <ESC>
. This is feature.
ok - I’ll keep that in consideration; anything else that clears them by design ?
-- The Continium
On 15 September 2019 at 17:09:14, Shougo (notifications@github.commailto:notifications@github.com) wrote:
All the markers have been cleared and I can't move/tab through the placeholders.
The markers are cleared when you input
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Shougo/neosnippet.vim/issues/474?email_source=notifications&email_token=ACHXEBRTJG7KGPBCZWM6OFTQJX3TPA5CNFSM4IVQHQDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6XMTLY#issuecomment-531548591, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACHXEBQE6UW2KUNFGMXRGL3QJX3TPANCNFSM4IVQHQDA.
No.
With the following settings for neosnippet and deoplete & neosnippet-snippets installed:
let g:neosnippet#enable_snipmate_compatibility = 1 let g:neosnippet#enable_completed_snippet = 1 let g:neosnippet#enable_complete_done = 1 let g:neosnippet#expand_word_boundary = 1 let g:neosnippet#enable_auto_clear_markers = 1 autocmd user_events InsertLeave * NeoSnippetClearMarkers
nvim test.clj
input defn-
and pick defn-doc from the deoplete snippet popdown with <CR>
results in all the markers being cleared.
try
and pick try from the deoplete snippet popdown with <CR>
results in the markers showing
With these mappings in place:
imap <C-k>
<C-k>
<C-k>
defn-doc<C-k>
ortry<C-k>
they both expand with the markers showing as expected.
OK. I get it. Unfortunately, this is feature.
You must disable g:neosnippet#enable_complete_done
feature.
g:neosnippet#enable_complete_done
conflicts with NeoSnippetClearMarkers
.
When I set
autocmd InsertLeave * NeoSnippetClearMarkers
and I have a snippet that has a first placeholder with a default ( as in defn-doc with ${1:name} below ) all the markers are cleared.
When I have a snippet that does not have a default ( as in try with ${1} ) below there are not cleared.
I would expect them both to behave like 'try'; what would you expect ?
Cheers