Open Raimondi opened 9 years ago
May I ask what your improvement is? There aren't any comments and the code isn't that self documenting.
My bad, I was too tired when I finished it and created the PR. I have added comments to the code, a more explicit commit message and some text to the PR comment.
I'm trying to work through the PR queue but this is a bit much for me to review at the moment (not having touched vim scripting for years and not having vim, git, fish or vim-fish currently set up).
However, if I remember correctly the idea was you use gq
to format larger blocks of code, which will use the native fish_indent
program that should probably handle every case correctly. fish#Indent()
is meant to handle manual line-by-line input efficiently; is that working for you?
See also the comments on #20. Does your changes work with endwise?
@dag Is there any way this could get merged? I tested with endwise and it seems to work. The indent functionality on master is broken for me and this fixes it.
Could this be merged if @Raimondi rebased on master
? Having the end
living its own life is a bit annoying.
This PR addresses some problems with the current fish#indent() function:
In this gist you can compare the results of using
gg=G
in a really bad indented fish file with the current and the proposed fish#indent().