Jump to Closing tag in VS Code?
It is possible to do, but either using Ctrl + Shift + P -> “Emmet: Go to Matching Pair” or by manually setting a shortcut for it (Ctrl + K Ctrl + S). Unfortunately there is currently no support for it out of the box.
It is possible to do, but either using Ctrl + Shift + P -> “Emmet: Go to Matching Pair” or by manually setting a shortcut for it (Ctrl + K Ctrl + S). Unfortunately there is currently no support for it out of the box.
It won’t change anything at all apart from the maintainability of your code. I’ve seen code like this: for (int i = 0; i < size; i++) a += b; System.out.println(“foo”); which means this: for (int i = 0; i < size; i++) a += b; System.out.println(“foo”); … but which should have been this: for … Read more
That’s called Type Assertion or casting. These are the same: let square = <Square>{}; let square = {} as Square; Example: interface Props { x: number; y: number; name: string; } let a = {}; a.x = 3; // error: Property ‘x’ does not exist on type `{}` So you can do: let a = … Read more
Flatten the list to “remove the brackets” using a nested list comprehension. This will un-nest each list stored in your list of lists! list_of_lists = [[180.0], [173.8], [164.2], [156.5], [147.2], [138.2]] flattened = [val for sublist in list_of_lists for val in sublist] Nested list comprehensions evaluate in the same manner that they unwrap (i.e. add … Read more
To select between the single quotes I usually do a vi’ (“select inner single quotes”). Inside a parenthesis block, I use vib (“select inner block”) Inside a curly braces block you can use viB (“capital B”) To make the selections “inclusive” (select also the quotes, parenthesis or braces) you can use a instead of i. … Read more