Skip to content
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

Allow regexp capture group in snippet. #426

Closed
plexigras opened this issue Mar 18, 2018 · 1 comment
Closed

Allow regexp capture group in snippet. #426

plexigras opened this issue Mar 18, 2018 · 1 comment

Comments

@plexigras
Copy link

plexigras commented Mar 18, 2018

snippet    .map
options     word
regexp     '\(\w\+\)s\.map$'
  .map(\0 => ${0})

so i can have things.map convert to things.map(thing => ...)

and if the whole match would be removed by default you could do even cooler things

snippet    .keys
options     word
regexp     '\(\w\+\)\.keys$'
  Object.keys(\0)

then this would convert test.keys to Object.keys(test)

@Shougo
Copy link
Owner

Shougo commented Mar 19, 2018

Sorry, I don't want to add the complex feature in neosnippet.vim.

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

No branches or pull requests

2 participants