VS Code Flashcards

1
Q

code directory

code . = to open VS code for current directory

A

this opens VS Code for that directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

ctrl +k ctrl+s

A

for keyboard shortcuts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

command palate

A

ctrl+p = to search for files

it is quicker than using a directory tree to navigate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

extension:Numbered bookmark extension

A

for book marking code
Create bookmark: Press key combination Ctrl+Shift+ to create a bookmark, where can be any number from 0 to 9.
Navigate to bookmark: Press key combination Ctrl+Alt+ to move to the bookmark location.
Delete a bookmark: Right click on the bookmark, in the bookmark margin.
Delete all bookmarks: Press key combination Ctrl+Alt+Backspace.
Information about bookmark: Mouse hover over the bookmark shows basic information about it, that includes bookmark number, file name, line number and column number.
How to use information: Mouse hover over the Green coloured bookmark in the Bookmark Margin shows the basic how to.

https://github.com/alefragnani/vscode-numbered-bookmarks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

angular snippets

A

Angular 6 snippets; Mikael morlund and John Papa
Angular Snippets (Version 9)
There are snippets available for angular material; Ngxs and others

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Integrated Terminal

A

we could also run the commands in the command palatte

like ctrl+p > npm install

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Intellisense

A

auto completion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

See details in a file

A

interfaces, methods and properties defined in a file

using @ in the command palate in a file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Peek definition

A

to see the definition of a variable like its class or interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Go to References

A

right-click on an object to see list of references for that type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Rename symbol

A

To change the name of the class or any object in all the places; you can not rename predefined classes like Console.log

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Extension: Paste JSON as code

A

copy all the json from web api response into a test.jsonfile and create a new file test.ts
open command palette- open > Paste JSON
it creates interface from the json data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Zen Mode

A

ctrl+k+z - view port with all the distractions removed. if we do not care about what our docker container is doing or git etc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Extension:vscode-spotify

A

for spotify music extension in vs code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Debugger

A

the bug icon
node works by default but if we need anything else we could add extension
This opens the local variables and Global variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Debbuger Console

A

we have access to current state variables

global.testval = prints the value

17
Q

Extension : Debugger for Chrome

A

for debugging the angular apps with chrome browser
once you start the debugger– environment - select chrome
this will create launch.json = change the port to 4200 for angular
it creates .vscode folder and adds launch.json file

18
Q

Git changes

A
chagnes 
untracked files - green U
Modified files - Yellow M
files with lint errors are red
you can type the message for commiting the changes

we could also revert the changes with the .. option in the git
we could revert the changes on a file by right click on revert

To add only some files - click the plus button and it stages them for commit

19
Q

Extension : Gitlens

A

to get the git status
who changed what and when it was changed
it gives all the info like remote branches, git statsh, tags
and annotations

20
Q

Extension: vscode live share

A

Extension: vscode live share

21
Q

VS Code settings

file- preferences - settings

A

https://code.visualstudio.com/docs/getstarted/settings

22
Q

managing extensions

A

https://code.visualstudio.com/docs/editor/extension-gallery

23
Q

Real time sonarqube scan

A

https://blogs.sap.com/2019/12/25/real-time-code-scan-with-sonarlint-following-sonarqube-server-rules-in-visual-studio-codevs-code/

24
Q

https://www.sonarlint.org/vscode

A

https://www.sonarlint.org/vscode

25
Q

Prettier for code formatting

A

https://www.codereadability.com/automated-code-formatting-with-prettier/

https://www.xspdf.com/resolution/50756779.html#:~
:text=Prettier%20remove%20unused%20imports,json
%20%2D%2Dfix%20%2D%2Dproject%20.

26
Q

Remove unused extensions ;

even with ctrl+shift+P =Ctrl shift P = command palette = Organize imports ; Format Documents (uses prettier)

A

https://wesleygrimes.com/angular/2019/02/14/how-to-use-tslint-to-autoremove-all-unused-imports-in-a-typescript-project.html