copy-paste

Copy lines in visual mode in vim

大憨熊 提交于 2019-12-03 00:33:35
问题 Just a question about copy/paste workflow in gVim. Right now I'm working on a document. I want to select some lines of code and copy and paste. I'm using gVim (Windows). If I use Control + C and Control + V, gVim takes sometimes 2, 3 seconds to paste... The other way is using, Shift + v (right, now I'm in visual mode), then I keep the Shift key pressed and drag my selection with the mouse. Now I can copy with 'y' or 'c' and paste with 'p'. This is faster, but I have to keep the Shift key

Debugging a segmentation fault when I do ctrl c

≡放荡痞女 提交于 2019-12-02 23:54:30
I get a segmentation fault when I cancel my program. I am using gdb for debugging, the problem is that when I press Ctrl-C while I am debugging gdb does not cancel the program and do what it is supposed to do that is stop it. What I want is do the Ctrl-C and do not allow gdb to stop it. Is there any way to do this? Any other recommendations for debugging? I cannot use printf because sincerely I have not a clear idea where the problem comes from. Charlie Martin gdb is intercepting the signal. When you press CTRL-C, you're actually causing the terminal driver to generate a SIGINT. What you need

Copy to clipboard with jQuery/js in Chrome

廉价感情. 提交于 2019-12-02 23:25:24
I know this kind of question has been asked here for many times, including: How do I copy to the clipboard in JavaScript? or How to copy text to the client's clipboard using jQuery? , I'm narrowing the scope: Condition: works fine in Google Chrome (would be nice if cross-browser, but not necessary) with no flash Is there such a solution or workaround? You can use either document.execCommand('copy') or addEventListener('copy') , or a combination of both. 1. copy selection on custom event If you want to trigger a copy on some other event than ctrl-c or right click copy, you use document

How to paste before the cursor after selecting a vertical block?

半城伤御伤魂 提交于 2019-12-02 22:01:26
I'm so sure that this must exist, but if it doesn't maybe there is a macro for it... One of my most favourite features of vim is the insert before when in visual mode ( <C-v> , select the lines, <C-I> , type a little, then Esc ). My issue is that I want to paste the clipboard contents before, not 'insert'. I tried <C-P> but no love. I have read cheat sheets, searched everywhere, looked through the questions on here and haven't found it, but I could definitely be searching for the wrong thing. I assume you mean using I in visual block mode to insert the same text on multiple lines, where

Similar code detector

泪湿孤枕 提交于 2019-12-02 20:44:44
I'm search for a tool that could compare source codes for similarity. We have a very trivial system right now that has huge amount of false positives and the real positives can easily get buried in them. My requirements are: reasonably small amount of false positives good detection rate (yeah these are going against each other) ideally with a more complex output than just a single value usable for C (C99) and C++ (C++03 and optimally C++11) still maintained usable for comparing two source files against each other usable in non-interactive mode EDIT: To avoid confusion, the following two code

Copy and paste in vim via keyboard between different mac terminals?

落爺英雄遲暮 提交于 2019-12-02 19:28:02
Can anyone help me with this: I'm trying to figure out how to copy and paste text between 2 different instances of vim on different terminals (using iterm2 or mac terminal). I can do it using the mouse if I do ":set mouse=a" but I'd like to be able to do it using the keyboard. I've googled around and it says you can use the "* or "+ registers to copy/paste to/from the system clipboard, but when I type * or + in vim, the mac makes one of those sounds it makes when you can't do something. I've also done ":set clipboard=unnamed" but that hasn't worked either. I'm using Mac OSX 10.7 (Lion) and

Fastest way to move files on a Windows System [closed]

一笑奈何 提交于 2019-12-02 18:58:21
I want to move about 800gb of data from an NTFS storage device to a FAT32 device (both are external hard drives), on a Windows System. What is the best way to achieve this? Simply using cut-paste? Using the command prompt ? ( move ) Writing a batch file to copy a small chunks of data on a given interval ? Use some specific application that does the job for me? Or any better idea...? What is the most safe, efficient and fast way to achieve such a time consuming process? Robocopy You can restart the command and it'll resume. I use it all the time over the network. Works on large files as well. I

Disable copying entire line when nothing is selected in Intellij

不羁岁月 提交于 2019-12-02 18:50:19
I have recently started using Intellij and I noticed that by default, when you do ctrl+c for copying something when you have nothing selected, it copies the entire line into the clipboard overriding what I had in there before. This is really annoying yet I cannot seem to figure out how to disable it. I am aware that there is a paste history you can use however this is not what I am after, I just want to disable it like you can do with sublime text. Is there a way to disable this behaviour so that when I press ctrl+c and nothing is selected it just leaves the clipboard alone? Invoke Help | Find

How to convince a colleague that code duplication is bad?

妖精的绣舞 提交于 2019-12-02 17:57:36
A colleague of mine was implementing a new feature in a project we work on together and he did it by taking a file containing the implementation of a similar feature from the same project, creating a copy of it renaming all the global declarations and slightly modifying the implementation. So we ended up with two large files that are almost identical apart from renaming. I tried to explain that it makes our project more difficult to maintain but he doesn't want to change anything saying that it is easier for him to program in such way and that there is no reason to fix the code if it "ain't

Find cells on one sheet and copy the rows to another sheet

为君一笑 提交于 2019-12-02 16:32:45
问题 I have a sheet called Backlog containing rows and columns of data. I need code that will search row by row in the 2nd to last column looking for #N/A. When it finds #N/A it needs to check the last column if it contains a C or not. If it contains a C then the whole row should be appended to a sheet called Logoff. If the last column does not contain a C then the whole row should be appended to a sheet called Denied. The row should be deleted from the original Backlog sheet once moved to either