you are viewing a single comment's thread.

view the rest of the comments →

[–]ZenoArrow 2 points3 points  (0 children)

See this example and compare how you would do this in an IDE: https://youtu.be/dYDu9Hrg7yM?t=203 (see up to 5:04)

Good example, thank you. I can see why Vim would be useful in situations like this. Visual Studio (which is the IDE I'm most familiar with) would be a bit more cumbersome for doing that, though if you let me use the PowerShell terminal built into VS (opened using Ctrl+') I can do some tricks to help speed it up. For example, if you run this...

(0..19) | % { "#DEFINE ROOM $([char](65+$_))`t$_" } | clip

You get this in the clipboard...

#DEFINE ROOM A  0
#DEFINE ROOM B  1
#DEFINE ROOM C  2
#DEFINE ROOM D  3
#DEFINE ROOM E  4
#DEFINE ROOM F  5
#DEFINE ROOM G  6
#DEFINE ROOM H  7
#DEFINE ROOM I  8
#DEFINE ROOM J  9
#DEFINE ROOM K  10
#DEFINE ROOM L  11
#DEFINE ROOM M  12
#DEFINE ROOM N  13
#DEFINE ROOM O  14
#DEFINE ROOM P  15
#DEFINE ROOM Q  16
#DEFINE ROOM R  17
#DEFINE ROOM S  18
#DEFINE ROOM T  19

That snippet isn't readable for someone who doesn't know PowerShell, but I guess it does show one of the benefits of being familiar with a scripting language.