With tmux mouse mode, when selecting text on the left pane, it causes gibberish text to be pasted into right vertical pane - bash

I am using tmux (version 2.3) and I have only one option in my .tmux.conf file:
set -g mouse on
I then follow the following steps to reproduce:
1) open up tmux
2) split into two vertical panes
3) move the cursor to the left pane
4) select some amount of text from multiple lines in left pane
5) immediately after letting go of the left mouse button when making the selection, an EQUAL amount of text in size to the selection, of gibberish characters, is pasted into the right hand pane overwriting whatever was previously on display on the right.
If I then click and select in the right pane, then the right pane reverts back and shows what it previously was showing. And again, the same thing happens... selecting text in the right pane, now causes a equal size selection of gibberish to overwrite the left hand pane.
Is this a bug?
I can reproduce this easily. Does anyone else experience this or have a workaround?
I have attached a picture showing this behavior (in this case in the picture, only 1 line of gibberish shows up after selecting on the left hand side).

This is because you are using a terminal that claims to be xterm - so you have TERM=xterm outside tmux - but does not support the OSC 52 clipboard escape sequence.
You can either turn off the set-clipboard option in tmux (set -g set-clipboard off) to prevent it trying to use this sequence, or change to use the right TERM for your terminal outside tmux.

Related

Maximize terminal in VSCode when in side panel

In previous versions of VSCode there was an arrow icon at the top of the panel that could be used to maximize the panel, for instance the terminal. I do not know exactly in which version but that button is now gone and I'm unable to find an equivalent.
My question is: how can I maximize the terminal so it takes the whole VSCode window? Is there any way to get the button back?
Which version of VSCode are you using, and in which OS?
On Mac, and with 1.65.2 (the most recent update by now), I have it in the right corner, near the X button:
Shortcuts
Now talking about shortcuts to make your life easier, there are 2 you should be aware of.
PS: Remember that to change any shortcuts, just go over VSCode Command Palette and type Keyboard Shortcuts to change them.
Maximise panel size
There are no default shortcuts for those, in both Windows and Mac.
If you want to set any, the name of the shortcut is View: Toggle Maximized Panel:
Increasing / decreasing terminal size
Now talking shortcuts, if you want to resize your terminal window, in Mac there's a native shortcut that allows to increase / decrease terminal size with Cmd + Ctrl + Arrow Up / Arrow Down.
There's no default for Windows.
If you want to set / change those shortcuts, they are called Terminal: Resize Terminal Down and Terminal: Resize Terminal Up:
Terminal panel on the side
If you added your panel to either left or right, then the mark to make it fullscreen changes.
After clicking on the arrow below, it'll hide all your files and make the terminal to run in the whole screen for VSCode:
I also got the arrow disappeared, but i manage to bring it back by with command:workbench.action.alignPanelCenter
But i don't know i un align it in the first place
So maybe it will work with you
To get the maximize arrow on the left panel...
Left-click the bottom panel, then choose Move Panel Left
To get the maximize arrow on the bottom panel...
First, press the Customize Layout button
And select Center Panel Alignment
Then move the panel back to the bottom.
Panel can be maximized when centered.
Example: If panel is not centered and the Maximize button is missing you also cannot use the command by hitting
Shift-Ctrl-P View: Toggle Maximize Panel
Fix: run these commands (press Shift-Ctrl-P then begin typing)
First command will enable the maximize button
View: Set Panel alignment to Center
Second command will now work to Maximize (or just press the button that shows up now)
View: Toggle Maximize Panel
Blue and skube have the right answer to the original question. I cannot comment so summarize an answer using commands that can be pasted to verify.

How to scroll horizontally in emacs?

I can't get emacs to scroll horizontally!
To replicate the problem:
Open the *scratch* buffer.
Write a long line.
Make the long line exceed the window width with M-xtoggle-truncate-lines. The left hand text (column 0) will now be off the left of the window.
Try M-xscroll-left or its shortcut C-x < to scroll left.
Type y to enable the disabled commands.
NOTHING HAPPENS!
I also tried C-a to go to the beginning of the line.
I also tried M-xtoggle-horizontal-scroll-bar but got the error message "Horizontal scroll bars aren't implemented yet".
There seems to be no way to scroll horizontally!
I need this because I have many wide CSV files to read.
I'm using the latest prelude on emacs 24.5 on Windows 10.
I filed an issue on the prelude project in case it is a genuine bug and could be fixed there.
You seem not to understand how horizontal scrolling works. It's not intuitive, that's why the command is disabled by default.
When I press C-x< at the end of the long line, the line disappears to the left. When I press C-x> there, nothing happens.
Pressing C-x< at the beginning of the long line, though, shows the second part of the long line.
Consider using visual-line-mode or even the csv-mode instead.
There is new a feature in Emacs 26. You can customize mwheel-tilt-scroll-p and use mouse to scroll.
M-x customize group RET mouse
Then set mwheel-tilt-scroll-p to t
No need to handroll it yourself. This is provided out of the box in emacs 27, and it probably was available for longer:
This feature is off by default; the variable mouse-wheel-tilt-scroll turns it on, if you customize it to a non-nil value.
(setq mouse-wheel-tilt-scroll t)
Sounds like xemacs have horizontal scroll in a 'natural' way.
As far as I can see it there is a [Options] button in the menubar, when clicking on it there is a [Frame Appearance] sub menu and there, there are 2 button []scrollbars, [] Truncate Lines
When these 2 buttons are checked in, long line are truncated and scrolling is smooth.
May be xemacs is non standard though.
I use it, I find it easy to cut/paste even rectangular areas, selection is faster and more precise to me that what I could achieve with keyboard meta-ctrl-shift stroke alone.
Cheers
Phi
I

Visual Studio 2013 - Replace All Button gone (not just off screen)

I am unable to perform multi-file text search and replace (in Visual Studio).
In the past, when I opened the "Replace in Files" dialog, there were 4 buttons in the lower right. One of the bottom two buttons allowed me to "Replace All".
The two lower buttons (including "Replace All") are no longer present.
I believe this occurred after I changed some Windows settings so that I could use menus without the Magnifier.
It is not just a matter of the buttons being off-screen because the window is too large (although it is too large - they would be off-screen, if they were present).
I can drag the window and see the bottom, even though the top is then off-screen (I use AltWindowDrag, allowing me to hold the ALT key, and drag by any part of the window, not just the title bar).
The two lower buttons are not present. I'm unable to resize the window - when I try, nothing happens, or the window repositions so that I can see the title bar, but can no longer see the bottom.
The two buttons that are still present (Find Next and Replace) don't have keyboard shortcuts, so I presume that Replace All doesn't either. Nor can I select either of those two buttons using Tab, so probably can't select an "invisible" "Replace All" button that way.
Any help appreciated.
You can use Find and Replace by pressing Ctrl+H and to Replace All just use Alt+A.

How can I get my console window to appear in a different location?

When I open any console window, be it PowerShell or the Command Prompt, it always appears on the far left side of my left monitor. This is waaay too far from my eyes and where I'd like it to be. It doesn't matter if I drag it to the center or exit or close the window, it always reappears in the bad location.
Is there any way to get it to reliably appear where I left it?
Follow this:-
Open cmd.exe or Powershell.exe
Right Click top frame and select Properties
In the Layout tab, find an option for Window Position
Uncheck Let system position window;
Enter your choice and .... smile :) .....

How can I put 0x08 ascii character using MacBook?

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

Resources