This primarily affects me when I open clojure files and don't connect to cider/nREPL—usually just a quick edit.
I have this autocommand setup for clojure files
" ~/.vim/after/ftplugin/clojure.vim
augroup CljRequire
" can't use au! here because it would clear the group entirely
au! * <buffer>
au BufWritePost <buffer> silent! Require!
augroup END
It nicely :Require!s files for me when I save them (I'm thinking about taking off the bang, though, since that can be slow when requiring reloads, e.g., jetty...).
When I'm not connected, though, it has the side-effect of taking my cursor to the top of the file, which is very annoying. I can't replicate this behavior with any other :silent! command, and if I do :Require! myself (no silent), it doesn't happen.
TL;DR running :silent! Require! (manually or otherwise) when not connected takes my cursor to the top of the file. Can this get fixed?
If you need help troubleshooting (e.g., because you can't replicate this locally), let me know. I'm happy to try things out.
This primarily affects me when I open clojure files and don't connect to cider/nREPL—usually just a quick edit.
I have this autocommand setup for clojure files
It nicely
:Require!
s files for me when I save them (I'm thinking about taking off the bang, though, since that can be slow when requiring reloads, e.g., jetty...).When I'm not connected, though, it has the side-effect of taking my cursor to the top of the file, which is very annoying. I can't replicate this behavior with any other
:silent!
command, and if I do:Require!
myself (nosilent
), it doesn't happen.TL;DR running
:silent! Require!
(manually or otherwise) when not connected takes my cursor to the top of the file. Can this get fixed?If you need help troubleshooting (e.g., because you can't replicate this locally), let me know. I'm happy to try things out.