{"id":21905065,"url":"https://github.com/kenjyco/dotfiles","last_synced_at":"2025-04-15T23:21:27.581Z","repository":{"id":24750467,"uuid":"28163236","full_name":"kenjyco/dotfiles","owner":"kenjyco","description":"Settings for vim, tmux, git, X and more for Linux and Mac","archived":false,"fork":false,"pushed_at":"2024-11-02T15:56:07.000Z","size":511,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-02T16:29:36.256Z","etag":null,"topics":["awesome-wm","cli","git","tmux","vim"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kenjyco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-12-18T01:27:44.000Z","updated_at":"2024-11-02T15:56:11.000Z","dependencies_parsed_at":"2023-12-06T12:31:03.375Z","dependency_job_id":"89545db8-387b-4ece-8485-0fe693621092","html_url":"https://github.com/kenjyco/dotfiles","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenjyco%2Fdotfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenjyco%2Fdotfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenjyco%2Fdotfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenjyco%2Fdotfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kenjyco","download_url":"https://codeload.github.com/kenjyco/dotfiles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226948854,"owners_count":17707954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["awesome-wm","cli","git","tmux","vim"],"created_at":"2024-11-28T16:28:21.848Z","updated_at":"2024-11-28T16:28:22.600Z","avatar_url":"https://github.com/kenjyco.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"[background]: https://github.com/kenjyco/dotfiles/blob/master/Background.md\n\nIf you are completely new to using the command line, checkout the [background][]\ndocument.\n\n## Install / setup\n\nClone the repo and run the setup script\n\n    % git clone https://github.com/kenjyco/dotfiles \u0026\u0026 bash ./dotfiles/setup.bash\n\n- the `setup.bash` script will create a backup copy of your existing dotfiles,\n  then create symbolic links to the settings in this repository\n- plugins for Vim are also downloaded and installed\n\n## Update Vundle plugin (git submodule)\n\n```\n% cd dotfiles\n\n% git submodule init \u0026\u0026 git submodule update\n\n% cd vim/bundle/Vundle.vim\n\n% git checkout master\n\n% git pull\n\n% cd ../../..\n\n% git add vim/bundle/Vundle.vim\n\n% git commit\n```\n\n## Non-standard keyboard shortcuts\n[vim-tmux-navigator]: https://github.com/christoomey/vim-tmux-navigator\n\nProvided by [vim-tmux-navigator][] to move between tmux panes and vim splits\nwith the same key binding\n\n- `Ctrl` + `h` =\u003e Left\n- `Ctrl` + `j` =\u003e Down\n- `Ctrl` + `k` =\u003e Up\n- `Ctrl` + `l` =\u003e Right\n- `Ctrl` + `\\` =\u003e Previous split\n\n**Note**: When using `:term` or `:vert term` in vim (version 8+) to open a\nterminal split the `Ctrl` + `\u003cdirection\u003e` shortcuts will not work... you will\nneed to `Ctrl` + `w` first, then h/j/k/l\n\n## Misc tmux tips\n\n- `Ctrl` + `b`, `%` to split the current pane vertically\n- `Ctrl` + `b`, `\"` to split the current pane horizontally\n- `Ctrl` + `b`, `Space` to cyle current window through preset layouts\n- `Ctrl` + `b`, `{` to move the current pane up one spot\n- `Ctrl` + `b`, `}` to move the current pane down one spot\n- `Ctrl` + `b`, `;` to switch to the previously active pane\n- `Ctrl` + `b`, `p` to switch to the previously active window\n- `Ctrl` + `b`, `!` to move the current pane to a new window\n- `Ctrl` + `b`, `z` to toggle zoom state of current pane\n- `Ctrl` + `b`, `w` to choose the current window (across all sessions)\n  interactively\n- `Ctrl` + `b`, `:` to get to bring up the tmux command prompt\n    - `break-pane` to move the current active pane to a new window/tab\n\n### Quick tmux flow for a new session\n\nMake 2 vertical splits, then make them equal widths\n\n- `Ctrl` + `b`, `%`\n- `Ctrl` + `b`, `%`\n- `Ctrl` + `b`, `Space`\n\n\u003e The first preset layout is evenly spaced vertical splits\n\n### (Navigation and resize keyboard shortcuts without vim-tmux-navigator)\n\n.\n\n## Misc vim tips\n\n- Sometimes when writing code and there are multiple splits in the same file,\n  the syntax highlighting can appear messed up in the other split(s) when adding\n  a string (something with double quotes)... fix it with `:syntax sync\n  fromstart`\n- Sometimes when writing long lines (with textwidth and autoindent set) for a\n  bullet point in markdown files, after you hit Enter/Return, your cursor will\n  not be at the place where you would like to start the next bullet point... use\n  `Ctrl` + `d` to move the cursor to the correct position\n- If you have lines of text that need to get reformatted\n    - select text to reformat using `v` (and then move cursor to highlight with\n      k/j/h/l)\n        - or use `Shift` + `v` anywhere on a long line to select the entire line\n    - reformat with `gq` command\n- `Ctrl` + `]` to jump to code definitions (as long as you have run the separate\n  `ctags` command that generates the `tags` file)\n- `Ctrl` + `o` to jump back to where you were before (whether jumping to code\n  definitions or just searching text or doing find/replace)\n- Use `:set spell` / `:set nospell` to enable/disable spell checking\n    - `]s` to move to the next misspelled word\n    - `[s` to move to the previous misspelled word\n    - `z=` while cursor is on a misspelled word to get suggestions\n    - `zg` while cursor is on a misspelled word to add it to the dictionary (in\n      the `~/.vim/spell/` directory)\n    - `zug` to undo adding a word to the dictionary\n- Use \"visual mode\" to select text while in normal/command mode\n    - `v` to start character-wise selection and use navigation keys (h/j/k/l) to\n      expand the selection\n    - `V` to start line-wise selection and use down/up navigation keys (j/k) to\n      expand the selection\n    - `ctrl` + `v` to start block-wise selection and use navigation keys\n      (h/j/k/l) to expand the selection\n    - Once the selection is made, you can use nearly any command (including\n      colon-commands)\n\n## Vim plugin docs\n\n- \u003chttps://github.com/christoomey/vim-tmux-navigator#usage\u003e\n- \u003chttps://github.com/wesQ3/vim-windowswap#howto\u003e\n    - Note: default `\u003cleader\u003e` key in vim is `\\`\n    - Navigate to window you want to move and press `\u003cleader\u003eww`\n    - Navigate to window you want to swap with and press `\u003cleader\u003eww` again\n- \u003chttps://github.com/will133/vim-dirdiff#usage\u003e\n    - From CLI: `vim -c \"DirDiff dir1 dir2\"`\n- \u003chttps://github.com/tpope/vim-fugitive#fugitivevim\u003e\n    - This is a `git` wrapper\n        - Also see screencast series: \u003chttp://vimcasts.org/blog/2011/05/the-fugitive-series/\u003e\n    - `:Gstatus` to see git status\n        - if you move cursor to an unstaged file and press `-` it will `git add`\n          the file\n        - if you move cursor to a staged file and press `-` it will `git reset`\n          the file\n        - can also use `-` in visual mode\n            - `\u003cShift\u003ev`, then `j` or `k` to select lines above/below; then\n              press `-` to either stage or unstage selected files\n        - if you move cursor to an unstaged file and press `\u003cShift\u003ep` it will\n          `git add -p` the file (to let you select part of the file to stage)\n        - if you press `\u003cEnter\u003e` while on a file, it will open it in a split\n          below the `Gstatus` window\n            - use `:Gdiff` (mentioned below)\n        - use `cc` to open `:Gcommit` from the status window (which opens\n          a split with commit buffer)\n    - `:Gdiff` to compare diff of current window's file\n        - use `:close` on the `fugitive://...` window when done\n        - Note: You can select lines of text in visual mode (\u003cShift\u003ev ..) and\n          copy to the `fugitive://` window and `:w!` to stage different parts of\n          the file!\n            - No need to `git add -p`\n            - Verify in another terminal with `git diff --cached` (or another\n              split using `:Git diff --cached`)\n    - `:Gdiffsplit!` on a file with merge conflicts will open 3 vertical splits\n      with vimdiff\n    - `:Gblame` to open interactive vertical split with `git blame` output\n    - `:Gmove \u003cnewname\u003e` to `git mv current \u003cnewname\u003e`\n    - `:Git [args]` to run arbitrary git command\n        - i.e. `:Git checkout -b some-branch` and `:Git push -u origin some-branch`\n        - use `:close` on the `fugitive://...` window when done\n    - `:Gsplit \u003cbranch\u003e:%` to vimdiff current file with version on another\n      branch (or at another commit)\n            - Note: in vim `%` is a shortcut to current file\n    - `:Gedit \u003cbranch\u003e:path/to/file` to open a file from any branch in a read-only buffer\n    - `:Ggrep 'some text' \u003cbranch\u003e` to `git grep` a pattern in a particular branch\n- \u003chttps://github.com/tpope/vim-obsession#obsessionvim\u003e\n    - This is to help manage \"sessions\" (open splits, window positions, etc)\n    - `:Obsess` to start recording session file (to `Session.vim` in current directory)\n        - can also pass a filename to save as (to keep separate for 4k.vim, etc)\n    - `:qa` to quit vim and close all windows\n    - Load session with `vim -RS Session.vim` or `:source` it\n    - `:Obsess!` to remove the session file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenjyco%2Fdotfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkenjyco%2Fdotfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenjyco%2Fdotfiles/lists"}