Created
February 3, 2022 16:13
-
-
Save PeterRincker/7aba145d3c93b94ce97862ec2bcbd7ff to your computer and use it in GitHub Desktop.
Revisions
-
PeterRincker created this gist
Feb 3, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ " keep star from jumping nnoremap <script> <silent> <expr> * <SID>JustHighlight('*') function! s:JustHighlight(cmd) " still messes up ' mark let s:JustHighlight_view = winsaveview() augroup just_hightlight autocmd! autocmd CursorMoved <buffer> \ execute "autocmd! just_hightlight" | \ keepjumps call winrestview(s:JustHighlight_view) augroup END call timer_start(1, {-> execute('silent doautocmd CursorMoved')}) return a:cmd endfunction