Like the title suggests, when I use Distraction Free mode in PyCharm or Intellij I cannot see the line numbers, even though I have ticked the "line numbers" box in the settings. Is there a way to make the line numbers appear on Distraction Free mode?
I'm using Linux (Ubuntu) if that helps (I saw a Mac picture where lines were being showed in Distraction Free mode) and my PyCharm version is 2016.2.3.
Showing the line numbers is independently configurable in distraction-free mode and regular mode.
While in distraction-free mode right-click somewhere close to the left-side of the editor window to see a short menu which contains the Show Line Numbers option:
The accepted answer didn't work for me.
You can always use the shortcut: ctrl + shift + A and type in: "line" and the "show line numbers" option will appear in the list. Navigate to it and press enter to turn it on.
Related
I just installed Win 10 1809 on my Dell PC, and it seems to run okay. But the first thing I did was start up VS Code. I wanted to run yarn start for my React project, but I had to type it way down in the terminal window, while the prompt was at the top. It worked though.
And when I open any project file, there seems to be approximately 100 blank lines appended at the end of each. But the line numbers don't go down that far and the cursor stops at the last line number. But the scroll bar acts as if those blank lines are there.
So I'm guessing the same number of blank lines are being added to the terminal too. But in the terminal window, the cursor is positioned at the bottom of the scrollable window.
What's going on? Is there a fix?
EDITED:
I see that I can scroll the file's window up until the cursor and last line is at the top, but no further, regardless of the window size. Maybe this has always be the case, and I never noticed. But now because of my terminal problem, I am suspicious of everything and checking for any abnormalities. So I don't think that extra blank lines are being added to my files. Sorry for the mistake.
But the terminal problem persists. The screen clip below shows the terminal display after I enter "yarn start". The typed input shows up way down from the initial prompt, and the blank area is a long string of "0D0A" characters. Sometimes I can click on "kill Terminal" and then start a new one and the new one works correctly. But not always.
Still trying to figure this out.
Can you share snapshots for your problems?
This is some hint for your problem
In VS Code, type
Linux / Windows: Ctrl + Shift + P
MacOS: Cmd + Shift + P
Type Settings to go Settings
At settings, search end of file, at here you can configure something for your problem with auto append blank lines each file
I hope it will help you :)
Your Terminal Problem is described as Bug in VS Code Issues.
As of July 2019 the intergration is pending due to stability problems.
https://github.com/Microsoft/vscode/issues/57803
Addendum (August 2019):
The Problem seams to be fixed with VS Code 1.37.1 and Windows 10 Patchlevel 1903
Did you try uninstalling and reinstalling?
Going back to your questions.
What's going on? No idea.
Fix. Use this extension https://marketplace.visualstudio.com/items?itemName=rintoj.blank-line-organizer
or
Open Visual Studio project and collapse all the folder and make it handy.
Now press “ Control + Shift + H “ key combination and you can see the Popup which shows Find and Replace options.
In the Find place input “^&\n” combination and select Use Regular Expression checkbox without fail as this input will mainly work with the regular expressions only.
In the replace field leave it empty so nothing will be replaced rather remove the empty blank lines.
In the input Find field we have give ^ for Start of the line and $ for end of line and \n which is for new line break.
source for second solution: http://www.f5debug.net/post/2015/01/03/How-to-remove-Blank-lines-between-codes-in-Visual-Studio-Code-editor.aspx
The extension will be useful overall especially when working in a team project where a lot of people might be leaving too many empty lines. Good luck
In Eclipse, there are two distinct features: one to format a selection, one to just indent the lines, see e.g. Difference between Ctrl+Shift+F and Ctrl+I in Eclipse. I found the format feature in Visual Studio but how can I actually just indent the lines? Is there some built-in command for that or possibly a 3rd party add-on?
Note: I have asked a couple of friend that use VS daily and they all tried to persuade me that I am looking for the format feature. No I'm not. I tried to live with it for a while and it is just a different feature. I am after the indent/reindent only.
EDIT: I am looking for a clever indent, sometimes called reindent, which is different to just pressing Tab or Shift+Tab (increase/decrease indent level). The indent feature in Eclipse behaves like this:
It places a beginning of current line at the right position, no matter where that line was starting before. So instead of thinking whether you need to increase or descrease the indent level (Tab or Shift+Tab), you just invoke the indent command and it will do the right thing.
Invoking the indent command on an empty line places the caret at the right position for the user to start typing.
It never influences any character beyond the first non-whitespace character.
If you just want to indent some lines, you can
Select them.
Press Tab.
To un-indent them, replace the second step to: Shift+Tab.
You can find more VS shortcuts here.
There are toolbar buttons for this, with wonderfully inconsistent labels (at least in the Visual Studio 2013 I'm using)...
In the "Text Editor" toolbar (in my default setup), I have to buttons whose tooltips are:
"Decrease Line Indent"
"Increase Line Indent"
In the "Customize" dialog, on the "Commands" tab (with "Toolbar" set to "Text Editor") they appear in the list as:
"Line Unindent"
"Line Indent"
And finally, if you press the "Add Command..." button (on the "Customize" dialog) to produce the "Add Command" dialog and select the "Edit" category, you'll see these two entries:
"Outdent"
"Indent"
As far as I can tell, these are all the same two commands, which should do what you want.
They also appear in the Edit -> Advanced menu, at the very bottom.
----- Edit -----
I believe you might be able to turn off all of the "formatting" actions except for indentation, so that when you use the "auto-format" command, only the indentation is "formatted" for you. (Of course this prevents you from ever using the rest of the formatting features without turning them on again, but if you don't use them, this might work!)
apologies as I realise this shouldn't be in stackoverflow and one of his sisters spin off's.
But its driving me insane, but going to the end of a line when I click on the white space of a line.
I have a fresh install on a different machine and it doesn't do this, so I know its my version.
I have clicked the small 'reset' in settings with no luck.
You likely have either "Column Selection Mode" or "Allow placement of caret after end of line" enabled.
To turn off Column Selection Mode, see https://www.jetbrains.com/idea/help/selecting-text-in-the-editor.html#column_selection.
To turn off caret after EOL placement, deselect the preference in Settings > Editor > Virtual Space.
I'm writing this question because one little invisible problem has taken from me hours and hours of dummy searchings, and the time just has been wasted (here is that question: CSS: Is there any difference between these two parts?)
Does anybody know how the character 0x08 ("backspace" in ASCII) can be written into a text using a MacBook and a simple IDE (I use the "Coda")?
There is no ability to press Alt + 08 on MacBook (there is no digital keys part on the MacBook's keyboard).
How it can happen?
Did you copy & paste it from anywhere? Because the only way I know - apart from what SCFrench suggested - is to enable this in Terminal by typing:
stty erase SPACE CTRL+V CTRL+H RETURN
Not sure if this is the easiest way, but:
In the Keyboard system preferences panel, check "Show Keyboard & Character Viewer in menu bar".
Find the Keyboard menu bar icon (on the right side of the menu bar), click it, and select "Show Character Viewer".
In the Characters window that appears, find the "View" pop up menu and select "Code Tables".
Select the Unicode coding tab.
In the middle section where all the characters are displayed, click on the entry for 0008 (it will be blank, but the Name: field will say "BACKSPACE").
Click the Insert button in the same window.
Since the character is non-printable, it doesn't actually show anything in the text editor, but (at least in TextEdit) you will see that you have to hit the left or right arrow key more than once to move past it. I also confirmed by dumping the file in hex that it contains a 08 byte.
You could also use this technique to set up a Text Substitution in the Text tab of the Language & Text system preference panel.
Shift + Up Arrow + Delete/Backspace. It's a bug.
http://www.openradar.me/5288750
In the mac terminal application there is a setting (preferences -> keyboard) that lets you set "use option as meta key". This is useful as a lot of unix boxes use bash as default shell and that has emacs keybindings M-f and M-b that let you skip words.
Problem is that on a Mac with a UK keyboard the # symbol is tricky to get to - normally it can be typed with alt-3, but not if you are in a terminal and alt=meta.
Anyone have a nice way round this?
I am using zsh and the following saved my day:
bindkey -s '^[3' \#
Set your keyboard language ( System Preferences->International->InputMenu ) to Australian
It is the same as UK except shift-3 gives #. You do lose the pound sign but if I do currency I use the ISO three character code GBP
The Australian layout is identical as mentioned except # is mapped to Shift 3 and £ is mapped to Alt 3.
Swap to Aus and the swap your ALT behaviour. This has annoyed me for while especially as it is in a non UK position to start with.
Earlier today I stumbled on a great solution to this on Graeme Sutherland's blog so thought I'd summarise it here in case it disappears.
If you want to stick with the built-in Terminal and don't want to lose the £ sign, you can use Ukelele roll your own keyboard layout to switch the section (§) key for hash instead. Quite a handy location for typing '#!' too :)
The keymap file Graeme created is here, but if you want to make your own you can simply take the British one as a base it's pretty straightforward to create the new keymap file.
Copy your new keymap file to ~/Library/Keyboard Layouts
Go to System Preferences - Language & Text - Input Sources
Scroll down to 'British with # for §' (or whatever you put as its name in Ukelele) and check the box
Check 'Show Input menu in menu bar'
Click on the flag in your menu bar at the top of the screen and choose your new input source
This input source can then be used in all apps, or just the ones you want it for.
I appreciate this and the linked question are quite old but thought this might help someone else.
ESC is another meta shortcut :). You don't have to keep pressing it though.
So in your situation, you might just need to press ESC once, and then press alt-3.
See image to get the details as to how to setup a shortcut in your terminal and fly free
I'm using iTerm2 and I was having this problem. With iTerm2 you can use the left alt key as a meta key, and the right as a normal key. So ralt-3 does the # key.
Based on ericteubert answer for zsh for bash you bind the key, I've added this to my .bash_profile:
bind '"\e3":"#"'
For vim you can add the following to your .vimrc
inoremap <ESC>3 #