Change mousewheel scroll rate in emacs console mode - emacs

Currently, when I use the mousewheel in emacs -nw mode, it skips two lines and then jumps to put the current line in the middle of the screen when the cursor gets to the bottom of the window.
What I want is for the cursor to jump one line at a time with mousewheel scrolling (so I can visit every line just with mouse scrolling), and only move the buffer down a single line when I scroll to the bottom of the screen.
I've gone in the Mouse options of emacs and set the "Mouse wheel scroll amount" to 1, along with "Mouse Wheel Progressive Speed" to 'off', but to no avail.
Is the "three line jump" behavior even contained in Emacs when I'm running in console mode? I set my local machine's "scroll by" option to 1 line, but no help. I don't see an option in the konsole (I'm using kubuntu) to change the mouse scrolling rate . . .

Related

Prevent VSCode from scrolling up or down when selecting text

When I use VSCode and select text with a mouse (instead of the trackpad) the view is moving up and down slightly. It is annoying. Usually, it only scrolls when the selection is going off screen. Is there a way to turn this off?
It also moves when I place the cursor on new lines.
Editor settings:

How to make smooth scrolling in VSC terminal?

I'm working in VSC and writting nodejs and I am faced with a scroll problem in long terminal outputs, scroll on the right side of terminal with slider goes too many rows too fast if I use them, so, question is, do we have smooth scroll option in integrated terminal to read output easy and line by line with arrows or we must use another external terminal for that?
Thanks.
In v1.71 smooth scrolling will be improved, see Release Notes: Terminal Smooth Scrolling.
The terminal now supports smooth scrolling which will animate
scrolling over a short period to help orient yourself after scrolling,
like the feature that is also available in the editor and lists. To
enable it set:
json "terminal.integrated.smoothScrolling": true
In vscode v1.42 (early February, 2020) two new commands related to terminal mouse wheel scroll sensitivity will be introduced:
Scrolling sensitivity
The terminal's scrolling sensitivity can now be configured independent
of the editor using the new settings
terminal.integrated.mouseWheelScrollSensitivity and
terminal.integrated.fastScrollSensitivity.
See https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_42.md#scrolling-sensitivity
Thanks to #Sean and #user9811991 in the comments for pointing out that the setting is a multiplier. My terminal normally scroll three lines at a time, to get it to scroll only one line I had to set terminal.integrated.mouseWheelScrollSensitivity to 0.08.
Also see Scrolling the terminal line by line from the keyboard for a keyboard command that scrolls the terminal by one line: workbench.action.terminal.scrollUp Ctrl-Alt-PageUp
Just add these lines into settings.json file and it will take effect instantly.
"terminal.integrated.fastScrollSensitivity" :1 ,
"terminal.integrated.mouseWheelScrollSensitivity":0.1
I've added the values as 0.1 because it was better for me , you can choose your sweet spot.
settings.json file , where you need to add the above answered values
It has been implemented in xterm
To enable smooth scrolling in VSCODE terminal, go to your settings, search for terminal smo and
simply toggle it on:

emacs inferior lisp scroll

When running Gnu Common Lisp in inferior-lisp mode, each time an expression is typed in to Lisp eval, the window is automatically re-positioned so that the input cursor is at the bottom of the window. Years ago, it did not do this. I would like the old behavior, where the text in the window stays in the same place until the printout goes beyond the bottom of the window, and then it puts the input cursor in the center of the window.
I have played with the scroll variables, without effect.
You probably want to play with comint-scroll-show-maximum-output.

Pasting with mouse-select in GNU Emacs

There is an functionality in XEmacs that if the user selects a region with the mouse while holding Ctrl, the selected region will be automatically pasted at the current cursor position.
In other words, if you need to quickly copy a short block of text from some open buffer to a new spot, you put the cursor there, and then do Ctrl-mouse-select and it works.
Unfortunately, I recently had to switch from XEmacs to GNU Emacs, and I'm looking to see if there is similar functionality there, or perhaps I could provide it with a custom module (I am very bad at Lisp, unfortunately).
You sure can, the functionality is bound to mouse button 3 if I'm not mistaken.
I assume so, because clicking my mousewheel yanks what I've copied at the cursor.
And Mousewheel == mouse button 3 in most cases.
Select using your mouse
With your mouse button down, hit control
Release your mouse button
Hit mouse button 3
Profit - selection yanked at your cursor
edit:
I found this on http://www.gnu.org/software/emacs/manual/html_node/emacs/Mouse-Commands.html
Mouse-1
Move point to where you click (mouse-set-point).
Drag-Mouse-1
Activate the region around the text selected by dragging, and copy it
to the kill ring (mouse-set-region).
Mouse-2
Yank the last killed text at the click position (mouse-yank-at-click).
Mouse-3
If the region is active, move the nearer end of the region to the click position; otherwise, set mark at the current value of point and point at the click position. Save the resulting region in the kill ring; on a second click, kill it (mouse-save-then-kill).
Put the following in your init file (.emacs):
(require 'mouse-copy)
(global-set-key [C-down-mouse-1] 'mouse-drag-secondary-pasting)
Once you restart Emacs, it should work just like you're used to in XEmacs--hold down Ctrl and the left mouse button, select your text, and when you release the mouse the text will be inserted at your current cursor position.
You might want to use mouse-copy.el which comes with Emacs.

Emacs resize vertical windows with mouse

I am using Emacs on GUI and I like both vertical and horizontal split windows.
In order to resize horizontal windows, I just grab (with the mouse) the name of the buffer and drag it up and down.
With vertical windows, I can't do that, though. I can't grab the scrollbar, there is no "slider". I know I can use C-X {, and C-X }, but these shortcuts are very unnatural, and I'd like to do it with the mouse.
Is there a way I can do that?
The status bar between two top windows is draggable.