-
Notifications
You must be signed in to change notification settings - Fork 35
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
[Feature Request] Integrate caw.vim #12
Comments
Hey! There are 2 main ways that I can see how integrations might work:
When it comes to caw.vim, both options are viable. Since it uses nmap <buffer><expr> gc v:lua.context_commentstring.update_commentstring_and_run('caw:prefix')
nmap <buffer><expr> gcc v:lua.context_commentstring.update_commentstring_and_run('caw:hatpos:toggle')
nmap <buffer><expr> gci v:lua.context_commentstring.update_commentstring_and_run('caw:hatpos:comment')
nmap <buffer><expr> gcui v:lua.context_commentstring.update_commentstring_and_run('caw:hatpos:uncomment')
nmap <buffer><expr> gcI v:lua.context_commentstring.update_commentstring_and_run('caw:zeropos:comment')
nmap <buffer><expr> gcuI v:lua.context_commentstring.update_commentstring_and_run('caw:zeropos:uncomment')
nmap <buffer><expr> gca v:lua.context_commentstring.update_commentstring_and_run('caw:dollarpos:comment')
nmap <buffer><expr> gcua v:lua.context_commentstring.update_commentstring_and_run('caw:dollarpos:uncomment')
nmap <buffer><expr> gcw v:lua.context_commentstring.update_commentstring_and_run('caw:wrap:comment')
nmap <buffer><expr> gcuw v:lua.context_commentstring.update_commentstring_and_run('caw:wrap:uncomment')
nmap <buffer><expr> gcb v:lua.context_commentstring.update_commentstring_and_run('caw:box:comment')
nmap <buffer><expr> gco v:lua.context_commentstring.update_commentstring_and_run('caw:jump:comment-next')
nmap <buffer><expr> gcO v:lua.context_commentstring.update_commentstring_and_run('caw:jump:comment-prev') I just copied the mappings from the docs and I'm not sure if that definition is 100% correct. Some The other option would be to ask caw.vim maintainers to add a possibility to configure a hook, like kommentary did. Since I don't know almost anything about caw.vim, I'm not sure if they would be open to this idea, you could ask them if you'd like :) Anyways, let me know how it goes with these mappings or if there are any other questions! |
Hi @JoosepAlviste, I'm a caw.vim author. I'd like to implement caw.vim integration but I don't know how to implement a hook function in caw.vim, |
@JoosepAlviste I didn't understand well but now I understand above function changes |
Hey @tyru! How is the integration going on |
caw.vim is an excellent comment management plugin and I would like to see it integrated.
I am new to Lua, is there anything I can do to help?
https://github.com/tyru/caw.vim
The text was updated successfully, but these errors were encountered: