Too much space in loop - visual-studio-code

Did I mess with the setting or is this a new feature?

You might have changed your tab indentation value. Look at the status bar (bottom right) and see how many spaces your tab is set to. You can click on the status bar to change it, or press cmd+shift+p (OS X) or ctrl+shift+p (Windows) to open the command pallete and type Indent to find the Indent Using Spaces option and set it to 4 (or 8, whatever you like).

Related

VSCode: "Markdown Preview" SHIFT-COMMAND-P not working

Setup:
VSCode 1.50.1
MacOS High Sierra (10.13.6) - but I think this applies to any OS
Steps to Reproduce:
this is a quick simple one...
click on/hghlight/open a markdown file (.MD extension) in VSCode / from the Explorer tree hierarchy in the Left Nav Pane,
hit SHIFT-COMMAND-V per numerous instructional posts/tutorials - (you can also find the shortcut clearly labeled with that very same Shortcut Key-Combo:
if you RIGHT-CLICK on the file in question...
you will get a Context Menu with several options, include Markdown Preview
hitting the stated key combo of SHIFT-COMMAND-V does nothing,i.e.:
no observable effect in current window or tab
does not open any other tabs
does not render markdown
BEFORE YOU DO ANYTHING:
--
This may seem STUPID/OBVIOUS to most of you... I think I was still asleep when I first tried this... so:
make sure that your cursor is ACTIVE in your .MD markdown document, and NOT active on the filename in the Explorer
Tree in the left-hand Nav
apparently, in VSCode this shortcut SHIFT-COMMAND-V only works when you are ACTIVELY EDITING the file.
using the mouse on the RIGHT-CLICK context menu works fine
even if the .MD file isn't open AT ALL / in ANY EDITOR
even if you're actually actively editing A DIFFERENT FILE, if you hover over the filename in the Explorer/File-Folder Hierarchy,
RIGHT-CLICK and launch Mark Preview, it will work.
Quick Solution:
You most likely have a VSCode "Extension" installed and enabled within VSCode that is blocking the default VSCode shortcuts
in my case, this was Atom Keymap Extension (Here's link to extension in VS Marketplace)
IN VSCode, go to Extensions, find (you can search in the search bar at the top of the Extensions list/Nav Pane) Atom Keymap and UNINSTALL IT
alternately, you can just simplt DISABLE IT if you prefer to use it another time.
restart VSCode
SHIFT-COMMAND-V shortcut SHOULD BE WORKING NOW!
Troubleshooting:
Key Combo not recognized in VSCode (at least in VSCode, see#2 if blocked elsewhere)
If you look at the very bottom-middle/bottom-right of the VSCode window, you will notice the Status Bar (by default the whole bar is bright blue with white text)..
the status bar has several different sections, symbols, and text messages...
you will notice it changes/will indicate when you press a VALID Key-Combo... and that SHIFT-COMMAND-V literally does not result in ANY message on the status bar
But hitting COMMAND-V for instance is reflected in a real-time corresponding message in the status bar telling you that you DID press COMMAND-V
It appears NOT for any Key-Combo that includes SHIFT isn't recognized
confirm it's a VSCode thing only
go to your MacOS System Preferences > Keyboard > Shortcuts > look through each category of shortcuts - you should NOT SEE a key mapping for SHIFT-COMMAND-V

VSCode Change Vertical Guide Line Indentation

I changed my VSCode settings to define a tab as 4 spaces, as opposed to the default 2 spaces. How do I make the vertical guide lines appear on every 4 spaces, as opposed to 2? Please see screenshot below.
Open a .js file and in the status bar (at the bottom of the screen) you will find a button that says
Spaces: 2
Once you click on it, you get a menu at the top of the screen which has a button
change view
Click on it and you will be able to select the tab size for the file.
To change the setting globally, go to File -> Preferences -> Settings, search for 'tabSize' and click on Edit in settings.json. Then in the settings.json file set "editor.tabSize" to 4 and save.
I'm using VSCode and that's what solved the issue here
1- create a prettier.config.js file and among the options, make sure to have these here:
module.exports = {
tabWidth: 4,
tabs: true,
// other options...
}
2- Open the options bar (cmd + shift + P) and select "Developer: Reload window" to reload the IDE.

How to switch windows within PeekView window without mouse

When I use use PeekDefinition keyboard shortcut a window is opened with a code preview on the left side and list of occurrences on the right side (typical PeekView).
Now the list on right has the focus. How to move it to the code preview without mouse so I could scroll it and edit it with my keyboard.
(I am using vim emulation)
For me, on Windows with VSCode 1.37.1, Shift+Tab moves from the right-hand pane of peek view (list of files) to the left-hand pane (peeked source code).
It doesn't seem to be an ordinary, customizable key binding though. In my keyboard settings, several things are bound to Shift+Tab (depending on context), but none correspond to this behavior. So I don't know where it comes from or if it can be changed.
Also, there seems to be no way to go back to the right-hand pane, other than by closing the peek view entirely with Esc and re-opening it again.

Unwanted sign on each line of worksheet

I don't know what the hotkey I accidentally clicked, but this Ǧ looking sign appeared on every line of code, and there are grey dots instead of spaces in the code.
How can I get rid of those characters?
Assuming this is SQL Developer, go to Tools->Preferences (or on Mac, find that under the SQL Developer menu). Expand the Code Editor section and click on Display. Untick "Show whitespace characters" (second checkbox in the list).
You can check for defined shortcuts under Preferences, in the Shortcut Keys section. On Mac there isn't one for this, but Windows has it as Control+Shift+W, which will also toggle them off if you don't want to go through the preference pane.

Change Eclipse tab to correctly indent line as Emacs does

In Emacs when I hit tab anywhere on a line, the line will indent correctly (or at least to the mode settings). When I hit tab again it will move back to the next block. When programming Python this really helps since closing a block is done by lowering the indention level.
Is there a way to configure Eclipse to do the same?
Currently, I have to erase the leading white space then hit tab.
This question is a reposting of a superuser question.
Try ctrl-i (Cmd-i on osx) to indent the current line or a selection inside eclipse (if you're using default key binds as opposed to emacs). Or, if you want a different key bind, go to Appearances > General > Keys and change the bind for Correct Indentation to key(s) of your choice
In Eclipse, go to Windows -> Preference -> Java -> Formatter.
In Active Profile drop down box, select any profile, click Edit on right of it.
In Profile Dialog box opened, you can change a lot of things like Indentation, New Line, Braces, White Spaces etc.
Alternatively, if your profile is altogether different than standard one, Create a new active profile and then edit it accordingly.