liquidz / vim-iced

Clojure Interactive Development Environment for Vim8/Neovim
https://liquidz.github.io/vim-iced/
MIT License
518 stars 35 forks source link

Can't evaluate forms when they are folded #295

Open kkharji opened 3 years ago

kkharji commented 3 years ago

Hey @liquidz, is it possible to fix this. iced-vim-issue

Thanks

liquidz commented 3 years ago

@tami5 Oh, nice catch! I'll have a look, but it may not be easy I think

liquidz commented 3 years ago

It may be fixed by using getline instead of visual mode.

liquidz commented 3 years ago

@tami5 Could you try dev branch? It may be fixed (WIP)

liquidz commented 3 years ago

Oh, had broken. sorry I fixed but it may be buggy yet.

liquidz commented 3 years ago

a45e9f1 is breaking IcedFormat command...

kkharji commented 3 years ago

Works well for me. I think that fixes this issue. Thanks so much @liquidz

liquidz commented 3 years ago

@tami5 Sorry a45e9f1 moves to bugfix/eval-folded-code branch once, and I reverted dev branch.

a45e9f1 breaks processes which depends on gv, so I'll look for another solution...

liquidz commented 3 years ago

I'll try to use vim-sexp's af text object https://github.com/guns/vim-sexp/blob/master/doc/vim-sexp.txt#L72

kkharji commented 3 years ago

Thats nice. Thanks @liquidz

liquidz commented 3 years ago

@tami5 I force updated bugfix/eval-folded-code branch.

It seems work well for now, but I'll continue to test more.

liquidz commented 3 years ago

Hmm.. af text object is 4x slower than current process on large code base 😢 I cannot merge to master / dev with this performance.

Current workaround is to overwrite <Leader>et mapping as follows.

nmap <Leader>et <Plug>(iced_eval)<Plug>(sexp_outer_top_list)``

This mapping is using a feature as same as af text object, so as I said, it canbe slow on large code base.