Copy/pasting feature in codeblocks in linux - linux

I have installed Code::Blocks 12.11 in my linux mint but pasting input at runtime in the command line(I think it is called command line)doesn't seem to work.I have to type the whole input inorder to get output.Can anybody tell me how to fix this?
P.S :- I have tied ctrl+V as well as right click and paste but nothing really working in my case

This problem arises when you have xterm as your launch terminal.You can solve this by switching your terminal from xterm to gnome-terminal.
Go to Settings -> Environment -> Terminal to Launch Console Programs
and change the launch terminal from xterm to gnome terminal from the options.

In the terminal, for copy and paste:
Shift+Ctrl-c and Shift+Ctrl-v
In the Xterm, for pasting:
Middle click or Shift-Insert
if you want to copy in the xterm, you just select the text with your mouse and paste using the middle click or Shift-Instert, but it just works inside the xterm.

Related

How to open a new terminal in VS Code from command line?

Is it possible to open a new terminal tab in VS Code from the command line? I know it's possible to have hotkeys and click the icon in the GUI. However, I need to do this from a script to have several terminals. I am running Ubuntu within a Docker devcontainer. I looked at the solution of using a terminal multiplexer, which might work, but it doesn't seem necessary.

Number pad issues when using a remote 'nano' instance in PuTTY

I'm using PuTTY on an old Windows laptop to communicate with Ubuntu.
When using the terminal, everything is fine and I can use the numpad normally. However, when I open anything in nano, all these keys have functions instead of numbers.
I did a search about this and found a few solutions to change PuTTY settings, but they didn’t have any effect. Is this an issue with PuTTY or with nano?
For anyone else with this problem—this is PuTTY specific and is caused by the application keypad mode sending escape sequences to nano.
To solve it:
From an open PuTTY terminal:
Ctrl + right-click to bring up the context menu
Select "Change Settings..."
Select Terminal → Features in the left-hand navigation tree
Check "Disable application keypad mode"
Reference: Description of bug on the Vim (FANDOM.com??) wiki
nano uses the curses keypad function, turning it on (so that curses handles cursor-keys). The terminal description turns on application mode for both the cursor-keys and the numeric keypad, which with PuTTY makes it send the non-numeric stuff.
You could modify the terminal description to remove the numeric-keypad part of the smkx capability:
infocmp -1 >foo
vi foo
... look for smkx=\E[?1h\E=,
... change that to smkx=\E[?1h,
tic foo

Select(mark) & right click paste feature (like on cisco's IOS) on linux (bash)

Is it possible to make/enable/config bash on linux to be able to copy content from terminal by just selecting it and to paste by right click (like when you connect to switch/router with ssh)?
Yep it is in fact it's on by default in most terminals see below for example. Ctrl-Shift-C & Ctrl-Shift-V are also very helpful in this regard. I'm using konsole in KDE but gnome-terminal and nearly every other terminal has this ability.
Without X/Gnome/KDE: if you install gpm you can use your mouse for copy/mark and paste on console.

Odd behavior of backspace in Vim (SSH to Linux from Mac)

I didn't change any setting of my Vim, but today the Backspace gets some crazy behavior. Every time when I hit it, it does not delete a character, but prints ^?. Anyone knows what is going on?
Not sure why it would randomly start doing this based on the information you gave, but trying adding this line to your .vimrc
set backspace=start,eol,indent
The problem comes from the communication between Mac Terminal the Linux Terminal.
Go to the Mac Terminal -> Preferences -> Advanced tab, check the option "Delete sends Ctrl-H". Then after I login to Linux, and Backspace works just fine in Vim.
In Mac Mavricks and Yosemite Open a terminal, then command+, for preferences, click on the profile tab, click on the -keyboard- menu, then add +
Key: very bottom, <= Delete
Modifier: ^ Control
Action: Send Text
Text: H
click Ok

Cygwin non-US or indirect characters don't work in xterm on extra monitor

I have run into this freaky thing in two places now, on a Windows 7 and an XP machine.
I have a laptop with an extra monitor connected. I start up cygwin's x-server, using the start menu shortcut (Cygwin-X/XWin Server). I then start an xterm by right-click the X icon in the icon tray at the bottom right, and selecting Applications/xterm.
I get an xterm. In it I can type text, but depending on which monitor the xterm window resides, all characters that require two keypresses on my swedish keyboard (example: "~" requires me to first press alt+the key marked "^ ¨ ~" and then press space, rendering a single ~ on the screen) result in a space being printed.
If I move the xterm to the other monitor, I am suddenly able to type a ~ in the xterm. Move it back to the previous monitor, and I can't type ~ anymore.
Weird or what? This is the problem I have now, on my XP laptop. On my Windows7 laptop (same basic setup) I had the problem that I could only type stuff like åäö (not indirect/combined characters - I have keys marked å, ä and ö respectively on my keyboard) on one monitor, not the other.
I have messed around with different ways to start up the X Server, I think I am doing it the right way as I describe here.
My cygwin installation is maybe a year old on both machines. I would like to be able to find whatever setting causes this behaviour, so I can handle it should I come across similar problems in the future.
Any ideas?
Edit: some stuff that looked like html tags got mangled.
Since this seems to be a problem only with xterm, as a simple workaround I would suggest using some other terminal emulator instead of xterm. On Cygwin, a really nice substitute is mintty (available as a Cygwin package from within Cygwin setup). I stopped using xterm in favor of mintty some time ago because I found it to simply be an all-around more useful terminal emulator.
As a possible side benefit of using mintty, if xterm is the only X application you typically use, then you don't even need to run an X server any more because mintty is not an X application.

Resources