feat: adding documentation
This commit is contained in:
110
README.md
Normal file
110
README.md
Normal file
@@ -0,0 +1,110 @@
|
||||
# Vim and Tmux Keymaps
|
||||
|
||||
## Tmux Keymaps
|
||||
|
||||
### General Settings
|
||||
- **Enable mouse support**: `set -g mouse on` (Allows scrolling, selecting panes, resizing)
|
||||
- **Set scrollback buffer**: `set -g history-limit 2000`
|
||||
- **Copy selected text to clipboard**: `set-option -g set-clipboard on`
|
||||
- **Use vi-style key bindings**: `setw -g mode-keys vi`
|
||||
|
||||
### Reload Configuration
|
||||
- **Reload tmux config**: `prefix + r` (Reloads tmux configuration)
|
||||
|
||||
### Pane Navigation
|
||||
- **Move panes**:
|
||||
- `Alt + Left` → Move left
|
||||
- `Alt + Right` → Move right
|
||||
- `Alt + Up` → Move up
|
||||
- `Alt + Down` → Move down
|
||||
- **Split panes**:
|
||||
- `prefix + |` → Vertical split
|
||||
- `prefix + -` → Horizontal split
|
||||
- **Sync panes**:
|
||||
- `prefix + y` → Enable pane synchronization
|
||||
- `prefix + y` → Disable pane synchronization
|
||||
|
||||
### Status Bar and UI Enhancements
|
||||
- **Battery and time status**: `set -g status-right '#{battery_status_bg} battery: #{battery_percentage}% | %Y-%m-%d %H:%M '`
|
||||
- **Pane border colors**:
|
||||
- Inactive: `set -g pane-border-style fg=colour240`
|
||||
- Active: `set -g pane-active-border-style fg=colour33`
|
||||
|
||||
### Resize Panes
|
||||
- **Resize using Ctrl + Option + Arrow keys (macOS friendly)**:
|
||||
- `Ctrl + Option + Left` → Resize left
|
||||
- `Ctrl + Option + Right` → Resize right
|
||||
- `Ctrl + Option + Up` → Resize up
|
||||
- `Ctrl + Option + Down` → Resize down
|
||||
|
||||
## Vim Keymaps
|
||||
|
||||
### File Management
|
||||
- **Save file**: `space + w`
|
||||
- **Save and close all files**: `space + x + a`
|
||||
- **Close all files**: `space + q`
|
||||
- **Reload Neovim config**: `space + s + o`
|
||||
- **Clear search highlights**: `space + n + o`
|
||||
|
||||
### Number Increment/Decrement
|
||||
- **Increase number**: `space + +`
|
||||
- **Decrease number**: `space + -`
|
||||
|
||||
### Window Management
|
||||
- **Split window vertically**: `space + s + v`
|
||||
- **Split window horizontally**: `space + s + h`
|
||||
- **Make splits equal size**: `space + s + e`
|
||||
- **Close split**: `space + s + x`
|
||||
|
||||
### Tabs
|
||||
- **Open new tab**: `space + t + o`
|
||||
- **Close tab**: `space + t + x`
|
||||
- **Next tab**: `space + t + n`
|
||||
- **Previous tab**: `space + t + p`
|
||||
- **Move current buffer to new tab**: `space + t + f`
|
||||
|
||||
### Syntax Formatting
|
||||
- **Format current file**: `space + s + y`
|
||||
|
||||
### Buffer Management
|
||||
- **Close current buffer**: `space + b + d`
|
||||
|
||||
### Navigation
|
||||
- **Next buffer**: `Ctrl + p`
|
||||
- **Previous buffer**: `Ctrl + n`
|
||||
|
||||
### Coding Enhancements
|
||||
- **Add import React**: `space + r + e`
|
||||
- **Add comma at end of line**: `space + ,`
|
||||
- **Add semicolon at end of line**: `space + ;`
|
||||
- **Insert console.log() below**: `space + c + o + n`
|
||||
- **Run current file with Node.js**: `space + x`
|
||||
|
||||
### Resize Splits
|
||||
- **Decrease vertical split**: `Ctrl + l`
|
||||
- **Increase vertical split**: `Ctrl + h`
|
||||
- **Increase horizontal split**: `Ctrl + k`
|
||||
- **Decrease horizontal split**: `Ctrl + j`
|
||||
|
||||
### LSP and Navigation
|
||||
- **Show references**: `g + R`
|
||||
- **Go to declaration**: `g + D`
|
||||
- **Show definitions**: `g + d`
|
||||
- **Show implementations**: `g + i`
|
||||
- **Show type definitions**: `g + t`
|
||||
- **See available code actions**: `space + c + a`
|
||||
- **Rename variable**: `space + r + n`
|
||||
- **Show buffer diagnostics**: `space + D`
|
||||
- **Show line diagnostics**: `space + d`
|
||||
- **Previous diagnostic**: `[ + d`
|
||||
- **Next diagnostic**: `] + d`
|
||||
- **Show documentation for cursor**: `K`
|
||||
- **Restart LSP**: `space + r + s`
|
||||
|
||||
### File Explorer (Nvim-Tree)
|
||||
- **Toggle file explorer**: `space + e + e`
|
||||
- **Toggle explorer on current file**: `space + n + t`
|
||||
- **Collapse explorer**: `space + e + c`
|
||||
- **Refresh explorer**: `space + e + r`
|
||||
|
||||
This README provides an organized list of Vim and Tmux keymaps for efficient navigation and workflow.
|
||||
95
keyboard_mappings.md
Normal file
95
keyboard_mappings.md
Normal file
@@ -0,0 +1,95 @@
|
||||
# Custom Keyboard Keymaps
|
||||
|
||||
## Overview
|
||||
This document details the custom key mappings and functionality of the QMK firmware configuration, including mappings relevant to Neovim and Tmux usage.
|
||||
|
||||
---
|
||||
|
||||
## Custom Keycodes
|
||||
|
||||
### RGB Lighting Control
|
||||
- **RGB_SLD**: Sets the RGB lighting mode to static.
|
||||
|
||||
### Macro Key Bindings
|
||||
These macros are optimized for Neovim and Tmux workflows.
|
||||
|
||||
- **ST_MACRO_0**: Opens the Neovim terminal (`Alt + Cmd + I`).
|
||||
- **ST_MACRO_1**: Moves backward in Tmux (`Ctrl + B`, then `D`).
|
||||
- **ST_MACRO_2**: Moves forward in Tmux (`Ctrl + B`, then `C`).
|
||||
- **ST_MACRO_3**: Moves to the previous Tmux window (`Ctrl + B`, then `P`).
|
||||
- **ST_MACRO_4**: Moves to the next Tmux window (`Ctrl + B`, then `N`).
|
||||
- **ST_MACRO_5**: Closes the current Tmux pane (`Ctrl + B`, then `W`).
|
||||
- **ST_MACRO_6**: Splits a Tmux pane vertically (`Ctrl + B`, then `Shift + |`).
|
||||
- **ST_MACRO_7**: Opens a new Tmux session (`Ctrl + B`, then `Shift + ;`, then `NEW`).
|
||||
- **ST_MACRO_8**: Moves left in a Tmux pane (`Ctrl + B`, then `Left Arrow`).
|
||||
- **ST_MACRO_9**: Moves down in a Tmux pane (`Ctrl + B`, then `Down Arrow`).
|
||||
- **ST_MACRO_10**: Moves up in a Tmux pane (`Ctrl + B`, then `Up Arrow`).
|
||||
- **ST_MACRO_11**: Moves right in a Tmux pane (`Ctrl + B`, then `Right Arrow`).
|
||||
- **ST_MACRO_12**: Decreases window size in Tmux (`Ctrl + B`, then `-`).
|
||||
- **ST_MACRO_13**: Moves to the beginning of a line in Neovim (`Space + B D`).
|
||||
- **ST_MACRO_14**: Formats the entire file in Neovim (`Space + F G`).
|
||||
- **ST_MACRO_15**: Creates a new tab in Neovim (`Space + N T`).
|
||||
|
||||
### Special Functions
|
||||
- **MAC_LOCK**: Triggers a system-specific lock command.
|
||||
|
||||
---
|
||||
|
||||
## Tap Dance Actions
|
||||
Tap dance actions allow a key to perform multiple functions depending on the number of taps.
|
||||
|
||||
### **DANCE_0**
|
||||
- **Single Tap**: Escape key (useful for exiting insert mode in Neovim).
|
||||
- **Single Hold**: `Ctrl + Up` (scrolls up in Neovim or switches buffers).
|
||||
- **Double Tap**: Sends double Escape (useful for quickly leaving insert mode in Neovim).
|
||||
|
||||
### **DANCE_1**
|
||||
- **Single Tap**: Grave (`~`) (for quick access to tilde in Vim commands).
|
||||
- **Single Hold**: `&` (used in Tmux for window management).
|
||||
- **Double Tap**: Sends double grave (`~~`).
|
||||
|
||||
### **DANCE_2**
|
||||
- **Single Tap**: Spacebar (default action).
|
||||
- **Single Hold**: `Cmd + Space` (Spotlight search on macOS, also used for command execution in Neovim).
|
||||
- **Double Tap**: Sends double space (quick spacing in text documents).
|
||||
|
||||
### **DANCE_3**
|
||||
- **Single Tap**: `0` (moves cursor to the beginning of a line in Neovim).
|
||||
- **Single Hold**: `=` (resizes panes in Tmux).
|
||||
- **Double Tap**: Sends double `0`.
|
||||
|
||||
---
|
||||
|
||||
## Layer Functions
|
||||
The keyboard supports multiple layers for different functionalities.
|
||||
|
||||
### **Layer 0 (Default Layer - Neovim and Tmux Focused)**
|
||||
- **Neovim shortcuts**: Efficient navigation and command execution.
|
||||
- **Tmux pane/window management**: Quick switching and resizing.
|
||||
|
||||
### **Layer 1 (Function & Symbols Layer)**
|
||||
- **F-keys (F1–F12)**
|
||||
- **Media and RGB controls**
|
||||
- **Special characters (`@, $, %, &, *, etc.`)**
|
||||
|
||||
### **Layer 2 (Macros & Shortcuts Layer)**
|
||||
- **Macro functions for Neovim (`ST_MACRO_1–15`)**
|
||||
- **Media and navigation shortcuts**
|
||||
|
||||
### **Layer 3 (Navigation & Window Management Layer)**
|
||||
- **Arrow keys and window movement shortcuts**
|
||||
- **Undo, cut, paste, and system controls**
|
||||
- **Tmux session switching and splits**
|
||||
|
||||
### **Layer 4 (Mouse & Boot Mode Layer)**
|
||||
- **Mouse controls and screenshot shortcuts**
|
||||
- **Boot mode activation (`QK_BOOT`)**
|
||||
|
||||
---
|
||||
|
||||
## Special Modifiers
|
||||
- **MO(n)**: Momentary activation of layer `n`.
|
||||
- **LT(n, key)**: Hold for layer `n`, tap for `key`.
|
||||
- **TG(n)**: Toggle layer `n` on/off.
|
||||
|
||||
This structured keymap provides an overview of the keyboard's advanced functionality, integrating Neovim, Tmux, and QMK efficiently.
|
||||
@@ -12,10 +12,10 @@
|
||||
"copilot.vim": { "branch": "release", "commit": "87038123804796ca7af20d1b71c3428d858a9124" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "56ef6a969a4990d938c5fed40c370f65e125fc97" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "9772ce68a9a6d156f3f2166bfd0a17a09ab37eba" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "9b36d497495436c135659902054ee637e0ba6021" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "e10626f7fcd51ccd56d7ffc00883ba7e0aa28f78" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "7527af40ddd4a93a02911be570b32609b9d4ea53" },
|
||||
"lazygit.nvim": { "branch": "main", "commit": "adc37c5a6d7d6e8d0a039f08f3c7837971a1c77a" },
|
||||
"lazygit.nvim": { "branch": "main", "commit": "77a0d42943d8265271e6e6beaed72da54eeb17e7" },
|
||||
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "f75e877f5266e87523eb5a18fcde2081820d087b" },
|
||||
@@ -27,18 +27,18 @@
|
||||
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "3d02855468f94bf435db41b661b58ec4f48a06b7" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "12509903a5723a876abd65953109f926f4634c30" },
|
||||
"nvim-dap": { "branch": "master", "commit": "12b846bedbc7221e833b5e6611de21917d7d9184" },
|
||||
"nvim-dap": { "branch": "master", "commit": "b4f27d451c187de912fa8d3229025a952917eb9e" },
|
||||
"nvim-dap-python": { "branch": "master", "commit": "34282820bb713b9a5fdb120ae8dd85c2b3f49b51" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "df66808cd78b5a97576bbaeee95ed5ca385a9750" },
|
||||
"nvim-lint": { "branch": "master", "commit": "789b7ada1b4f00e08d026dffde410dcfa6a0ba87" },
|
||||
"nvim-lsp-file-operations": { "branch": "master", "commit": "9744b738183a5adca0f916527922078a965515ed" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "66bc018936c6ff76beb75f89d986af6442db4001" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "f98fa715acc975c2dd5fb5ba7ceddeb1cc725ad2" },
|
||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||
"nvim-notify": { "branch": "master", "commit": "22f29093eae7785773ee9d543f8750348b1a195c" },
|
||||
"nvim-surround": { "branch": "main", "commit": "ae298105122c87bbe0a36b1ad20b06d417c0433e" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "70825f23db61ecd900c4cfea169bffe931926a9d" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "9e0b5e7f0d148963d6ec71c48cec1a3f8607d619" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "d05881f65f0a653db8d830ccc4d2e07d6a720628" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "4988b7068001b3a772c7cc738708341e612e3c26" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
|
||||
|
||||
Reference in New Issue
Block a user