SciTE's Ctrl-D keybind for Visual Studio?
#1
Posted 11 July 2012 - 05:37 PM
#2
Posted 11 July 2012 - 05:49 PM
Anyway, no, I don't think Visual Studio has a duplicate command. Does the Express edition allow macros? If so then It should be trivial to write a macro and bind that macro to a hotkey.
#3
Posted 11 July 2012 - 06:33 PM
I somethimes duplicate a line with Ctrl+d, change the new line with something from the clipboard (because I didn't loose it because Ctrl+d) and comment the other line out.
BTW: You can also mark something in the line and duplicate it.
Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.
#4
Posted 11 July 2012 - 06:44 PM
That's not true. From the libraries I've been using lately, you can't loop many functions like glEnable and glLight*(). (well you can, it just won't be efficient)If something (in source code at least) needs to appear multiple times then it should be stored in a variable, called in a loop, et cetera.
These functions just need to appear one by one in the source code.
Correct me if I'm wrong.
cool, didn't know thatBTW: You can also mark something in the line and duplicate it.
Edited by Info, 11 July 2012 - 06:45 PM.
#5
Posted 11 July 2012 - 07:34 PM
How can I correct you when all we have to go on is your word? I don't know what libraries you are using nor what the code you've written looks like. Maybe you are right and you have to duplicate line after line. That would be strange to me, though, and is either a sign of a problem either in your code or understanding of the library, or it's a problem with the library itself.That's not true. From the libraries I've been using lately, you can't loop many functions like glEnable and glLight*(). (well you can, it just won't be efficient)
These functions just need to appear one by one in the source code.
Correct me if I'm wrong.
#6
Posted 11 July 2012 - 08:36 PM
Any compiler worth its salt will unroll short loops. And it will probably find some way to make it more efficient in the process.That's not true. From the libraries I've been using lately, you can't loop many functions like glEnable and glLight*(). (well you can, it just won't be efficient)
These functions just need to appear one by one in the source code.
Correct me if I'm wrong.
I don't know where I'm going, but I'm on my way.
#7
Posted 11 July 2012 - 09:07 PM
Here are some shortcuts for common editors and a macro for VS: http://stackoverflow.com/questions/2279000/visual-studio-short-cut-key-duplicate-line
Edited by ProgAndy, 11 July 2012 - 09:10 PM.
#8
Posted 11 July 2012 - 09:36 PM
I guess. I don't see where it's much better than traditional copy and paste, though. Yes, it saves a couple keystrokes since you don't have to copy the data. I guess it doesn't alter the clipboard, either, which might, in theory, be useful sometimes.It can be really useful if you are trying to do some changes in a line while keeping a backup of the original line. I also found me using it when adding data in a 2D-array. Write the variable and the brackets, then duplicate the line and fill in the data.
Still though, I'm not seeing a compelling reason for using it. I don't even have it bound in SciTE, I use Ctrl+D for something else.
#9
Posted 11 July 2012 - 11:17 PM
you could correct me if you knew the library I was talking about.How can I correct you when all we have to go on is your word? I don't know what libraries you are using nor what the code you've written looks like. Maybe you are right and you have to duplicate line after line. That would be strange to me, though, and is either a sign of a problem either in your code or understanding of the library, or it's a problem with the library itself.
Thanks ProgAndy
#10
Posted 12 July 2012 - 12:42 AM
#11
Posted 12 July 2012 - 12:54 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users





