justinmk / vim-sneak

The missing motion for Vim :athletic_shoe:
http://www.vim.org/scripts/script.php?script_id=4809
MIT License
3.26k stars 88 forks source link

option to disable all syntax highlighting while active #235

Closed yashamon closed 4 years ago

yashamon commented 5 years ago

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.

justinmk commented 5 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.

yashamon commented 5 years ago

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:

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 .

yashamon commented 5 years ago

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:

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 .