typescriptvisual-studioeditorhotkeys

How to use hotkeys to add a pair of curley brackets around a variable in visual studio?


In Javascript/ Typescript, because I need modify all default import to be non-default import, I need to add curly brackets around the original import efficiently for these are modifications in a large scale.

originally,

import UserComponent from './someFile'

and becomes

import {UserComponent} from './someFile'

Are there any hotkeys to add automatically the close curly bracket when I enter the open curly bracket?


Solution

  • No But you can select text and simple press "Shift + { " To add brackets