In Spyder, ctrl+c will overwrite the previously copied even when the selection is empty, unlike most other applications (apparently Atom and Sublime Text also do this). It frequently happens that I want to paste with ctrl+v, and hit copy instead, which is an annoying waste of time.
Is there a way to disable this behavior?
Sidenote: ctrl+x doesn't overwrite when nothing is selected, so Spyder isn't consistent there.
(Spyder maintainer here) This is the behavior of most applications, i.e. they replace the previously copied text with your new selection. I don't see how we could avoid that, other than maintaining a list of previously copied text so you can go back and select an entry on it.
However, that's something other applications are specifically designed to do (e.g. Klipper on Linux), so you should be better by installing any of them. Their generic name is Clipboard managers.
Related
I frequently want to copy snippets of command outputs to the web browser. Doing so is nice and simple in gnome-terminal (mouse-select, right-click, copy) but seems to be not so straightforwardly possible in byobu.
The procedure for copying outlined in the docs is:
Enter scrollback using alt-pgup or alt-pgdn, press the spacebar to start highlighting text, use up/down/left/right/pgup/pgdn to select the text, and press enter to copy the
text. You can then paste the text using alt-insert or ctrl-a-].
However, this doesn't copy to system clipboard (and seems to involve quite a few keystrokes)
This source suggests using xsel
https://askubuntu.com/questions/33789/how-do-i-integrate-byobus-copy-buffer-with-the-x-clipboard
which doesn't work for me and would be rather less convenient anyway(what if I want to scroll up to several commands earlier that ran in a different context?)
What I would like is, ideally, a way to copy to the system clipboard that works in the same as gnome-terminal eg. highlight -> ctrl+shift+c or right-click copy or some way to integrate the byobu copy buffer with the system copy buffer.
I'm using Ubuntu 16.04 with Gnome and byobu 5.106-0ubuntu1
As pointed out in this comment, holding the shift key seems to be the solution to your problem. So:
Shift+F11 to zoom in on the split that you want to copy from
Shift+select what you want to copy
Shift+right click, copy (or by the way, Shift+Ctrl+C that also works in gnome-terminal)
I had some issues when selecting command outputs bigger than an entire screen, mouse select may be harder on these cases. My preferred method is to use <shift+F7> to capture output from desired split to a new PRINTSCREEN.
After that I select the desired portion of output at PRINTSCREEN using editor shortcuts and then getting it into system clipboard (e.g. using vim select then "+gy).
In Delphi 10 Seattle, I clicked the "Delete invalid paths" button in Options->Library->LibraryPath and it messed with some of the default environmental paths. Is there a way to restore the default settings?
For example:
$(BDSLIB)\$(Platform)\
$(BDSCOMMONDIR)\Dcp\$(Platform)
(these are invalid)
There are default and build in way for restore your settings. This way available for many years (more than 15)
run Delphi with command line parameters -rXXX
bds.exe -rXXX. What will happen:
The name you provide after -r is a registry hive. If that registry
hive does not exist, the IDE create a brand new registry hive with all
the defaults and uses it. Because this takes you back to all the
default settings, it fixes most start up problems with the IDE. Note
that because custom controls are not part of the defaults, this
technique will result in your IDE not having any custom controls you
have installed previously. Custom controls are the most common cause
of this error, so you will probably want to add any you have one at a
time and test.
Your new registry hive will be stored in the registry at
HKCU\Software\Embarcadero\name\version. Your current settings for the
IDE are stored at HKCU\Software\Embarcadero\BDS\version. You can
compare the two registry hives using regedit to see what is different.
you could restore your Library/Browsing path from new environment, by copy them from XXX environment and paste it to regular one.
Read more at http://docwiki.embarcadero.com/RADStudio/Berlin/en/IDE_Command_Line_Switches_and_Options and on http://support.embarcadero.com/es/article/42597
There's no way to restore them short of a reinstall. However, here are the ones I have in my Seattle installation (which should be pretty vanilla, since it's a fairly fresh install on a new laptop and I've been using Berlin). I'll put it in two formats - a direct copy/paste version and a list of individual items, so you can use either easily.
Single line copy/paste:
$(BDSLIB)\$(Platform)\release;$(BDSUSERDIR)\Imports;$(BDS)\Imports;$(BDSCOMMONDIR)\Dcp\$(Platform);$(BDS)\include;
Individual entries:
$(BDSLIB)\$(Platform)\release;
$(BDSUSERDIR)\Imports;
$(BDS)\Imports;
$(BDSCOMMONDIR)\Dcp\$(Platform);
$(BDS)\include;
I want to send the file I'm currently editing to a printer, like I did in Notepad++ for example.
I havn't found any hint on a print command. Is it not possible ?
It is not yet available, but I found an issue report for that feature.
It's currently in the backlog, so we can expect it soon.
https://github.com/Microsoft/vscode/issues/5953
Edit:
In the meantime:
https://marketplace.visualstudio.com/items?itemName=nobuhito.printcode
https://marketplace.visualstudio.com/items?itemName=pdconsec.vscode-print
Now you can install addon for VS Code - search "PrintCode".
Note that the repository for this extension was last updated in February 2018 with numerous issues outstanding.
I found the PrintCode extension inspiring but unfinished and with a number of flaws. In particular it depends on a specific paper size to wrap and as a result does not respond well if you change paper size or orientation in the print dialog.
It's open source so I looked at the code and didn't like that either. No programmer ever likes another's coding style. So I pinched the idea of using a web-browser as platform driver for HTML printing -- my hat is off to the PrintCode author for that cunning insight -- and wrote my own.
In the process I fixed all the known bugs, added everything on my wishlist and a couple of things suggested by others. The biggest thing was figuring out the CSS required to respect print dialog paper size and orientation. This also sorts out the mysterious disappearing line numbers problem, although I'm not sure why. The next biggest thing was learning to probe for an unused port, a problem that also afflicts PrintCode causing the browser to open showing no content.
Major issues
PrintCode depends on a web service. You can't use it offline.
Many people want to be able to open a file, select a portion and print just the selection.
The print dialog supports changing paper size and orientation. This clashes with the way PrintCode works.
Some people like to run multiple VS Code windows.
When you print a markdown file, you probably don't want it printed like a text file when it can be rendered with fonts and proper headings and bullets etc.
Support is required for remote workspaces.
Because each instance of VS Code needs a different port for its embedded webserver, you can't just use a setting. Dynamic port allocation is necessary.
Remote workspaces weren't even a thing until two years after maintenance ceased on PrintCode.
If you want to survey your options, get onto https://marketplace.visualstudio.com, choose the Visual Studio Code tab and search for printing.
If you just want a link to my version, it's here http://marketplace.visualstudio.com/items?itemName=pdconsec.vscode-print.
If you like what you see but need something I haven't thought of, the marketplace page has a link to the repo on github. Create an issue and tell me what you need -- or write it yourself and submit a PR.
Now there is an extension available for printing from the VS Code Editor.
It's called VS Code Printing Free.
I've tried it for a couple of days and it works fine.
Poor man's answer: Copy code to Notepad2 or Notepad++ and print from there.
The colour coding will be different though
You can use an Extension of VS Code: PrintCode
Install extension PrintCode
On Mac: command + shift + P
choose command> PrintCode
I have modified the https://marketplace.visualstudio.com/items?itemName=pdconsec.vscode-print. If you change the values that I have marked in the picture in the extension settings a browser tab opens with the you can then print this also works on the Ipad. It works also with the code-server Version inside a Docker Container.
I put the file on github https://github.com/chrishdx/vsc-print
enter image description here
I'm having some kind of problem with my project that me and my friend is working on. When I try to open the project that I've been working on it gives me an error message saying that "one or more lines were too long and have been truncated" and thus I can't see my code or GUI. When my friend opens the project on his computer (The project is on dropbox so it's the same file) there's no problem at all. I've googled but couldn't find anything. I just did a repair of RAD Studio but no luck. We have 2 forms and a unit that we use, the unit and the mainform isn't working for me but the second form is no problem.
Thanks!
Make a copy of your project directory.
Search your harddisk for XXXX.pas and XXXX.dfm
Hopefully there will be some temperary files that match - like "mylostform.dfm.~1307~" . copy the newest to your project directory, and rename them to "mylostform.dfm" and "mylostform.pas".
Kind regards,
Geir Bratlie
From the comments, you have Dropbox, and the Restore functionality is available, but using it would cost you a week's worth of work.
If I was in that situation, here's what I would do:
Copy the current file to somewhere else (My Documents, for example).
Use Dropbox Restore to get the old version that works.
Make a copy of this, because you're going to be modifying it
Ensure that you can open it in the IDE.
Use Beyond Compare to open the two files side-by-side. (If you don't have this, you really should!)
If they're completely different from each other, you have a serious problem. If not, you'll see the changes you've made. Start copying changes one at a time, and after each change, save and try to open it in the IDE.
At some point, you won't be able to. That's where your problem lies. Now you can fix it!
We have a Delphi program whose task is like a service program. It watches a particular folder for a certain period, and it works great on Windows XP and 2003, but on Windows 2008r2 64bit, when it wants to create an automatic folder, it will show this message:
The ... folder does not exist. The file may have been moved or deleted.
This message causes the program to halt, which is not good; it should not be interrupted.
What can I do about this?
P.S.: I really don't have any idea whether to post my problem in Stack Overflow or Server Fault, so I've guessed it should be here.
It's likely the VirtualStore, if you're trying to store beneath Program Files (either one). See my writeup:
http://www.clipboardextender.com/off-topic/vista-program-files-hide-and-seek
You've left out the ... folder name. While that's understandable, it wouldn't happen to have anything to do with program files (which on x64 will be split in 2 directories) would it?
Windows Server 2008 is able to use 'virtual' file pathes. That means: 'what you see is not what you get'. The Windows Explorer just shows you the 'display' name. Check the file path with cmd.exe, if the path you are trying to use does realy exist.
The reason is of cause the File Virtualization (see for example http://msdn.microsoft.com/en-us/library/bb756960.aspx and http://technet.microsoft.com/en-us/magazine/2007.06.uac.aspx).
Because we on stackoverflow.com and not on serverfault.com I want add to all other answers that you can use Wow64DisableWow64FsRedirection, Wow64RevertWow64FsRedirection and Wow64EnableWow64FsRedirection functions (see http://msdn.microsoft.com/en-us/library/aa365743.aspx) to control the File Virtualization in your program. An example of the usage of this functions in C# you can find here http://www.pinvoke.net/default.aspx/kernel32.wow64disablewow64fsredirection.
You'll need to tell us the exact path and how do you go about constructing it. It can be as simple as the app not using env variable expansion but assuming that user's folders are where they were before.
Path virtualization (there are 2 kids actually) that people mentioned will hit you only if your app is trying to mess with system folders.
More puzzling problem will hit you if you are not expanding env vars like APPDATA, LOCALAPPDATA etc. and not expecting that there's more of them on Win7 and 2k8. Not only that default paths of user's files changed but some of them can also be on network shares - for the same user. So if you were running based on expectation that all user's stuff will be at definite paths under say %USERPROFILE% you can get hit by several surprises. Also notice %ProgramData% .
Fastest way to find out - open cmd.exe, run set and if you see some paths that you are constructing in alternative ways, take notice that you need to start expanding env vars for them. Then open cmd.exe as a 32-bit app and check set again. You can also pick them up via Process Explorer from some running 32-bit or 64-bit app.
Switching your app to 64-bit build will resolve most of virtualization issues but not the env var expansion. Also if your app is touching system folders you need to request elevated run from the code or even better make the manifest and declare it there. Then OS will yell at user up front if his UAC is on and your app will avoid that 2nd virtualization. BTW, virtualization is controllable via group policies so it might be present on some boxes and missing on others.