Auto forward slash, can i turn it off?

How to remove auto forwardslash on pasting code into string  say i have string

$sql = "SELECT {$arr["key"]}
                 FROM mytable"

if i copy and paste {$arr["key"]} part i will get

$sql = "SELECT {$arr[\"key\"]}
                 FROM mytable"

it came after i installed version 10.

4 comments
Comment actions Permalink

Hi there,

Please use "Paste Simple" instead of "Paste".

http://stackoverflow.com/a/33894911/783119


P.S.
This particular case should be fixed in next minor version: https://youtrack.jetbrains.com/issue/WI-29833

0
Comment actions Permalink

I got it will just remap Ctrl+V to paste simple thanks.

Now one more problem
if i paste to pointer location as shown by |

$sql = "SELECT {$arr["key"]},
|
                 FROM mytable"

it does paste without auto tabbing pasted string under first one,

$sql = "SELECT {$arr["key"]},
{$arr["key"]}
                 FROM mytable"

i think in previous version it was pasting like this.

$sql = "SELECT {$arr["key"]},
                       {$arr["key"]}
                 FROM mytable"

0
Comment actions Permalink

If that's done with Paste Simple then it's expected as no additional processing is done as compared to just Paste.

But if it's done with normal paste then it could be:
1) not correct setting for "Settings/Preferences | Editor | General | Smart Keys --> Reformat on paste"
2) Your code style for that language (SQL in your case?)

TBH -- I do not use "reformat on paste" option at all for a long time (back then it had some issues .. and even now (very rarely though) it can produce unexpected formatting which is better to avoid than waste time fixing it manually afterwards) and therefore do not keep track for any issues in this regard (incorrect indenting on paste).

But I may suggest to try Alt+Enter and open that fragment in separate editor frame where you may be able to use Reformat Code (I'm pasting already formatted SQL code into PhpStorm + I do not really use such dynamic SQL constructs like you have here).

0
Comment actions Permalink

Hmm updated to v10.0.2 and auto forward slash bug is still there.

0

Please sign in to leave a comment.