Skip to content

Instantly share code, notes, and snippets.

@Maple-pro
Last active September 24, 2024 12:28
Show Gist options
  • Select an option

  • Save Maple-pro/988bbfc01e39c8b110cf988a22e54f8f to your computer and use it in GitHub Desktop.

Select an option

Save Maple-pro/988bbfc01e39c8b110cf988a22e54f8f to your computer and use it in GitHub Desktop.

Revisions

  1. Maple-pro revised this gist Sep 24, 2024. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -57,6 +57,8 @@ Key Mappings | Details
    `<leader><Arrow>` | Go to pane.
    `<leader>x` | Close current pane.
    `<leader>&` | Close current window.
    `<leader>[` | Enter copy mode.
    `<leader>]` | Paste.
    `<leader>I` | Install plugins with TPM.
    `<leader>U` | Update plugins with TPM.
    `<leader> <Alt>-u` | Remove plugins with TPM.
  2. Maple-pro revised this gist Aug 18, 2024. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -107,6 +107,7 @@ Key Mappings | Details
    `<Ctrl>-\` | toggleterm: toggle terminal
    `<leader>git` | toggleterm: lazygit terminal
    `<leader>th` | toggleterm: horizontal terminal
    `<leader>tv` | toggleterm: vertical terminal
    `<leader>tt` | toggleterm: tab terminal
    `<leader>tf` | toggleterm: float terminal
    `<leader>gj` | gitsigns: next hunk
  3. Maple-pro revised this gist Jul 12, 2024. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -124,6 +124,8 @@ Key Mappings | Details
    Key Mappings | Details
    --------------------------- |---------------------------------------------------
    `<Alt>-1` | Toggle project structure.
    `<Alt>-2` | Bookmarks
    `<Alt>-7` | Structures
    `<Ctrl>-e` | Recent open files.
    `<Ctrl>-<Shift>-e` | Recent locations.
    `<Shift><Shift>` | Find all.
  4. Maple-pro revised this gist Jul 2, 2024. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -28,6 +28,8 @@ Key Mappings | Details
    `<leader>rn` | Action: RenameElement
    `zo` | Action: ExpandRegion
    `zc` | Action: CollapseRegion
    `zO` | Action: ExpandAllRegions
    `zC` | Action: CollapseAllRegions

    ## Tmux

  5. Maple-pro revised this gist Jul 2, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -27,7 +27,7 @@ Key Mappings | Details
    `<leader>ca` | Action: ShowIntentionActions
    `<leader>rn` | Action: RenameElement
    `zo` | Action: ExpandRegion
    `zf` | Action: CollapseRegion
    `zc` | Action: CollapseRegion

    ## Tmux

  6. Maple-pro revised this gist Jun 28, 2024. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -26,6 +26,8 @@ Key Mappings | Details
    `gk` | Action: GotoPreviousError
    `<leader>ca` | Action: ShowIntentionActions
    `<leader>rn` | Action: RenameElement
    `zo` | Action: ExpandRegion
    `zf` | Action: CollapseRegion

    ## Tmux

  7. Maple-pro revised this gist Jun 26, 2024. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -22,6 +22,10 @@ Key Mappings | Details
    `gi` | Action: GotoImplementation
    `gp` | Action: ShowErrorDescription
    `gs` | Action: GotoSuperMethod
    `gj` | Action: GotoNextError
    `gk` | Action: GotoPreviousError
    `<leader>ca` | Action: ShowIntentionActions
    `<leader>rn` | Action: RenameElement

    ## Tmux

  8. Maple-pro revised this gist Jun 26, 2024. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -17,6 +17,11 @@ Key Mappings | Details
    `yss{char}` | surround: Surround the line with the {char}.
    `S{...}` | surround: Press `V` to enter visual line mode, surround the selected block with a string.
    `gcc` | commentary: Comment the line.
    `gd` | Action: Go to declaration or usages
    `gh` | Action: QuickJavaDoc
    `gi` | Action: GotoImplementation
    `gp` | Action: ShowErrorDescription
    `gs` | Action: GotoSuperMethod

    ## Tmux

  9. Maple-pro revised this gist Jun 16, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -73,7 +73,7 @@ Key Mappings | Details
    `<Ctrl>-w <Arrow>` | Switch between windows
    `zc` | Close a folding
    `zo` | Open a folding
    `<Alt>-m` | nvim-tree: Toggle panel
    `<Alt>-m` or `,m` | nvim-tree: Toggle panel
    `<Ctrl>-p` | telescope: Find files
    `<Ctrl>-f` | telescope: Live grep
    `gc` | commentary: Toggle comment
  10. Maple-pro revised this gist May 31, 2024. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -37,7 +37,8 @@ Key Mappings | Details
    `<leader>n` | Next window.
    `<leader>p` | Previous window.
    `<leader>"` | Split pane vertically.
    `<leader>%` | Split pane horizentally.
    `<leader>%` | Split pane horizontally.
    `<leader><space>` | Switch the split pane between vertical and horizontal
    `<leader>{num}` | Go to target window.
    `<leader>q{num}` | Go to target pane.
    `<leader><Arrow>` | Go to pane.
  11. Maple-pro revised this gist May 19, 2024. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -95,6 +95,12 @@ Key Mappings | Details
    `<leader>th` | toggleterm: horizontal terminal
    `<leader>tt` | toggleterm: tab terminal
    `<leader>tf` | toggleterm: float terminal
    `<leader>gj` | gitsigns: next hunk
    `<leader>gk` | gitsigns: previous hunk
    `<leader>gp` | gitsigns: preview hunk
    `<leader>gb` | gitsigns: blame line
    `<leader>gd` | gitsigns: diff this hunk
    `<leader>gtb` | gitsigns: toggle line blame

    - [Lspsaga guide](https://nvimdev.github.io/lspsaga/)
    - [telescope wiki](https://github.com/nvim-telescope/telescope.nvim)
  12. Maple-pro revised this gist Apr 13, 2024. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -51,6 +51,12 @@ Key Mappings | Details

    ## NVim

    For new installation:

    - PackerSync: install plugins
    - TSUpdate: install treesitter
    - MasonUpdate: install lsp clients

    `<leader>` key is `,`

    - `iw`: inner word, e.g., `di'` means delete all the thing inside the `'`
  13. Maple-pro revised this gist Feb 29, 2024. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -85,6 +85,10 @@ Key Mappings | Details
    `<leader>j` | hop: Jump to line start forward
    `<leader>k` | hop: Jump to line start backward
    `<Ctrl>-\` | toggleterm: toggle terminal
    `<leader>git` | toggleterm: lazygit terminal
    `<leader>th` | toggleterm: horizontal terminal
    `<leader>tt` | toggleterm: tab terminal
    `<leader>tf` | toggleterm: float terminal

    - [Lspsaga guide](https://nvimdev.github.io/lspsaga/)
    - [telescope wiki](https://github.com/nvim-telescope/telescope.nvim)
  14. Maple-pro revised this gist Feb 28, 2024. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -84,6 +84,7 @@ Key Mappings | Details
    `<leader>f{char}` | hop: Find {char} forward
    `<leader>j` | hop: Jump to line start forward
    `<leader>k` | hop: Jump to line start backward
    `<Ctrl>-\` | toggleterm: toggle terminal

    - [Lspsaga guide](https://nvimdev.github.io/lspsaga/)
    - [telescope wiki](https://github.com/nvim-telescope/telescope.nvim)
  15. Maple-pro revised this gist Feb 26, 2024. 1 changed file with 11 additions and 0 deletions.
    11 changes: 11 additions & 0 deletions shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -71,12 +71,23 @@ Key Mappings | Details
    `<Ctrl>-f` | telescope: Live grep
    `gc` | commentary: Toggle comment
    `gd` | LSP: Jump to definition
    `gh` | LSP: Hover documentation, press `gh` again jump into the hover window, `gx` to open link
    `gr` | LSP: List all references
    `gp` | LSP (diagnostic): Show line diagnostic
    `gj` | LSP (diagnostic): Jump to next
    `gk` | LSP (diagnostic): Jump to previous
    `<leader>rn` | LSP: Rename
    `<leader>ca` | LSP: Code actions (press `q` to quit)
    `<Ctrl>-<Alt>-l` | LSP: Format the file
    `<leader>s{char}` | hop: Find {char} forward and backward
    `<leader><leader>s{char}{char}` | hop: Jump by two keys
    `<leader>f{char}` | hop: Find {char} forward
    `<leader>j` | hop: Jump to line start forward
    `<leader>k` | hop: Jump to line start backward

    - [Lspsaga guide](https://nvimdev.github.io/lspsaga/)
    - [telescope wiki](https://github.com/nvim-telescope/telescope.nvim)

    ## IntelliJ

    Key Mappings | Details
  16. Maple-pro revised this gist Feb 26, 2024. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -72,8 +72,8 @@ Key Mappings | Details
    `gc` | commentary: Toggle comment
    `gd` | LSP: Jump to definition
    `<leader>s{char}` | hop: Find {char} forward and backward
    `<leader><leader>s{char}{char} | hop: Jump by two keys
    `<leader>f{char} | hop: Find {char} forward
    `<leader><leader>s{char}{char}` | hop: Jump by two keys
    `<leader>f{char}` | hop: Find {char} forward
    `<leader>j` | hop: Jump to line start forward
    `<leader>k` | hop: Jump to line start backward

  17. Maple-pro revised this gist Feb 26, 2024. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -72,6 +72,10 @@ Key Mappings | Details
    `gc` | commentary: Toggle comment
    `gd` | LSP: Jump to definition
    `<leader>s{char}` | hop: Find {char} forward and backward
    `<leader><leader>s{char}{char} | hop: Jump by two keys
    `<leader>f{char} | hop: Find {char} forward
    `<leader>j` | hop: Jump to line start forward
    `<leader>k` | hop: Jump to line start backward

    ## IntelliJ

  18. Maple-pro revised this gist Feb 22, 2024. 1 changed file with 13 additions and 0 deletions.
    13 changes: 13 additions & 0 deletions shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -72,3 +72,16 @@ Key Mappings | Details
    `gc` | commentary: Toggle comment
    `gd` | LSP: Jump to definition
    `<leader>s{char}` | hop: Find {char} forward and backward

    ## IntelliJ

    Key Mappings | Details
    --------------------------- |---------------------------------------------------
    `<Alt>-1` | Toggle project structure.
    `<Ctrl>-e` | Recent open files.
    `<Ctrl>-<Shift>-e` | Recent locations.
    `<Shift><Shift>` | Find all.
    `<Ctrl>-n` | Find class.
    `<Ctrl>-<Shift>-n` | Find file.
    `<Ctrl>-<Shift>-a` | Find actions.
    `<Ctrl>-<Shift>-f` | Find in files.
  19. Maple-pro revised this gist Feb 21, 2024. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -40,6 +40,7 @@ Key Mappings | Details
    `<leader>%` | Split pane horizentally.
    `<leader>{num}` | Go to target window.
    `<leader>q{num}` | Go to target pane.
    `<leader><Arrow>` | Go to pane.
    `<leader>x` | Close current pane.
    `<leader>&` | Close current window.
    `<leader>I` | Install plugins with TPM.
    @@ -62,10 +63,10 @@ Key Mappings | Details
    `:bn` | Next buffer
    `:b {buffer}` | Open buffer
    `:e {file}` | Open file
    `<Ctrl>-w <arrow>` | Switch between windows
    `<Ctrl>-w <Arrow>` | Switch between windows
    `zc` | Close a folding
    `zo` | Open a folding
    `a-m` | nvim-tree: Toggle panel
    `<Alt>-m` | nvim-tree: Toggle panel
    `<Ctrl>-p` | telescope: Find files
    `<Ctrl>-f` | telescope: Live grep
    `gc` | commentary: Toggle comment
  20. Maple-pro revised this gist Feb 21, 2024. 1 changed file with 21 additions and 1 deletion.
    22 changes: 21 additions & 1 deletion shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -23,7 +23,7 @@ Key Mappings | Details
    `<leader>` key is `<Ctrl>-B`

    Key Mappings | Details
    ----------------------- |---------------------------------------------------
    --------------------------- |---------------------------------------------------
    `tmux [new -s name]` | Start a new session.
    `tmux ls` | List existing sessions.
    `tmux at [-t name]` | Attach to session.
    @@ -50,4 +50,24 @@ Key Mappings | Details

    ## NVim

    `<leader>` key is `,`

    - `iw`: inner word, e.g., `di'` means delete all the thing inside the `'`
    - `aw`: arround word, include whitespace

    Key Mappings | Details
    --------------------------- |---------------------------------------------------
    `<Ctrl>-o` | Back to the previous place
    `:bp` | Previous buffer
    `:bn` | Next buffer
    `:b {buffer}` | Open buffer
    `:e {file}` | Open file
    `<Ctrl>-w <arrow>` | Switch between windows
    `zc` | Close a folding
    `zo` | Open a folding
    `a-m` | nvim-tree: Toggle panel
    `<Ctrl>-p` | telescope: Find files
    `<Ctrl>-f` | telescope: Live grep
    `gc` | commentary: Toggle comment
    `gd` | LSP: Jump to definition
    `<leader>s{char}` | hop: Find {char} forward and backward
  21. Maple-pro revised this gist Feb 21, 2024. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -36,9 +36,11 @@ Key Mappings | Details
    `<leader>$` | Rename current session.
    `<leader>n` | Next window.
    `<leader>p` | Previous window.
    `<leader>"` | Split panel vertically.
    `<leader>%` | Split panel horizentally.
    `<leader>x` | Close current panel.
    `<leader>"` | Split pane vertically.
    `<leader>%` | Split pane horizentally.
    `<leader>{num}` | Go to target window.
    `<leader>q{num}` | Go to target pane.
    `<leader>x` | Close current pane.
    `<leader>&` | Close current window.
    `<leader>I` | Install plugins with TPM.
    `<leader>U` | Update plugins with TPM.
  22. Maple-pro revised this gist Feb 21, 2024. 1 changed file with 37 additions and 7 deletions.
    44 changes: 37 additions & 7 deletions shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -5,16 +5,46 @@
    `<leader>` key is `,`

    Key Mappings | Details
    ----------------------- |--------------------------------------------------
    `J` | ideajoin: join a selected block of text together
    `<leader>j` |

    <img width="353" alt="image" src="https://gist.github.com/assets/52351480/45cfdbae-0231-44c1-b7ed-ce97261ce4e6">

    ----------------------- |---------------------------------------------------
    `J` | ideajoin: Join a selected block of text together.
    `<leader>f{char}` | easymotion: Find {char} to the right.
    `<leader>s{char}` | easymotion: Find {char} forward and backward.
    `<leader>j` | easymotion: Line downward.
    `<leader>k` | easymotion: Line upward.
    `cs{oldChar}{newChar}` | surround: Change the surroundings in pairs.
    `ds{char}` | surround: Remove the surroundings in pairs.
    `ysiw{char}` | surround: Surround the word with the {char}.
    `yss{char}` | surround: Surround the line with the {char}.
    `S{...}` | surround: Press `V` to enter visual line mode, surround the selected block with a string.
    `gcc` | commentary: Comment the line.

    ## Tmux


    `<leader>` key is `<Ctrl>-B`

    Key Mappings | Details
    ----------------------- |---------------------------------------------------
    `tmux [new -s name]` | Start a new session.
    `tmux ls` | List existing sessions.
    `tmux at [-t name]` | Attach to session.
    `tmux kill-sesssion -t name`| Kill a sessioin by name.
    `<leader>d` | Detach from the current session.
    `<leader>c` | Create a new window.
    `<leader>s` | Swith between sessions.
    `<leader>w` | Switch between sessions and windows.
    `<leader>:new` | Create a new session.
    `<leader>$` | Rename current session.
    `<leader>n` | Next window.
    `<leader>p` | Previous window.
    `<leader>"` | Split panel vertically.
    `<leader>%` | Split panel horizentally.
    `<leader>x` | Close current panel.
    `<leader>&` | Close current window.
    `<leader>I` | Install plugins with TPM.
    `<leader>U` | Update plugins with TPM.
    `<leader> <Alt>-u` | Remove plugins with TPM.
    `<leader> <Ctrl>-s` | Save the current environment.
    `<leader> <Ctrl>-r` | Restore the saved environment.

    ## NVim

  23. Maple-pro created this gist Feb 21, 2024.
    21 changes: 21 additions & 0 deletions shortcuts.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    # Shortcuts

    ## IdeaVim

    `<leader>` key is `,`

    Key Mappings | Details
    ----------------------- |--------------------------------------------------
    `J` | ideajoin: join a selected block of text together
    `<leader>j` |

    <img width="353" alt="image" src="https://gist.github.com/assets/52351480/45cfdbae-0231-44c1-b7ed-ce97261ce4e6">


    ## Tmux



    ## NVim