danday74
danday74

Reputation: 56986

WebStorm auto import not working when pasting

I've got a React component as follows:

<CodeMirrorReact onChange={onChangeTest} code={multiLineCode}></CodeMirrorReact>

When I start typing ... <CodeMi ... a drop down appears. I can select the component from the dropdown and WebStorm auto completes for me AND (more importantly) does an auto import for the component by adding the following import statement:

import CodeMirrorReact from '../CodeMirrorReact/index'

Great!

However, when I copy and paste the above component code, WebStorm does not do the auto import. Ctrl + Enter does not work either.

Anyone know how to fix it so auto imports work when pasting?

Upvotes: 1

Views: 684

Answers (1)

megamit
megamit

Reputation: 952

Auto import on paste is not a feature of the stable version of WebStorm.

However it has been added to the WebStorm EAP for the next version (2017.3).

Upvotes: 2

Related Questions