Closed dinojr closed 5 years ago
where are you placing the cursor. You need to put the cursor inside of the expression object that you are trying to multi-line
In a python buffer, with only:
# This is a very long comment line that I expect to be split when running M-x multi-line
with point in "multi" for instance.
@dinojr you can use fill-paragraph which is default emacs command for that.
See: http://johnlaudun.org/20080321-word-wrap-filling-in-emacs/
multi-line is for multi-lining code expressions that require indentation etc.
ok, I've been directed to your package when searching for a way to enforce cutting of long lines in python for instance. fill-paragraph will do for comments but not for long code lines like:
os.environ['PATH'] = '/usr/local/texlive/current/bin/x86_64-linux:' + os.environ['PATH']
where the line-breaks from fill-paragraph will break the code.
@dinojr multi-line aims to only touch whitespace. How exactly would you expect the example you gave to be multi-lined.
multi-line works mostly on comma delimted expressions in python, e.g.:
my_long_line_function_with_long_name(anarg1, afun(arg1, arg2), stuff, more_stuff)
In this case, you can put the cursor after the starting parenthesis, and multi-line will handle this automatically.
I cannot get multi-line to work in python-mode: I always get errors like:
up-list: Scan error: "Unbalanced parentheses", 218, 22768
when running multi-line on a long line.