Earlier quoted context omitted.
Do they still do this? I'm using PyCharm daily but have never seen it. Would indeed be pretty cool!
It is probably this plugin https://github.com/halirutan/IntelliJ-Key-Promoter-X
Small programming tricks
221–230 of 239 posts
Re: Small programming tricks
#222 //*
normal path
/*/
debug path
//*/
take away the the first slash to toggle the debug zone ON!Re: Small programming tricks
#223Earlier quoted context omitted.
The OS-wide Emacs bindings are one of the main things still keeping me on macOS; in editors like Helix (or Zed with Helix mode) I invoke these really cursed combinations of the Helix(vim-like) shortcuts in the editor with the Emacs ones from the OS and it feels really natural as a means of moving around text. I haven't put in enough effort to replicate the experience on GNOME but once I jump ship from Apple I'll have…
I think gnome just had this as an option somewhere. Asking chatgpt says that this was removed in GTK4, so maybe it's no longer a thing?
Re: Small programming tricks
#224Re: Small programming tricks
#225Earlier quoted context omitted.
I’ve read that if you’re trying to overturn a habit with a new habit, it’s best to undo whatever it is you did the old way, then redo it the new way. So if you want to use ctrl-r, but you’re using the up key, use the down key to navigate back to a clear line, then use ctrl-r. Do it enough times and your brain will work overtime to find a shortcut (aka just doing it the new way).
Temporarily binding the up arrow in the shell to echo "Use Ctrl-R" is probably the quickest way to un-/re-learn
Re: Small programming tricks
#226I am so proud of this (I'm sure others came up with it way before me, but I still came up with it all by myself!) //* normal path /*/ debug path //*/ take away the the first slash to toggle the debug zone ON !
Re: Small programming tricks
#227Earlier quoted context omitted.
Another one, not quite as handy but still awesome: ctrl s / ctrl-q. This freezes/unfreezes the terminal output so you can read it, without interrupting your program. Useful for very fast walls of text.
Oh so that is what this is for. I thought ctrl-q / ctrl-s are there as a nasty way to screw with users, who every now and then accidentally press one of these, and find their terminal frozen and no longer visibly reacting to input, for no apparent reason.
The advantage of doing it this way ('software flow control') is it worked with just TX and RX lines, rather than having to connect up additional wires to indicate when the terminal was busy ('hardware flow control').
Re: Small programming tricks
#228Simple trick I use almost daily for navigating backwards to an exact directory: https://gist.github.com/GNOMES/6bf65926648e260d8023aebb9ede9... I use this often instead of chaining together multiple '../..'. Also nice for when I use Zoxide to CD into a deep nested directory. I quickly found out unless you manually CD each hop, the different parent directories aren't added to your Zoxide DB. (I have come across snippi…
#!/bin/bash
# SSH to remote system and change into same (current) directory
DIR=$(pwd)
ssh -t $1 "cd $DIR; bash -l -i"Re: Small programming tricks
#229Earlier quoted context omitted.
Hot-desking killed this practice. I now get desk anxiety on my in-office days
I am young enough that my entire career has been markdown files, screenshots, and photos on my phone. I (a)sync everywhere by pushing git lfs commits to my home server. Seems like overkill until it saves my ass. It continues to do so almost half a decade into all the LLM hype. It hits the sweet spot between simplicity, convenience, reliability, and precision. People strongly underestimate how good the git life can be…
Don't let IT hear that unless you work on FOSS.
Re: Small programming tricks
#230I am so proud of this (I'm sure others came up with it way before me, but I still came up with it all by myself!) //* normal path /*/ debug path //*/ take away the the first slash to toggle the debug zone ON !
#if 0
// Normal path
#else
// Debug path
#endif
Only works with C and C++, though.