Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the keyboard shortcut in visual studio code to complete statement like in IntelliJ?

Is exist keyboard shortcut to complete statement in current line in visual studio code, like in IntelliJ?

The complete statement is that Complete Statement, I can enter Shift + Ctrl + Enter to complete current line smartly.

The visual studio code support this function?

like image 425
pwxcoo Avatar asked Sep 03 '18 06:09

pwxcoo


People also ask

How do you get VS Code to autocomplete?

You can trigger IntelliSense in any editor window by typing Ctrl+Space or by typing a trigger character (such as the dot character (.) in JavaScript). Tip: The suggestions widget supports CamelCase filtering, meaning you can type the letters which are upper cased in a method name to limit the suggestions.

What is Ctrl K in IntelliJ?

CTRL + J : Navigate – Go To Implementations. CTRL + K : 3 things here: View Recent Files + Toggle Changed Only Files + Iterate Recent Files. CTRL + L : Navigate – Go To Declaration or Usages. ALT + H : Editor Actions – Left. ALT + J : Editor Actions – Down.

What is Ctrl Alt L in IntelliJ?

Sometimes code formatting can get out of sync, but there's an easy fix in IntelliJ IDEA. You can use ⌘⌥L (macOS), or Ctrl+Alt+L (Windows/Linux) to reformat a selection of code according to your reformat settings.

What is Ctrl Shift O in IntelliJ?

In Eclipse, you press CTRL + SHIFT + O “Organize Imports” to import packages automatically. For IntelliJ IDEA, if you press CTRL + ALT + O “Optimize Imports”, it just removes some unused imports, never imports any package.


1 Answers

Complete Statement will help to some extent. However, this extension lacks one feature - going inside the block. For example - for a if block if you use the shortcut to autocomplete the statement the cursor will still stay on the same line unlike Jetbrains IDE where it intelligently moves to the correct line.

Those who want to get the same feel as Jetbrains IDE's complete statement feature they can customize the keyboard shortcut like this:

Shortcut 1: Ctrl+ Shift+ Enter (to complete current statement)

Shortcut 2: Ctrl+ Shift (to go to next line)

It's just some extra keystrokes but still you can at least get it done!

like image 101
Sayed Sadat Avatar answered Sep 28 '22 23:09

Sayed Sadat