OOOPS! didn’t error check - should be 7:07 pm (and would be with the right tool). Scripting should be able to handle it, a few search/replaces - a few deletes to line things up as records - and a column swap at the end…
I’ve done this kind of thing lots - but I would appreciate it being 10 minutes!
Writing the script for awk to do it would be (at best) 20 hours for me! And the constant restoring of backups of the original data after ‘testing’ would be wearing on the nvme drive too! Now you can see why a simple recording macro ability would be optimum…
test sequence of keystrokes - 1 minute
record sequence - 1 minute
run and test result - 2 minutes
run 5 search/replace - 2 minutes
test result - 3-4 minutes
vscodium-bin is also a very versatile editor, but I don’t know about the features you mentioned (columnar is supported). See https://code.visualstudio.com/docs.
Type 123456789 in Kate (or any other text editor).
Press F4 to open Konsole embedded in Kate (or open any other terminal emulator).
Run this command in the terminal:
sleep 3; for x in $(seq 9); do xdotool key Right a; done
In the next 3 seconds click in the main Kate window and position the cursor in front of the number 1.
Wait 3 seconds.
The text is now:
1a2a3a4a5a6a7a8a9a
What the macro did was emulate the following keypresses:
→ A → A → A → A → A → A → A → A → A
Of course, this could have been done with a simple regex search and replace, but the point is to demonstrate how macros can be programmed in Bash for any Xorg window.
You can even make a little script like this:
#!/bin/sh
if [ -z "$1" ]; then
printf "Usage:\n macro n_repeats \"key sequence\"\n\ne.g. macro 10 \"a shift+b c\"\n"
exit
fi
printf "Starting in 3..."; sleep 1
printf "\rStarting in 2..."; sleep 1
printf "\rStarting in 1..."; sleep 1
printf "\rStart! \n"
for x in $(seq $1); do xdotool key $2; done
Here is a video demonstration of it:
There, you can now have macros in any program, and you can go back to using your lame text editor and forget about Kate.
Actually, I looked through it, and I got the impression that it can edit IN columns, but not handle columnar block moves. However - this xdotool capability can be made to make an acceptable substitute if it can handle key modifiers as well as keys (shift-arrow as needed, cut, reposition, paste - next line) if it is needed. The rest is more needed anyway.
I’ll be trying out this in Code (VsCode) my main editor - or even in Featherpad for simplicity. Thanks to all who chimed in - and hopefully this will work (and save some time on this one and more).
I cheat with vsCode - I have other people helping with setting it up! I have it with extensions for lua and conky for example - and syntax highlighting for both as well! Certainly a lot of features, but no macros I could find…
That is exactly what happened to me. Especially Kate and Dolphin. I use single click and in Dolphin when the cursor is hovered over the upper left corner of a file, the + or - appears to add or delete from selected files. That is great for my work flow. I won’t even get into how good Kate is.
Dolphin is a great file manager, don’t get me wrong, but I prefer to do my file managing from the terminal. The best thing about Dolphin, in my opinion, is that it has embedded Konsole in it (opened with F4) that automatically cds when you open a folder. So if I use Dolphin, I use it like a variant of Konsole tailored specifically for file management.
Kate also has the same feature, the embedded Konsole, which is great for compiling code, running batch jobs, executing scripts, etc… It’s lovely how those three programs integrate.
The only thing I miss in Kate is Geany’s quick find input field; used that all the time. Now in Kate I have become used to CTRL+F. First world problems.
I don’t see where it has any advantage over XFCE equivalent - Thunar does the cd thing for the terminal - and my editor does the terminal things with choice of terminal…