Coding productivity tips
Apps/Utilities
Sublime Text is an elegant, fast, and lightweight text editor for macOS, and it is my preferred choice for Python/C++ editing. Seriously, VS Code and PyCharm are so much slower that I wonder if people who use them like waiting around for files to open or for project searches to finish.
Cmd-P
– Quick open file by name (I have remapped this to Cmd-T)Ctrl-G
– Go to line number (I have remapped this to Option-G)Opt-D
– Insert python debugger (This is a custom shortcut)
rg is far and away the fastest way to search through a large repo of source code from the terminal.
Magnet is the Mac equivalent of Window’s only useful innovation over the past decode: Snap Assist. For any given project, I probably have a 4 windows open (Slack, iTerm2, a jupyter notebook, and Sublime Text). Magnet gives you keyboard shortcuts and sticky screen edges to move any give windows to any half or quarter of the screen.
Ctrl-Opt-Left (Ctrl-Opt-Right)
– Move window and resize to fill left (right) half of screen.Ctrl-Opt-U
– Move window and resize to fill top left half of screen. I use U, I, J, and K to move windows to the top left, top right, bottom left, and bottom right quarters of the screen. But these shortcuts are easy to customize.
CopyPath is a Mac utility that lives in the menu bar and lens you copy the full path of any selected file(s). It's indispensable for anyone that uses both the terminal and the Finder. zsh is a bash alternative which has several nice features: A shared command history between all terminal windows, a built in git aware prompt, and a default pretty color scheme
General mac text editing shortcuts
Ctrl-A (Ctrl-E)
– Move cursor to the beginning (end) of the current line
Opt-left (Opt-Right)
– Move cursor one word back (forward)
Shift-Opt-Left (Shift-Option-Right)
– Select previous (next) word
Opt-Backspace
– Delete previous word
Posted by Abraham