Making Programming Easier with Keyboard Macros — Video

Making Programming Easier with Keyboard Macros — VideoSterling Osborne, PhD StudentBlockedUnblockFollowFollowingFeb 2A recent video from Linus Tech Tips introduced how one of their editors uses macros for video editing.

This got me thinking; can macros be easily created to improve my programming?This video demonstrates how creating code macros can be achieved and how useful it can be:BackgroundSource: Linus Tech Tips — Can your Keyboard do THIS?? — Make ANY key a MACRO!As mentioned, the idea came following watching the Linus Tech Tips video.

Now he perhaps took this a little far with 3 keyboards dedicated to just macros (as shown in the image above).

However, I already happened to be using one that had some macro keys so why not utilise it.

The keyboard I have it the Logitech G910 and it has 9 macro keys with 3 profiles for a total of 27 possible combinations.

How it WorksFortunately, the Logitech software makes this pretty easy but it should be simple to replicate with other devices.

I simply assigned each macro to create a text block that pasted some pre-defined code.

I assigned 5 keys with 2 profiles for a total of 10 macros.

These are shown in the image below and demonstrated fully in the video.

Each macro pastes the pre-defined code making it quick and easy to perform some tasks such as:Importing packages/dependencesImport/export dataCreate plots with set formattingCreate for loopsDefine functionsCreate LaTeX equations for markdown cellsThese were just the main use cases I have found for this but am sure each person will have their own ideas based on their requirements.

I hope you found this useful for your own data science tasksThanks.

. More details

Leave a Reply