mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-28 15:45:41 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f9856a27b9 | |||
| b36b52ad57 | |||
| 1e60ccf49b | |||
|
|
9ca9439b9a | ||
| 6d30ae7e84 | |||
| 031e124663 | |||
| bb50c9fe18 | |||
| 8e608de501 | |||
|
|
8917b7736b | ||
| 18ff879f1d | |||
| c5a258d7be |
24
.gitmodules
vendored
24
.gitmodules
vendored
@@ -1,4 +1,4 @@
|
||||
# vim: set expandtab:
|
||||
# vim: noexpandtab filetype=gitconfig
|
||||
[submodule "dotbot"]
|
||||
path = tools/dotbot
|
||||
url = https://github.com/anishathalye/dotbot.git
|
||||
@@ -23,47 +23,69 @@
|
||||
path = config/tmux/plugins/tmux-continuum
|
||||
url = https://github.com/tmux-plugins/tmux-continuum
|
||||
ignore = dirty
|
||||
|
||||
[submodule "tmux/tmux-sensible"]
|
||||
path = config/tmux/plugins/tmux-sensible
|
||||
url = https://github.com/tmux-plugins/tmux-sensible.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "tmux/tmux-sessionist"]
|
||||
path = config/tmux/plugins/tmux-sessionist
|
||||
url = https://github.com/tmux-plugins/tmux-sessionist.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "tmux/tmux-yank"]
|
||||
path = config/tmux/plugins/tmux-yank
|
||||
url = https://github.com/tmux-plugins/tmux-yank.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "tmux/tmux-window-name"]
|
||||
path = config/tmux/plugins/tmux-window-name
|
||||
url = https://github.com/ivuorinen/tmux-window-name.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "dotbot-pip"]
|
||||
path = tools/dotbot-pip
|
||||
url = https://github.com/sobolevn/dotbot-pip.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "tmux/tmux-suspend"]
|
||||
path = config/tmux/plugins/tmux-suspend
|
||||
url = https://github.com/MunifTanjim/tmux-suspend.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "tmux/tmux-mode-indicator"]
|
||||
path = config/tmux/plugins/tmux-mode-indicator
|
||||
url = https://github.com/MunifTanjim/tmux-mode-indicator.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "tmux/tmux-current-pane-hostname"]
|
||||
path = config/tmux/plugins/tmux-current-pane-hostname
|
||||
url = https://github.com/soyuka/tmux-current-pane-hostname.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "cheat-tldr"]
|
||||
path = config/cheat/cheatsheets/tldr
|
||||
url = https://github.com/ivuorinen/cheatsheet-tldr.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "tmux/tmux-dark-notify"]
|
||||
path = config/tmux/plugins/tmux-dark-notify
|
||||
url = https://github.com/erikw/tmux-dark-notify.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "asdf"]
|
||||
path = local/bin/asdf
|
||||
url = https://github.com/asdf-vm/asdf.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "antidote"]
|
||||
path = tools/antidote
|
||||
url = https://github.com/mattmc3/antidote.git
|
||||
shallow = true
|
||||
ignore = dirty
|
||||
|
||||
[submodule "dotbot-asdf"]
|
||||
path = tools/dotbot-asdf
|
||||
url = https://github.com/sobolevn/dotbot-asdf
|
||||
ignore = dirty
|
||||
|
||||
@@ -44,12 +44,12 @@ repos:
|
||||
- id: shfmt
|
||||
|
||||
- repo: https://github.com/rhysd/actionlint
|
||||
rev: v1.7.6
|
||||
rev: v1.7.7
|
||||
hooks:
|
||||
- id: actionlint
|
||||
|
||||
- repo: https://github.com/renovatebot/pre-commit-hooks
|
||||
rev: 39.107.2
|
||||
rev: 39.117.2
|
||||
hooks:
|
||||
- id: renovate-config-validator
|
||||
|
||||
|
||||
@@ -43,16 +43,28 @@ automatically-unhide-macos-hidden-apps = true
|
||||
if.app-name-regex-substring = 'settings' # All settings
|
||||
run = ['layout floating']
|
||||
|
||||
[[on-window-detected]]
|
||||
if.app-id = 'com.apple.systempreferences' # macOS System Preferences
|
||||
run = ['layout floating']
|
||||
|
||||
[[on-window-detected]]
|
||||
if.app-id = 'com.1password.1password' # 1Password
|
||||
run = ['layout floating']
|
||||
|
||||
[[on-window-detected]]
|
||||
if.app-id = 'org.ferdium.ferdium-app' # Ferdium, has WhatsApp etc.
|
||||
run = ['layout floating']
|
||||
|
||||
[[on-window-detected]]
|
||||
if.app-id = 'com.jetbrains.PhpStorm' # PhpStorm
|
||||
run = ['layout floating']
|
||||
|
||||
[[on-window-detected]]
|
||||
if.app-id = 'com.apple.finder' # Finder
|
||||
run = ['layout floating']
|
||||
|
||||
[[on-window-detected]]
|
||||
if.app-id = 'com.apple.Preview'
|
||||
if.app-id = 'com.apple.Preview' # Preview
|
||||
run = ['layout floating']
|
||||
|
||||
[[on-window-detected]]
|
||||
@@ -91,6 +103,19 @@ run = ['layout floating']
|
||||
if.app-id = 'com.tinyspeck.slackmacgap' # Slack
|
||||
run = ['layout floating']
|
||||
|
||||
[[on-window-detected]]
|
||||
if.app-id = 'md.obsidia' # Obsidian
|
||||
run = ['layout floating']
|
||||
|
||||
[[on-window-detected]]
|
||||
if.app-id = 'com.todoist.mac.Todoist' # Todoist
|
||||
run = ['layout floating']
|
||||
|
||||
[[on-window-detected]]
|
||||
if.app-id = 'com.apple.backup.launcher' # TimeMachine
|
||||
run = ['layout floating']
|
||||
|
||||
|
||||
# Possible values: (qwerty|dvorak)
|
||||
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
|
||||
[key-mapping]
|
||||
@@ -117,6 +142,9 @@ outer.left = 0
|
||||
# Fallback value (if you omit the key): mode.main.binding = {}
|
||||
[mode.main.binding]
|
||||
|
||||
cmd-h = [] # Disable "hide application"
|
||||
cmd-alt-h = [] # Disable "hide others"
|
||||
|
||||
# All possible keys:
|
||||
# - Letters. a, b, c, ..., z
|
||||
# - Numbers. 0, 1, 2, ..., 9
|
||||
@@ -154,10 +182,10 @@ alt-l = 'focus right'
|
||||
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
|
||||
alt-shift-1 = 'workspace 1' # Main
|
||||
alt-shift-2 = 'workspace 2' # Media
|
||||
ctrl-shift-1 = 'move-node-to-workspace 1'
|
||||
ctrl-shift-2 = 'move-node-to-workspace 2'
|
||||
ctrl-shift-1 = 'move-node-to-workspace 1' # Move node to Main
|
||||
ctrl-shift-2 = 'move-node-to-workspace 2' # Move node to Media
|
||||
|
||||
alt-shift-tab = 'workspace-back-and-forth'
|
||||
alt-shift-tab = 'workspace-back-and-forth' # Switch between workspaces
|
||||
ctrl-shift-tab = 'move-workspace-to-monitor --wrap-around prev'
|
||||
|
||||
# See: https://nikitabobko.github.io/AeroSpace/commands#mode
|
||||
|
||||
@@ -97,6 +97,8 @@ brew "fontconfig"
|
||||
brew "gettext"
|
||||
# Core application library for C
|
||||
brew "glib"
|
||||
# Prevent cloud misconfigurations during build-time for IaC tools
|
||||
brew "checkov"
|
||||
# Human-friendly and fast alternative to cut and (sometimes) awk
|
||||
brew "choose-rust"
|
||||
# Cross-platform make
|
||||
@@ -303,8 +305,6 @@ brew "shivammathur/php/php@7.4"
|
||||
brew "shivammathur/php/php@8.0", link: true
|
||||
# Find & fix known vulnerabilities in open-source dependencies
|
||||
brew "snyk/tap/snyk"
|
||||
# Command-line interface for 1Password
|
||||
cask "1password-cli"
|
||||
# AeroSpace is an i3-like tiling window manager for macOS
|
||||
cask "aerospace"
|
||||
# Text editor
|
||||
|
||||
@@ -165,20 +165,6 @@ return {
|
||||
-- Replaced lukas-reineke/indent-blankline.nvim
|
||||
require('mini.indentscope').setup()
|
||||
|
||||
-- Jump to next/previous single character
|
||||
require('mini.jump').setup {
|
||||
mappings = {
|
||||
forward = 'f',
|
||||
backward = 'F',
|
||||
forward_till = 't',
|
||||
backward_till = 'T',
|
||||
repeat_jump = ';',
|
||||
},
|
||||
}
|
||||
|
||||
-- Move lines and blocks of text
|
||||
require('mini.move').setup()
|
||||
|
||||
-- Text edit operators
|
||||
-- g= - Evaluate text and replace with output
|
||||
-- gx - Exchange text regions
|
||||
@@ -223,11 +209,11 @@ return {
|
||||
content = {
|
||||
active = function()
|
||||
local mode, mode_hl = sl.section_mode { trunc_width = 120 }
|
||||
local git = sl.section_git { trunc_width = 75 }
|
||||
local diagnostics = sl.section_diagnostics { trunc_width = 75 }
|
||||
local git = sl.section_git { trunc_width = 9999 }
|
||||
local diagnostics = sl.section_diagnostics { trunc_width = 9999 }
|
||||
local filename = sl.section_filename { trunc_width = 9999 }
|
||||
local fileinfo = sl.section_fileinfo { trunc_width = 120 }
|
||||
local location = sl.section_location { trunc_width = 75 }
|
||||
local fileinfo = sl.section_fileinfo { trunc_width = 9999 }
|
||||
local location = sl.section_location { trunc_width = 9999 }
|
||||
return sl.combine_groups {
|
||||
{ hl = mode_hl, strings = { mode } },
|
||||
{ hl = 'statuslineDevinfo', strings = { git, diagnostics } },
|
||||
|
||||
@@ -2,4 +2,9 @@ default_session = "main"
|
||||
|
||||
[[search_dirs]]
|
||||
path = "~/Code"
|
||||
depth = 10
|
||||
depth = 3
|
||||
|
||||
[picker_colors]
|
||||
highlight_color = "#21202e"
|
||||
highlight_text_color = "#86e1fc"
|
||||
border_color = "#524f67"
|
||||
|
||||
52
docs/alias.md
Normal file
52
docs/alias.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# Alias Commands
|
||||
|
||||
This file lists all aliases defined in `config/alias`.
|
||||
|
||||
| Alias | Command |
|
||||
| ------------- | ------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `....` | `cd ../../..` |
|
||||
| `...` | `cd ../..` |
|
||||
| `..` | `cd ..` |
|
||||
| `.` | `cd $HOME` |
|
||||
| `.b` | `cd $XDG_BIN_HOME` |
|
||||
| `.c` | `cd $HOME/Code` |
|
||||
| `.d` | `cd $DOTFILES` |
|
||||
| `.l` | `cd $HOME/.local` |
|
||||
| `.o` | `cd $HOME/Code/ivuorinen/obsidian/` |
|
||||
| `art` | `[ -f artisan ] && php artisan \|\| php vendor/bin/artisan` |
|
||||
| `cd..` | `cd ..` |
|
||||
| `cdgr` | `cd "$(get_git_root)"` |
|
||||
| `dn` | `du -chd1` |
|
||||
| `flush` | `dscacheutil -flushcache` |
|
||||
| `grep` | `grep --color` |
|
||||
| `hide` | `defaults write com.apple.finder AppleShowAllFiles -bool false; killall Finder` |
|
||||
| `ips` | `ifconfig -a \| grep -o 'inet6\? \(\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)\\|[a-fA-F0-9:]\+\)' \| sed -e 's/inet6* //' \| sort` |
|
||||
| `irssi` | `irssi --config=$XDG_CONFIG_HOME/irssi/config --home=$XDG_CONFIG_HOME/irssi` |
|
||||
| `isodate` | `date +'%Y-%m-%d'` |
|
||||
| `l` | `ls -a` |
|
||||
| `ll` | `ls -la` |
|
||||
| `localip` | `ipconfig getifaddr en1` |
|
||||
| `mirror_site` | `wget -m -k -K -E -e robots=off` |
|
||||
| `peek` | `tee >(cat 1>&2)` |
|
||||
| `pubkey` | `more ~/.ssh/id_rsa.pub \| pbcopy \| echo '=> Public key copied to pasteboard.'` |
|
||||
| `sail` | `[ -f sail ] && bash sail \|\| bash vendor/bin/sail` |
|
||||
| `show` | `defaults write com.apple.finder AppleShowAllFiles -bool true; killall Finder` |
|
||||
| `sl` | `ls` |
|
||||
| `svn` | `svn --config-dir $XDG_CONFIG_HOME/subversion` |
|
||||
| `trivy_scan` | `docker run -v /var/run/docker.sock:/var/run/docker.sock -v $HOME/Library/Caches:/root/.cache/ aquasec/trivy` |
|
||||
| `updatedb` | `sudo /usr/libexec/locate.updatedb` |
|
||||
| `vi` | `nvim` |
|
||||
| `vim` | `nvim` |
|
||||
| `watchx` | `watch -dpbc` |
|
||||
| `wget` | `wget --hsts-file=$XDG_DATA_HOME/wget-hsts` |
|
||||
| `x-datetime` | `date +'%Y-%m-%d %H:%M:%S'` |
|
||||
| `x-ip` | `dig +short myip.opendns.com @resolver1.opendns.com` |
|
||||
| `x-timestamp` | `date +'%s'` |
|
||||
| `xdg` | `xdg-ninja --skip-ok --skip-unsupported` |
|
||||
| `zapall` | `zapds && zappyc` |
|
||||
| `zapds` | `find . -name ".DS_Store" -print -delete` |
|
||||
| `zappyc` | `find . -type f -name '*.pyc' -ls -delete` |
|
||||
| `zedit` | `$EDITOR ~/.dotfiles` |
|
||||
|
||||
Total aliases: 43
|
||||
Last updated: Fri 17 Jan 2025 13:06:59 EET
|
||||
@@ -54,7 +54,7 @@ n <Space>xq * :Trouble quickfix<CR>
|
||||
Quickfix
|
||||
n <Space>xl * :Trouble loclist<CR>
|
||||
Location List
|
||||
n <Space>xd * :Trouble document_diagnostics<CR>
|
||||
n <Space>xd * :Trouble diagnostics<CR>
|
||||
Document Diagnostics
|
||||
n <Space>sx * :Telescope import<CR>
|
||||
Telescope: Import
|
||||
@@ -64,7 +64,7 @@ n <Space>ss * :Telescope treesitter<CR>
|
||||
Treesitter
|
||||
n <Space>sq * :Telescope quickfix<CR>
|
||||
Quickfix
|
||||
n <Space>sp * :lua require("telescope").extensions.lazy_plugins.lazy_plugins()<CR>
|
||||
n <Space>sp * ~/.config/nvim/lua/keymaps.lua
|
||||
Lazy Plugins
|
||||
n <Space>so * :Telescope oldfiles<CR>
|
||||
Old Files
|
||||
@@ -80,14 +80,6 @@ n <Space>sd * :Telescope diagnostics<CR>
|
||||
Search Diagnostics
|
||||
n <Space>sc * :Telescope commands<CR>
|
||||
Commands
|
||||
n <Space>pt * :PhpactorTransform<CR>
|
||||
PHPactor: Transform
|
||||
n <Space>ps * :PhpactorClassSearch<CR>
|
||||
PHPactor: Class Search
|
||||
n <Space>pn * :PhpactorClassNew<CR>
|
||||
PHPactor: Class New
|
||||
n <Space>pm * :PhpactorContextMenu<CR>
|
||||
PHPactor: Context Menu
|
||||
n <Space>/ * ~/.config/nvim/lua/keymaps.lua
|
||||
Fuzzily search in current buffer
|
||||
n <Space>, * :Telescope buffers<CR>
|
||||
@@ -104,37 +96,33 @@ n <Space>cbd * <Cmd>CBd<CR>
|
||||
CB: Remove a box
|
||||
n <Space>cbb * <Cmd>CBccbox<CR>
|
||||
CB: Box Title
|
||||
n <Space>cw * :Lspsaga diagnostic_jump_next<CR>
|
||||
Diagnostic Jump Next
|
||||
n <Space>cv * :Lspsaga diagnostic_jump_prev<CR>
|
||||
Diagnostic Jump Prev
|
||||
n <Space>cu * :Lspsaga preview_definition<CR>
|
||||
Preview Definition
|
||||
n <Space>cT * :Telescope lsp_type_definitions<CR>
|
||||
LSP Type Definitions
|
||||
n <Space>ct * :Lspsaga peek_type_definition<CR>
|
||||
Peek Type Definition
|
||||
n <Space>cwd * ~/.config/nvim/lua/keymaps.lua
|
||||
Dynamic Workspace Symbols
|
||||
n <Space>cws * ~/.config/nvim/lua/keymaps.lua
|
||||
Workspace Symbols
|
||||
n <Space>ct * ~/.config/nvim/lua/keymaps.lua
|
||||
treesitter
|
||||
n <Space>cs * :Telescope lsp_document_symbols<CR>
|
||||
LSP Document Symbols
|
||||
n <Space>cR * :Lspsaga rename ++project<CR>
|
||||
Rename Project wide
|
||||
n <Space>cr * :Lspsaga rename<CR>
|
||||
n <Space>cr * ~/.local/share/bob/v0.10.2/nvim-macos-arm64/share/nvim/runtime/lua/vim/lsp/buf.lua
|
||||
Rename
|
||||
n <Space>cp * :Lspsaga peek_definition<CR>
|
||||
Peek Definition
|
||||
n <Space>cl * :Lspsaga show_cursor_diagnostics<CR>
|
||||
Cursor Diagnostics
|
||||
n <Space>ci * :Lspsaga implement<CR>
|
||||
n <Space>cp * ~/.config/nvim/lua/keymaps.lua
|
||||
Type Definition
|
||||
n <Space>ci * ~/.config/nvim/lua/keymaps.lua
|
||||
Implementations
|
||||
n <Space>cg * :lua require("neogen").generate()<CR>
|
||||
Generate annotations
|
||||
n <Space>cd * :Lspsaga show_line_diagnostics<CR>
|
||||
Line Diagnostics
|
||||
n <Space>cco * :Lspsaga outgoing_calls<CR>
|
||||
Outgoing Calls
|
||||
n <Space>cci * :Lspsaga incoming_calls<CR>
|
||||
Incoming Calls
|
||||
n <Space>ca * :Lspsaga code_action<CR>
|
||||
x <Space>cf * :lua vim.lsp.buf.format()<CR>
|
||||
Format
|
||||
n <Space>cf * :lua vim.lsp.buf.format()<CR>
|
||||
Format
|
||||
n <Space>cd * ~/.config/nvim/lua/keymaps.lua
|
||||
Definitions
|
||||
n <Space>cco * ~/.config/nvim/lua/keymaps.lua
|
||||
Outgoing calls
|
||||
n <Space>cci * ~/.config/nvim/lua/keymaps.lua
|
||||
Incoming calls
|
||||
n <Space>ca * :lua vim.lsp.buf.code_action()<CR>
|
||||
Code Action
|
||||
n <Space>bw * :lua MiniBufremove.wipeout()<CR>
|
||||
Wipeout
|
||||
@@ -150,6 +138,14 @@ n <Space>bd * :lua MiniBufremove.delete()<CR>
|
||||
Delete
|
||||
n <Space>ba * :%bd|e#|bd#<CR>
|
||||
Close all except current
|
||||
n <Space>apt * :PhpactorTransform<CR>
|
||||
PHPactor: Transform
|
||||
n <Space>aps * :PhpactorClassSearch<CR>
|
||||
PHPactor: Class Search
|
||||
n <Space>apn * :PhpactorClassNew<CR>
|
||||
PHPactor: Class New
|
||||
n <Space>apm * :PhpactorContextMenu<CR>
|
||||
PHPactor: Context Menu
|
||||
n <Space>av * :silent TestVisit<CR>
|
||||
Test Visit
|
||||
n <Space>al * :silent TestLast<CR>
|
||||
@@ -184,7 +180,7 @@ n <Space>tmc * <Cmd>setlocal cursorline! cursorline?<CR>
|
||||
Toggle 'cursorline'
|
||||
n <Space>tmb * <Cmd>lua vim.o.bg = vim.o.bg == "dark" and "light" or "dark"; print(vim.o.bg)<CR>
|
||||
Toggle 'background'
|
||||
<Space>cf * ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua
|
||||
os <Space>cf * ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua
|
||||
Format buffer
|
||||
x # * vim/_defaults.lua
|
||||
:help v_#-default
|
||||
@@ -194,17 +190,11 @@ n % <Plug>(MatchitNormalForward)
|
||||
n & * :&&<CR>
|
||||
:help &-default
|
||||
n '? & :<C-U>echo ":Start" dispatch#start_focus(v:count > 1 ? 0 : v:count ? line(".") : -1)<CR>
|
||||
n '! & <SNR>30_:.Start!
|
||||
n '<Space> & <SNR>30_:.Start<Space>
|
||||
n '<CR> & <SNR>30_:.Start<CR>
|
||||
n '! & <SNR>10_:.Start!
|
||||
n '<Space> & <SNR>10_:.Start<Space>
|
||||
n '<CR> & <SNR>10_:.Start<CR>
|
||||
x * * vim/_defaults.lua
|
||||
:help v_star-default
|
||||
o ; * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/jump.lua
|
||||
Repeat jump
|
||||
x ; * <Cmd>lua MiniJump.jump()<CR>
|
||||
Repeat jump
|
||||
n ; * <Cmd>lua MiniJump.jump()<CR>
|
||||
Repeat jump
|
||||
v < * <gv
|
||||
Indent Left
|
||||
n < * <gv
|
||||
@@ -217,31 +207,19 @@ n @ * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/clue.lua
|
||||
Execute macro without 'mini.clue' triggers
|
||||
x @ * mode() ==# 'V' ? ':normal! @'.getcharstr().'<CR>' : '@'
|
||||
:help v_@-default
|
||||
o F * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/jump.lua
|
||||
Jump backward
|
||||
x F * <Cmd>lua MiniJump.smart_jump(true, false)<CR>
|
||||
Jump backward
|
||||
n F * <Cmd>lua MiniJump.smart_jump(true, false)<CR>
|
||||
Jump backward
|
||||
n K * :Lspsaga hover_doc<CR>
|
||||
n K * :lua vim.lsp.buf.hover()<CR>
|
||||
Hover Documentation
|
||||
n Q * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/clue.lua
|
||||
Execute macro without 'mini.clue' triggers
|
||||
x Q * mode() ==# 'V' ? ':normal! @<C-R>=reg_recorded()<CR><CR>' : 'Q'
|
||||
:help v_Q-default
|
||||
o T * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/jump.lua
|
||||
Jump backward till
|
||||
x T * <Cmd>lua MiniJump.smart_jump(true, true)<CR>
|
||||
Jump backward till
|
||||
n T * <Cmd>lua MiniJump.smart_jump(true, true)<CR>
|
||||
Jump backward till
|
||||
n Y * y$
|
||||
:help Y-default
|
||||
n Zk * ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua
|
||||
o Zk * ~/.config/nvim/lua/keymaps.lua
|
||||
Flash Treesitter
|
||||
o Zk * ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua
|
||||
x Zk * ~/.config/nvim/lua/keymaps.lua
|
||||
Flash Treesitter
|
||||
x Zk * ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua
|
||||
n Zk * ~/.config/nvim/lua/keymaps.lua
|
||||
Flash Treesitter
|
||||
o [% <Plug>(MatchitOperationMultiBackward)
|
||||
x [% <Plug>(MatchitVisualMultiBackward)
|
||||
@@ -289,10 +267,10 @@ n ]h * <Cmd>lua MiniDiff.goto_hunk('next')<CR>
|
||||
Next hunk
|
||||
n ]d * vim/_defaults.lua
|
||||
Jump to the next diagnostic
|
||||
n `? & <SNR>30_:.FocusDispatch<CR>
|
||||
n `! & <SNR>30_:.Dispatch!
|
||||
n `<Space> & <SNR>30_:.Dispatch<Space>
|
||||
n `<CR> & <SNR>30_:.Dispatch<CR>
|
||||
n `? & <SNR>10_:.FocusDispatch<CR>
|
||||
n `! & <SNR>10_:.Dispatch!
|
||||
n `<Space> & <SNR>10_:.Dispatch<Space>
|
||||
n `<CR> & <SNR>10_:.Dispatch<CR>
|
||||
x a% <Plug>(MatchitVisualTextObject)
|
||||
o ax <Plug>(textobj-xmlattr-attr-a)
|
||||
x ax <Plug>(textobj-xmlattr-attr-a)
|
||||
@@ -300,25 +278,19 @@ o ai * <Cmd>lua MiniIndentscope.textobject(true)<CR>
|
||||
Object scope with border
|
||||
x ai * <Cmd>lua MiniIndentscope.textobject(true)<CR>
|
||||
Object scope with border
|
||||
o f * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/jump.lua
|
||||
Jump forward
|
||||
x f * <Cmd>lua MiniJump.smart_jump(false, false)<CR>
|
||||
Jump forward
|
||||
n f * <Cmd>lua MiniJump.smart_jump(false, false)<CR>
|
||||
Jump forward
|
||||
n gR * :RegexplainerToggle<CR>
|
||||
Toggle Regexplainer
|
||||
o g% <Plug>(MatchitOperationBackward)
|
||||
x g% <Plug>(MatchitVisualBackward)
|
||||
n g% <Plug>(MatchitNormalBackward)
|
||||
n g`? & :<C-U>echo ":Spawn" dispatch#spawn_focus(v:count > 1 ? 0 : v:count ? line(".") : -1)<CR>
|
||||
n g`! & <SNR>30_:.Spawn!
|
||||
n g`<Space> & <SNR>30_:.Spawn<Space>
|
||||
n g`<CR> & <SNR>30_:.Spawn<CR>
|
||||
n g`! & <SNR>10_:.Spawn!
|
||||
n g`<Space> & <SNR>10_:.Spawn<Space>
|
||||
n g`<CR> & <SNR>10_:.Spawn<CR>
|
||||
n g'? & :<C-U>echo ":Spawn" dispatch#spawn_focus(v:count > 1 ? 0 : v:count ? line(".") : -1)<CR>
|
||||
n g'! & <SNR>30_:.Spawn!
|
||||
n g'<Space> & <SNR>30_:.Spawn<Space>
|
||||
n g'<CR> & <SNR>30_:.Spawn<CR>
|
||||
n g'! & <SNR>10_:.Spawn!
|
||||
n g'<Space> & <SNR>10_:.Spawn<Space>
|
||||
n g'<CR> & <SNR>10_:.Spawn<CR>
|
||||
x gS * :<C-U>lua MiniSplitjoin.toggle({ region = MiniSplitjoin.get_visual_region() })<CR>
|
||||
Toggle arguments
|
||||
n gS * v:lua.MiniSplitjoin.operator("toggle") . " "
|
||||
@@ -400,9 +372,9 @@ x k * v:count == 0 ? 'gk' : 'k'
|
||||
n k * v:count == 0 ? 'gk' : 'k'
|
||||
Move up
|
||||
n m? & :<C-U>echo ":Dispatch" dispatch#make_focus(v:count > 1 ? 0 : v:count ? line(".") : -1)<CR>
|
||||
n m! & <SNR>30_:.Make!
|
||||
n m<Space> & <SNR>30_:.Make<Space>
|
||||
n m<CR> & <SNR>30_:.Make<CR>
|
||||
n m! & <SNR>10_:.Make!
|
||||
n m<Space> & <SNR>10_:.Make<Space>
|
||||
n m<CR> & <SNR>10_:.Make<CR>
|
||||
n shn * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/surround.lua
|
||||
Highlight next surrounding
|
||||
n sFn * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/surround.lua
|
||||
@@ -439,17 +411,11 @@ n sd * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/surround.lua
|
||||
Delete surrounding
|
||||
n sa * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/surround.lua
|
||||
Add surrounding
|
||||
o t * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/jump.lua
|
||||
Jump forward till
|
||||
x t * <Cmd>lua MiniJump.smart_jump(false, true)<CR>
|
||||
Jump forward till
|
||||
n t * <Cmd>lua MiniJump.smart_jump(false, true)<CR>
|
||||
Jump forward till
|
||||
o zk * ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua
|
||||
o zk * ~/.config/nvim/lua/keymaps.lua
|
||||
Flash
|
||||
x zk * ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua
|
||||
x zk * ~/.config/nvim/lua/keymaps.lua
|
||||
Flash
|
||||
n zk * ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua
|
||||
n zk * ~/.config/nvim/lua/keymaps.lua
|
||||
Flash
|
||||
n <F1> * :FloatermToggle<CR>
|
||||
Toggle Floaterm
|
||||
@@ -492,30 +458,30 @@ x <Plug>(MatchitVisualBackward) * :<C-U>call matchit#Match_wrapper('',0,'v')<CR
|
||||
x <Plug>(MatchitVisualForward) * :<C-U>call matchit#Match_wrapper('',1,'v')<CR>:if col("''") != col("$") | exe ":normal! m'" | endif<CR>gv``
|
||||
n <Plug>(MatchitNormalBackward) * :<C-U>call matchit#Match_wrapper('',0,'n')<CR>
|
||||
n <Plug>(MatchitNormalForward) * :<C-U>call matchit#Match_wrapper('',1,'n')<CR>
|
||||
n <SNR>30_:. & :<C-R>=getcmdline() =~ ',' ? "\0250" : ""<CR>
|
||||
o <Plug>(textobj-xmlattr-attr-i) & <SNR>26_(save-cursor-pos):<C-U>call g:__textobj_xmlattr.do_by_pattern("select","attr-i","o")<CR>
|
||||
v <Plug>(textobj-xmlattr-attr-i) & <SNR>26_(save-cursor-pos):<C-U>call g:__textobj_xmlattr.do_by_pattern("select","attr-i","v")<CR>
|
||||
o <Plug>(textobj-xmlattr-attr-a) & <SNR>26_(save-cursor-pos):<C-U>call g:__textobj_xmlattr.do_by_pattern("select","attr-a","o")<CR>
|
||||
v <Plug>(textobj-xmlattr-attr-a) & <SNR>26_(save-cursor-pos):<C-U>call g:__textobj_xmlattr.do_by_pattern("select","attr-a","v")<CR>
|
||||
n <SNR>26_ * <SNR>26_
|
||||
<SNR>26_(save-cursor-pos) * <SNR>26_save_cursor_pos()
|
||||
s <Plug>luasnip-jump-prev * ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua
|
||||
LuaSnip: Jump to the previous node
|
||||
s <Plug>luasnip-jump-next * ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua
|
||||
LuaSnip: Jump to the next node
|
||||
s <Plug>luasnip-prev-choice * ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua
|
||||
LuaSnip: Change to the previous choice from the choiceNode
|
||||
s <Plug>luasnip-next-choice * ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua
|
||||
LuaSnip: Change to the next choice from the choiceNode
|
||||
s <Plug>luasnip-expand-snippet * ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua
|
||||
LuaSnip: Expand the current snippet
|
||||
s <Plug>luasnip-expand-or-jump * ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua
|
||||
LuaSnip: Expand or jump in the current snippet
|
||||
<Plug>luasnip-expand-repeat * ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua
|
||||
LuaSnip: Repeat last node expansion
|
||||
n <Plug>luasnip-delete-check * ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua
|
||||
LuaSnip: Removes current snippet from jumplist
|
||||
n <Plug>PlenaryTestFile * :lua require('plenary.test_harness').test_file(vim.fn.expand("%:p"))<CR>
|
||||
n <M-k> * <Cmd>lua MiniMove.move_line('up')<CR>
|
||||
Move line up
|
||||
n <M-j> * <Cmd>lua MiniMove.move_line('down')<CR>
|
||||
Move line down
|
||||
n <M-l> * <Cmd>lua MiniMove.move_line('right')<CR>
|
||||
Move line right
|
||||
n <M-h> * <Cmd>lua MiniMove.move_line('left')<CR>
|
||||
Move line left
|
||||
x <M-k> * <Cmd>lua MiniMove.move_selection('up')<CR>
|
||||
Move up
|
||||
x <M-j> * <Cmd>lua MiniMove.move_selection('down')<CR>
|
||||
Move down
|
||||
x <M-l> * <Cmd>lua MiniMove.move_selection('right')<CR>
|
||||
Move right
|
||||
x <M-h> * <Cmd>lua MiniMove.move_selection('left')<CR>
|
||||
Move left
|
||||
o <Plug>(textobj-xmlattr-attr-i) & <SNR>14_(save-cursor-pos):<C-U>call g:__textobj_xmlattr.do_by_pattern("select","attr-i","o")<CR>
|
||||
v <Plug>(textobj-xmlattr-attr-i) & <SNR>14_(save-cursor-pos):<C-U>call g:__textobj_xmlattr.do_by_pattern("select","attr-i","v")<CR>
|
||||
o <Plug>(textobj-xmlattr-attr-a) & <SNR>14_(save-cursor-pos):<C-U>call g:__textobj_xmlattr.do_by_pattern("select","attr-a","o")<CR>
|
||||
v <Plug>(textobj-xmlattr-attr-a) & <SNR>14_(save-cursor-pos):<C-U>call g:__textobj_xmlattr.do_by_pattern("select","attr-a","v")<CR>
|
||||
n <SNR>14_ * <SNR>14_
|
||||
<SNR>14_(save-cursor-pos) * <SNR>14_save_cursor_pos()
|
||||
n <SNR>10_:. & :<C-R>=getcmdline() =~ ',' ? "\0250" : ""<CR>
|
||||
x <C-S> * <Esc><Cmd>silent! update | redraw<CR>
|
||||
Save and go to Normal mode
|
||||
n <C-S> * :w!<CR>
|
||||
@@ -528,4 +494,4 @@ n <C-L> * :lua vim.lsp.buf.signature_help()<CR>
|
||||
Signature
|
||||
```
|
||||
|
||||
- Generated on Tue 7 Jan 2025 21:37:18 EET
|
||||
- Generated on Tue 21 Jan 2025 15:03:23 EET
|
||||
|
||||
@@ -26,7 +26,7 @@ msgr nested "Change user shell to zsh if it is available and not the current"
|
||||
|
||||
# Change user shell to zsh if not that already.
|
||||
if hash zsh 2> /dev/null; then
|
||||
[[ "$SHELL" != $(which zsh) ]] && chsh -s "$(which zsh)"
|
||||
[[ $SHELL != $(which zsh) ]] && chsh -s "$(which zsh)"
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
@@ -150,7 +150,7 @@ msgr nested "Settings for Finder"
|
||||
# Set Desktop as the default location for new Finder windows
|
||||
# For other paths, use `PfLo` and `file:///full/path/here/`
|
||||
defaults write com.apple.finder NewWindowTarget -string "PfDe"
|
||||
defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/Desktop/"
|
||||
defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/"
|
||||
|
||||
# Show icons for external hard drives, servers, and removable media on the desktop
|
||||
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
|
||||
@@ -201,6 +201,10 @@ defaults write com.apple.finder FXInfoPanesExpanded -dict \
|
||||
OpenWith -bool true \
|
||||
Privileges -bool true
|
||||
|
||||
# Move windows by dragging any part of the window
|
||||
# From https://nikitabobko.github.io/AeroSpace/goodies
|
||||
defaults write -g NSWindowShouldDragOnGesture -bool true
|
||||
|
||||
###############################################################################
|
||||
# Screenshots #
|
||||
###############################################################################
|
||||
|
||||
86
scripts/update-readme-aliases.sh
Executable file
86
scripts/update-readme-aliases.sh
Executable file
@@ -0,0 +1,86 @@
|
||||
#!/usr/bin/env bash
|
||||
# update-readme-aliases.sh
|
||||
# @description Update alias documentation in $DOTFILES/docs/alias.md
|
||||
#
|
||||
# Author: Ismo Vuorinen <https://github.com/ivuorinen> 2025
|
||||
# License: MIT
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Paths
|
||||
ALIAS_FILE="$DOTFILES/config/alias"
|
||||
OUTPUT_FILE="$DOTFILES/docs/alias.md"
|
||||
|
||||
# Check if alias file exists
|
||||
if [[ ! -f $ALIAS_FILE ]]; then
|
||||
echo "Alias file not found: $ALIAS_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Declare associative array
|
||||
declare -a alias_table
|
||||
|
||||
echo "Parsing aliases..."
|
||||
while IFS= read -r line; do
|
||||
# Skip all lines that do not start with 'alias'
|
||||
if [[ ! $line =~ ^alias\ ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# Split alias and command and handle both ' and "
|
||||
if [[ $line =~ ^alias\ ([^=]+)=[\'\"](.*)[\'\"]$ ]]; then
|
||||
alias_name="${BASH_REMATCH[1]}"
|
||||
alias_command="${BASH_REMATCH[2]//|/\\|}" # fix markdown table separator
|
||||
|
||||
# Save alias to table
|
||||
alias_table+=("\`$alias_name\`␟\`$alias_command\`")
|
||||
else
|
||||
echo "Warning: Could not parse line: $line"
|
||||
fi
|
||||
|
||||
done < "$ALIAS_FILE"
|
||||
|
||||
# Sort array by alias name
|
||||
# shellcheck disable=SC2207
|
||||
IFS=$'\n' sorted_aliases=($(sort <<< "${alias_table[*]}"))
|
||||
unset IFS
|
||||
|
||||
# Calculate cell max lengths
|
||||
max_alias_length=5 # "Alias" min length
|
||||
max_command_length=7 # "Command" min length
|
||||
|
||||
for entry in "${sorted_aliases[@]}"; do
|
||||
IFS=$'␟' read -r alias_name alias_command <<< "$entry"
|
||||
max_alias_length=$((${#alias_name} > max_alias_length ? ${#alias_name} : max_alias_length))
|
||||
max_command_length=$((${#alias_command} > max_command_length ? ${#alias_command} : max_command_length))
|
||||
done
|
||||
|
||||
# Empty the markdown file and add header
|
||||
printf "# Alias Commands\n\nThis file lists all aliases defined in \`config/alias\`.\n\n" > "$OUTPUT_FILE"
|
||||
|
||||
# Add table header
|
||||
printf "| %-*s | %-*s |\n" \
|
||||
"$max_alias_length" "Alias" \
|
||||
"$max_command_length" "Command" >> "$OUTPUT_FILE"
|
||||
|
||||
# Add table header separator
|
||||
printf "| %-*s | %-*s |\n" \
|
||||
"$max_alias_length" "$(printf '%0.s-' $(seq 1 $max_alias_length))" \
|
||||
"$max_command_length" "$(printf '%0.s-' $(seq 1 $max_command_length))" >> "$OUTPUT_FILE"
|
||||
|
||||
# Create table with max cell lengths
|
||||
for entry in "${sorted_aliases[@]}"; do
|
||||
IFS=$'␟' read -r alias_name alias_command <<< "$entry"
|
||||
printf "| %-*s | %-*s |\n" \
|
||||
"$max_alias_length" "$alias_name" \
|
||||
"$max_command_length" "$alias_command" >> "$OUTPUT_FILE"
|
||||
done
|
||||
|
||||
{
|
||||
printf "\n"
|
||||
printf "Total aliases: %d\n" "${#sorted_aliases[@]}"
|
||||
printf "Last updated: %s\n" "$(date)"
|
||||
} >> "$OUTPUT_FILE"
|
||||
|
||||
# Announce process completion
|
||||
echo "Alias documentation updated: $OUTPUT_FILE"
|
||||
@@ -1,7 +1,9 @@
|
||||
# vim: ft=sshconfig
|
||||
Include shared.d/*
|
||||
Include local.d/*
|
||||
|
||||
Host *
|
||||
ServerAliveInterval 300 # send null packets every 5min to keep connection alive
|
||||
ServerAliveCountMax 2 # if the server doesn't respond 2 times, it's gone so give up
|
||||
# IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
||||
ForwardAgent yes
|
||||
# IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# vim: ft=sshconfig
|
||||
|
||||
Host t1
|
||||
User ubuntu
|
||||
HostName t1.home.antiprocess.net
|
||||
@@ -14,4 +16,3 @@ Host t4
|
||||
User ubuntu
|
||||
HostName t4.home.antiprocess.net
|
||||
IdentityFile ~/.ssh/id_rsa
|
||||
|
||||
|
||||
Reference in New Issue
Block a user