Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not wrapping matlab files #72

Closed
garyballantyne opened this issue Jan 30, 2018 · 7 comments
Closed

Not wrapping matlab files #72

garyballantyne opened this issue Jan 30, 2018 · 7 comments

Comments

@garyballantyne
Copy link

Many thanks for Rewrap. With vscode 1.19.3 and Rewrap 1.6.1, I can't get text to wrap for either in-line comments (i.e., beginning with %) or block comments (%{ ... %}) for matlab (.m) files. For an ordinary text file (.txt) it appears fine. Vscode seems to note something has happened, as Alt-Q triggers the unsaved file notification--but I can't see any actual difference in the text.

I have the matlab extension (0.80, Xavier Hahn) installed, but removing it made no difference.

I have tried both Alt-Q and via F1.

@stkb
Copy link
Owner

stkb commented Jan 30, 2018

Hi, Matlab isn't supported yet; I need to add it :)

I was just reading the docs. Is it correct that comment lines beginning with two '%'s (code section titles) should not be wrapped?

@garyballantyne
Copy link
Author

I have been using with matlab/octave for a while--must have just been lucky I guess :-)

I don't use the %% thing, and it doesn't seem supported in vscode (at least, in the extension mentioned above).

In matlab's own editor %% provides some highlighting (and perhaps even folding in more recent versions). However, neither of the two options below for wrapping a section heading appear to work. The first option creates two sections, and the second option is just a comment following the section heading. So, I guess the short answer is that %% lines shouldn't be wrapped.

%% this is a section
%% this is a wrapped part

%% this is another code section
% this is another wrapped part

@stkb
Copy link
Owner

stkb commented Jan 30, 2018

Thanks! That was exactly what I needed to know.

stkb added a commit that referenced this issue Jan 31, 2018
@stkb
Copy link
Owner

stkb commented Jan 31, 2018

This will be in the next version, releasing this weekend.

Note: you will need the extension instaled for wrapping to work (since without it, vscode marks .m files as Objective-C)

@garyballantyne
Copy link
Author

Great! Thanks very much.

@stkb
Copy link
Owner

stkb commented Feb 4, 2018

Now in v1.7.0. Closing, but let me know if anything's not working.

@stkb stkb closed this as completed Feb 4, 2018
@garyballantyne
Copy link
Author

I had a quick look, and its working well. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants