# Dotfiles The purpose of this repository is to enhance my terminal and IDE setup for improved productivity. ## Installation 1. Run install script ``` sh -c "`curl -fsSL https://raw.githubusercontent.com/tpai/dotfiles/master/install.sh `" ``` 2. Paste `tmux` into iTerm `Profiles > General > Command > Send text at start` 3. `Profiles > Text > Change Font > Family > DroidSansMono Nerd Font` ### Update ```sh ./install.sh ``` Update required brew formulas, vim plugins and oh-my-zsh. ### Uninstall ```sh ./uninstall.sh ``` Return to dust. ## Install Plugin ```sh ./install-plugin.sh {plugin} ``` - foo - test usage - tf - install terraform, vim-hashicorp-tools - go - install go, vim-go - kb - install kb-search ## Brew Packages - Main - zsh - tmux - Search - ripgrep - code fuzzy search - zsh-z - folder navigation - fd - file and folder search - Better Command - exa - ls - bat - cat - prettyping - ping - glances - top - ctop - ctop - tldr - man - duf - df - Language - jq - json query - Info - neofetch - system info - onefetch - git repo info - wifi-password - Misc - reattach-to-user-namespace - for tmux clipboard - watchman - coc file renaming (update related imports) - git - yarn - neovim - cmake - pyenv - nvm ## Mappings The following keys are my most used commands. ### tmux - `tmux ls` - list sessions - `tmux new -s ` - create new session - `tmux attach -t ` - attach to specific session - `tmux kill -t ` - kill session - `` - detach session - `` - open status line menu - `>` - open pane menu - `` - create window - `` - next window - `` - previous window - `` - kill window - `` - reorder window index - `` - navigate between windows - `` - resize focused window - `` - scroll the window ### vim - Panes - `` - navigate between panes - `` - enable sync mode for all panes - `` - disable sync mode - `vv` - vertical split - `ss` - horizontal split - Floating Window - `` - scroll down - `` - scroll up - NERDtree - `` - toggle NERDTree - `?` - show help - File - `:new` - create new file - `]]` - next markdown block - `]p` - preview markdown - File Navigation - `,t` - files in current folder (powered by `Telescope`) - `,b` - buffer files (powered by `Telescope`) - `,ag` - fuzzy search (powered by `Telescope`) - `` - select files which needs to change - `:cfdo %s/old/new/g | update` - search, replace and update multiple files - Editing - git - `gl` - show commits - `gh` - show file history - `gb` - blame file - `gd` - diff file - `gj` - navigate to next hunk - `gk` - navigate to prev hunk - `ga` - stage current hunk - `gu` - undo current hunk - `gp` - reset hard - `gr` - reset soft - splitjoin - `sj` - split brackets - `sk` - join brackets - easy-align - `ga` - active easy align (must do visual select first) - multiple-cursors - `,mc` - multiple cursor (next: ``, prev: ``, skip: ``) - `,ma` - multiple cursor select all words - coc - `ej` - next diagnostic - `ek` - prev diagnostic - `,df` - show definition in floating window - `,jd` - go to definition - `,jr` - list references - `,rn` - symbol renaming - `,rf` - file renaming (require `watchman` to be installed) - `,ac` - show code action dialog - jsdoc - `,cj` - create jsdoc for function - camelsnek - `,,c` - convert to cammel case - `,,s` - convert to snake case - px-to-rem - `,,r` - convert to rem - `,,p` - convert to px - misc - `:%s/old/new/g` - search and replace for the current file - `:vimgrep /old/g **/*` > `:cfdo %s/old/new/g | update` - search and repalce for all files - `:e ++ff=dos` - convert `^M` to unix line ending - `gc` - comment / uncomment - `//` - clear search result - `%` - jump to closing tag - `<\-p>` - prettify - `<\-f>` - eslint autofix