Skip to content

Instantly share code, notes, and snippets.

@mnarayan
Created October 9, 2025 21:01
Show Gist options
  • Select an option

  • Save mnarayan/80da21c4197c3084828a4c6c636f3e8b to your computer and use it in GitHub Desktop.

Select an option

Save mnarayan/80da21c4197c3084828a4c6c636f3e8b to your computer and use it in GitHub Desktop.
Productivity keyboard shortcuts for ML/Stats researchers working with R, Python, and RunPod

Productivity Keyboard Shortcuts for ML/Stats Research

Tailored for ML/Stats PhD researchers working with R, Python, and RunPod infrastructure

Cursor Editor Shortcuts

Code Navigation & Editing

Shortcut Action
Ctrl+P Quick file open
Ctrl+Shift+F Search across all files
Ctrl+D Select next occurrence (multi-select)
Ctrl+/ Toggle comment (R & Python)
Alt+Up/Down Move line up/down
Ctrl+Shift+K Delete entire line
Ctrl+Space Trigger autocomplete
Ctrl+Shift+P Command palette
Ctrl+B Toggle sidebar
`Ctrl+`` Toggle terminal

AI Assistant (Cursor-specific)

Shortcut Action
Ctrl+K Inline edit with AI
Ctrl+L Open chat with AI
Ctrl+Shift+L Quick question without opening chat

Multi-cursor Editing

Shortcut Action
Alt+Click Add cursor at click position
Ctrl+Alt+Up/Down Add cursor above/below current line
Ctrl+Shift+L Select all occurrences of current selection
Ctrl+U Undo last cursor operation

Code Intelligence

Shortcut Action
F12 Go to definition
Alt+F12 Peek definition
Shift+F12 Find all references
F2 Rename symbol

Terminal Shortcuts (Linux/Bash)

Command Line Navigation

Shortcut Action
Ctrl+R Reverse search history (essential!)
Ctrl+A Jump to start of line
Ctrl+E Jump to end of line
Alt+B Move backward by word
Alt+F Move forward by word

Command Line Editing

Shortcut Action
Ctrl+U Delete from cursor to start of line
Ctrl+K Delete from cursor to end of line
Ctrl+W Delete previous word
Alt+D Delete next word
Ctrl+Y Paste (yank) deleted text

Process Control

Shortcut Action
Ctrl+C Kill current process
Ctrl+Z Suspend current process
Ctrl+L Clear screen
Ctrl+D Exit shell / EOF

Jupyter Notebooks

Cell Operations

Shortcut Action
Shift+Enter Run cell and move to next
Ctrl+Enter Run cell and stay
Alt+Enter Run cell and insert below

Command Mode (Press Esc first)

Shortcut Action
A Insert cell above
B Insert cell below
M Convert to markdown
Y Convert to code
D, D Delete cell (press D twice)
Z Undo cell deletion
Shift+M Merge selected cells

Edit Mode

Shortcut Action
Ctrl+Shift+- Split cell at cursor
Ctrl+] Indent
Ctrl+[ Dedent

R-Specific (RStudio/Positron if used)

Shortcut Action
Ctrl+Enter Run current line/selection
Ctrl+Shift+M Insert pipe operator %>% or |>
Alt+- Insert assignment <-
Ctrl+Shift+C Comment/uncomment
Ctrl+1 / Ctrl+2 Focus editor/console

Most Impactful for Your Workflow

Based on working with ML/Stats research across different RunPod instances:

  1. Ctrl+R (terminal) - Search bash history for your infrastructure commands (sync_to_s3, ghcreate, etc.)
  2. Ctrl+P (Cursor) - Lightning-fast file switching across projects
  3. Ctrl+Shift+F (Cursor) - Find code patterns across your entire workspace
  4. Ctrl+K (Cursor AI) - Inline AI refactoring for quick code improvements
  5. Ctrl+D (Cursor) - Multi-select for renaming variables without find-replace dialogs

Pro Tips

  • Create bash aliases for your most-used commands in /workspace/.bashrc:

    alias s3p='sync_to_s3'  # Quick sync push
    alias s3u='sync_from_s3'  # Quick sync pull
  • Use Ctrl+R like a pro: Type partial command, hit Ctrl+R repeatedly to cycle through matches

  • Multi-cursor power: Select a variable with Ctrl+D, keep pressing to select more occurrences, type once to change all


Created for efficient ML/Stats research workflows on RunPod infrastructure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment