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

Whitespace still added to blank lines #1110

Closed
dougscher opened this issue Jun 27, 2016 · 5 comments
Closed

Whitespace still added to blank lines #1110

dougscher opened this issue Jun 27, 2016 · 5 comments

Comments

@dougscher
Copy link

Expected Behavior

(function (cb) {
//no whitespace
test();
});

Actual Behavior

(function (cb) {
.. //whitespace
test();
});

  • NTVS Version:1.2.40620.00
  • Visual Studio Version: visual studio 2016 pro 14.0.25123.00 Update 2
  • Node.js Version:
Steps to Reproduce
  1. type:
    (function (cb) {
    test();
    });

  2. type 2 blank lines
    (function (cb) {

    test();
    });

You end up with blank lines with whitespace above the function test

@mjbvz
Copy link
Contributor

mjbvz commented Jun 27, 2016

Thanks for reporting this.

Just a few questions to help with the investigation:

  • What IntelliSense level are you on? This is found in Tools -> Options, Text Editor -> Node.js -> IntelliSense. It should be ECMAScript 6 for NTVS 1.2.
  • Do you have any custom formatting settings? These are also in Tools -> Options, Text Editor ->Node.js -> Formatting`.

And just to confirm the repo, starting with this code:

(function (cb) {
test();
});

Let $ be the cursor. I position the cursor like so:

(function (cb) {
$test();
});

And then hit return/enter twice, with the expected result being:

(function (cb) {
// blank line
test();
});

and the actual result being:

(function (cb) {
  // blank line with two spaces
test();
});

Is that correct?

@dougscher
Copy link
Author

(function (cb) {
$test();
});

$test needs to be indented to begin with.
And you may need to do two line feeds to see the white space show up

a.. What IntelliSense level are you on? This is found in Tools -> Options, Text Editor -> Node.js -> IntelliSense. It should be ECMAScript 6 for NTVS 1.2.
yes

b.. Do you have any custom formatting settings? These are also in Tools -> Options, Text Editor ->Node.js -> Formatting`.
Attached

Thanks,
Doug

From: Matt Bierner
Sent: Monday, June 27, 2016 4:37 PM
To: Microsoft/nodejstools
Cc: Doug Scher ; Author
Subject: Re: [Microsoft/nodejstools] Whitespace still added to blank lines (#1110)

Thanks for reporting this.

Just a few questions to help with the investigation:

a.. What IntelliSense level are you on? This is found in Tools -> Options, Text Editor -> Node.js -> IntelliSense. It should be ECMAScript 6 for NTVS 1.2.
b.. Do you have any custom formatting settings? These are also in Tools -> Options, Text Editor ->Node.js -> Formatting`.


And just to confirm the repo, starting with this code:

(function (cb) {
test();
});Let $ be the cursor. I position the cursor like so:

(function (cb) {
$test();
});And then hit return/enter twice, with the expected result being:

(function (cb) {
// blank line
test();
});and the actual result being:

(function (cb) {
// blank line with two spaces
test();
});Is that correct?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@mjbvz
Copy link
Contributor

mjbvz commented Jun 28, 2016

Thanks for the clarification. The formatting settings attachment seem to have gotten lost though, could you please try uploading them directly through GitHub.

I'm still having trouble reproducing this issue, but I am on VS 2015 Update 3 which may make a difference. It includes a new version of Typescript, which powers our editing and formatting for ES6 IntelliSense. You may want to download it and give it a try, along with NTVS 1.2 RC

@dougscher
Copy link
Author

Looks like this may be fixed.

Having another problem where NTVS 1.2 RC does not seem to perform automatic brace completion.
options|text editor|node.js|general|automatice brace completion is set.

@mjbvz
Copy link
Contributor

mjbvz commented Jul 27, 2016

Good to hear. Closing this issue then.

The brace completion issue is known and being tracked by: #1142 Take a look at that issue for more context on the problem and some potential workarounds.

Thanks.

@mjbvz mjbvz closed this as completed Jul 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants