alexmurray / evil-vimish-fold

63 stars 5 forks source link

**zo** will recursively open all folders #1

Open chaozhn opened 8 years ago

chaozhn commented 8 years ago

Firstly, thanks for your effort, this plugin make me feel back to vim. I'm using spacemacs now, I installed it from MELPA, when I tried to fold my java code, I found the zo will open all folders including its child folders. For example:

public class MyClass {
    public void TestFunc() {
        int x = 1;
        int y = 1;
    }
}
  1. Move cursor to int x = 1 line, and input za to fold function Test Func()
  2. Move cursor to class MyClass line and fold this class with za
  3. Use zo to unfold class MyClass, the folder Test Func() will be opened at the same time and all content lines within in MyClass will be selected automatically.

These two behaviours are different with vim, so I think:

  1. zo command should only unfold itself instead of all folders
  2. zO command can open all folders but shouldn't automatically select its content.

Please take a look. Thanks a lot!

alexmurray commented 8 years ago

This is an issue with vimish-fold itself - it does not support hierarchical folds - https://github.com/mrkkrp/vimish-fold/issues/17 - also the selection issue is likely a problem with vimish-fold too - can you reproduce by manually calling vimish-fold-unfold instead of zo?