Closed yashamon closed 4 years ago
temporarily set syntax off when invoking sneak
See :help sneak-events
for events which allow you to do what you want.
However disabling/re-enabling syntax is tricky: in old versions of Vim, that's the approach used by Sneak. But it has two problems:
Also there seems to be some weird interaction with latex highlighting when more then one match is present.
Most likely that plugin is using the Vim "conceal" feature, which does not support multiple simultaneous usages. Nothing can be done.
Awesome! I don't know how to go to original syntax determined by filetype, so this is kinda a hack but worked for me:
au FileType tex autocmd User SneakLeave set syntax=tex au FileType tex autocmd User SneakEnter set syntax=text
On Sat, Jan 26, 2019 at 4:58 PM Justin M. Keyes notifications@github.com wrote:
sneak-events
See :help sneak-events for events which allow you to do what you want.
However disabling/re-enabling syntax is tricky: in old versions of Vim, that's the approach used by Sneak. But it has two problems:
197 https://github.com/justinmk/vim-sneak/issues/197
202 https://github.com/justinmk/vim-sneak/issues/202
Also there seems to be some weird interaction with latex highlighting when more then one match is present.
Most likely that plugin is using the Vim "conceal" feature, which does not support multiple simultaneous usages. Nothing can be done.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/justinmk/vim-sneak/issues/235#issuecomment-457873444, or mute the thread https://github.com/notifications/unsubscribe-auth/AGBkZmswv-SGjq8_dHDRxiVC9xZjOQqeks5vHN16gaJpZM4aUbHI .
Unfortunately this hack makes Sneak too slow. So I just disabled conceal for now.
On Sat, Jan 26, 2019 at 7:07 PM Yasha Savelyev yasha.savelyev@gmail.com wrote:
Awesome! I don't know how to go to original syntax determined by filetype, so this is kinda a hack but worked for me:
au FileType tex autocmd User SneakLeave set syntax=tex au FileType tex autocmd User SneakEnter set syntax=text
On Sat, Jan 26, 2019 at 4:58 PM Justin M. Keyes notifications@github.com wrote:
sneak-events
See :help sneak-events for events which allow you to do what you want.
However disabling/re-enabling syntax is tricky: in old versions of Vim, that's the approach used by Sneak. But it has two problems:
197 https://github.com/justinmk/vim-sneak/issues/197
202 https://github.com/justinmk/vim-sneak/issues/202
Also there seems to be some weird interaction with latex highlighting when more then one match is present.
Most likely that plugin is using the Vim "conceal" feature, which does not support multiple simultaneous usages. Nothing can be done.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/justinmk/vim-sneak/issues/235#issuecomment-457873444, or mute the thread https://github.com/notifications/unsubscribe-auth/AGBkZmswv-SGjq8_dHDRxiVC9xZjOQqeks5vHN16gaJpZM4aUbHI .
Beautiful plugin, but is there an option to temporarily set syntax off when invoking sneak? This would mean having less distraction on screen. Also there seems to be some weird interaction with latex highlighting when more then one match is present.