VSCode notebook padding below the cursor position - visual-studio-code

I have set this: "editor.cursorSurroundingLines": 10, but, I'm getting a view like this, line 3 is just at the extreme bottom of the screen.
Is there any way to put some fixed space/padding below the current cursor position? In simple I don't want my cursor at the extreme bottom of the screen.

If this happens only for the last line of your file, try adding this setting to your settings.json:
"editor.scrollBeyondLastLine": false

Related

How to remove this gray line that causes text to wrap in VS Code?

I've recently noticed that when typing out long lines of code, they split into multiple lines after this threshold and it bothers me. enter image description here
Not sure if it was a formatting extension that I put on here years ago, but I couldn't seem to locate it in the settings.
The grey line isn't what causes the wrapping. You can apply settings to have the grey line and not have wrapping. They grey line is displayed according to the editor.ruler setting.
In general text editor terminology, this wrapping you are observing is called "soft wrapping" (when an editor wraps long lines in its rendering of the text, but doesn't actually insert line-break characters, which is called "hard wrapping").
By default, soft-wrapping can be toggled by Alt+z (The command palette command is named View: Toggle Word Wrap).
The default setting of soft wrapping for VS Code is configurable by the editor.wordWrap setting. It has several values it can take on:
"bounded": lines wrap at the minimum of viewport width and editor.wordWrapColumn,
"off": Lines will never wrap
"on": Lines will wrap at the viewport width
"wordWrapColumn": Lines will wrap at editor.wordWrapColumn
The word wrap column is configurable by the editor.wordWrapColumn setting. See also the editor.wrappingIndent and wrappingStrategy settings.
This is a setting called rulers. Go into Settings and search "rulers". Then you will be able to edit the settings.json file. Under "editor.rulers" remove all values in the array so that it is empty. That should solve it.

TextField's current focus position in flutter

Hey I have a TextField and a controller for it through which I access its current text value and add some text like (Some Special Asterix or text with angular brackets just like hashnode's text editor) to it when needed, adding text at the end is easy.
controller.text += "Something";
The above code will add Something to the end. But I need to know the current TextFields Cursor position and add text according to it.
I really love to know how we can do it in flutter efficiently
Try this to get the cursor position
print(controller.selection.baseOffset);
print(controller.selection.extentOffset);
if they are the same, it is current cursor position.
if not, it means that some of text is selected, baseOffset is start position and extentOffset is end positon.

NSTextView's Insertion Point draws position exceptions

This should be a Bug, because I can reproduce it with my friends.
I just set allowsNonContiguous Layout of NSTextView. layoutManager to true, and that's the problem.
In the editor, I first enter N blank lines, that is, press N times to return. Then go back to the second line of our input, and press any key at the moment insertion Point disappears, which will make my insertion Point incorrect.
Here is my demo:
https://github.com/iiiDD/TextViewDemo
I had the same problem. I’ve detailed how I’ve fixed this bug here : NSTextView cursor doesn't appear when typing text on macOS 10.14

Auto wordWrap to the window VSC

I would like to auto word wrap all files to the window. In sublime this is simple with auto however, in VSC I have three options:
editor.wordWrap
editor.wordWrapColumn
editor.wrappingIndent
My issue is that no matter what settings I use I am unable to wrap the text to the window. There is about a 3 inch gap on 15in monitor from where the text ends to the edge of the window. I want to be able to move the window by snapping to any edge and my words wrap automatically no matter what size the window is - if you have used sublime you will understand this situation.
"word_wrap": "auto",
"wrap_width": 0
Thanks for your help. I'm guessing this is a simple step but I am very new to VSC.
With the following settings, the VSCode should always wrap at the Window's edge:
"editor.wordWrap": "bounded",
"editor.wordWrapColumn": 9999
"bounded" is documented as:
wrap at minimum of viewport and editor.wordWrapColumn
Since wordWrapColumn is still respected in bounded mode, and the default of 80 is rather low, you basically need to set that to something "unlimited" to get the desired behavior.

Emacs: how can i just show the next line when i reach the last line of the view?

when i move the cursor upwards or downwards and it reach the first/last line of the view (the part of the file that is been showed) it "jumps" so it shows the before/next half page of the view instead of just showing the before/next line (like in vi).
So how can i just show the next line?
Regards
Javi
There are a few different ways of controlling this. Have a look at the documentation for variables scroll-step and scroll-conservatively. Also the manual here.
Something like:
M-x set-variable<RET> scroll-conservatively<RET> 3<RET>
Or more permanently:
M-x customize-variable<RET> scroll-conservatively<RET>