From: Andre Ramnitz Date: Sun, 22 Dec 2024 20:02:51 +0000 (+0100) Subject: rename banners to cheatsheets X-Git-Url: https://git.ramnitz.eu/?a=commitdiff_plain;h=e4493e2f87c987a18e35863e0707b82551c0e89a;p=dotfiles.git rename banners to cheatsheets --- diff --git a/banner-bash.asc b/banner-bash.asc deleted file mode 100644 index 47e539d9..00000000 --- a/banner-bash.asc +++ /dev/null @@ -1,61 +0,0 @@ - _ _ - | |__ __ _ ___ | |__ - | '_ \ / _` |/ __|| '_ \ - | |_) || (_| |\__ \| | | | - |_.__/ \__,_||___/|_| |_| - -Line movement: -ctrl+a - Move cursor to the beginning of the line (home). -ctrl+e - Move cursor to the end of the line (end). -ctrl+f - Move the cursor forward one character. -ctrl+b - Move the cursor back one character. -alt+f - Move cursor forward one word. -alt+b - Move cursor backward one word. -ctrl+xx - Toggle the cursor between the current position and the beginning of the line. -ctrl+]- - Move cursor to the first occurrence of the entered character to the right. -ctrl+alt-]- - Move cursor to the first occurrence of the entered character to the left. - -Directory movement: -cd /path - Change to /path directory. -cd - - Change to previous directory. -cd - Change to home directory. - -Screen control: -ctrl+s - Stop (pause) output on the screen. -ctrl+q - Resume output on the screen (after stopping it with the previous command). -ctrl+l - Clears the screen preserving the current command (very similar to the clear command). - -Text manipulation: -ctrl+u - Remove text relative to the cursor's current position to the beginning of the line. -ctrl+k - Remove text relative to the cursor's current position to the end of the line. -alt+d - Remove one word moving forward from the cursor's current position. -ctrl+w - Remove one word moving backward from the cursor's current position. -ctrl+y - Paste deleted text. - -Command history: -ctrl+p - Scroll backward through previous command history for the current session. -ctrl+p - Scroll forward through next entry in command history for the current session -ctrl+r - Reverse search through history (type parts of the command to initiate query). diff --git a/banner-git.asc b/banner-git.asc deleted file mode 100644 index d0951f8b..00000000 --- a/banner-git.asc +++ /dev/null @@ -1,8 +0,0 @@ - -░█▀▀░█░▀█▀░░░█▀▀░█░█░█▀▀░█▀█░▀█▀░░░░░█▀▀░█░█░█▀▀░█▀▀░▀█▀ -░█░█░█░░█░░░░█░░░█▀█░█▀▀░█▀█░░█░░▄▄▄░▀▀█░█▀█░█▀▀░█▀▀░░█░ -░▀▀▀░▀░░▀░░░░▀▀▀░▀░▀░▀▀▀░▀░▀░░▀░░░░░░▀▀▀░▀░▀░▀▀▀░▀▀▀░░▀░ - -# delete references to files: -# git filter-branch -f --index-filter git rm --cached --ignore-unmatch "[FILENAME]" --tag-name-filter cat -- --all - diff --git a/banner-kak.asc b/banner-kak.asc deleted file mode 100644 index 180108bb..00000000 --- a/banner-kak.asc +++ /dev/null @@ -1,200 +0,0 @@ -# Kakoune - -set verbose mode (good for learning) -`:set -add global autoinfo normal` - -## Movement - -### Goto - -`10g` - go to line 10 - -`g` + - -`g` - buffer start - -`e` - buffer end - -`j` - buffer bottom - -`t` - window top - -`c` - window center - -`b` - window bottom - - -`l` - line end - -`h` - line begin - -`i` - line non blank start - -### Align screen relative to cursor (Vim z+) - -`v` + - -`v` - center vertically - -`m` - center horizontally - -`t` - top - -`b` - bottom - -`h`, `j`, `k`, `l` - scroll one char - -### Search - -`/ ` - start search forward (backward) - -`n ` - search next search pattern forward (backward) - -`N ` - extend next search pattern forward (backward) - -### Selections - -`%` - select whole buffer - -`s` - select (find) regex in selected text - -`` - select first and last char of selection(s) - -`` - split selection on line ends - -`S` - split selection on given regex - -`x` - select line (`X` - next line below) - -`` - extend selections to whole lines - -`` - crop selections to whole lines - -`` - switch anchor and cursor - -`;` - collapse selection to its anchor (one char, effectively reduce selection to one char) - -`` - select inner object - -`` - select all object (paragraph, sentence, etc) - -`[` - select to beginning of an object; `` - split selected text on line ends - -`` - select lines matching regexp inside selection - -`` - select lines NOT matching regexp inside selection - -`7G` - select to line 7 - -`` - select until beginning of; line like Vim `0` - -`` - select until end of line; like Vim `$` - -`m` - match paranthesis; like Vim's `%`, select parans and content inside - -`` - match parens backwards (direction) - -`M` - get a selection from current cursor to next block end or rather extend to next parans included - -`` - extend to prev parens - -`f` - select to next char included (`` - prev char) - -`C` - copy selection on next lines (`` - previus lines) - -`` - copy identation - -`Z` - save selection in mark register `^` - -`z` - restore selections stored in register `^` - -`` - combine selection from register, confirm by hitting `a` for example - -`` - combine selections to register - -`` - remove all selections except main - -`` - remove main selection - -`_` - trim selections - -### Text manipulation - -`y` - yank - -`p` - paste after (`P` before) - -`` - paste every yanked selection after selected text, keep new (pasted) selection (`` before) - -`d` - delete - -`i` - instert - -`c` - delete and inserst - -`R` - replace selection with the content of the register - -`` - replace selected text with yanked text - -`u` - undo - -`U` - redo - -`` - join with next line (`` include spaces) - -`backtick` - convert to lower-case (`` - swap case) - -`~` - convert to upper-case - -`o` - insert on new line below (`O` above) - -`` - add new line below (`` above) - -## Advanced - -`)` - loop through selections (`(` backward) - -`` - rotate splitted selection clock-wise (`` counter clock-wise) - -`"m*` - save smart search (*) pattern to register `m` (`_` is a null register) - -`` - instert into the buffer value stored in the register (`%` - buffer name, etc.); numbers correspond to submatches, like `(\w+)` - -`.` - repeat last insert session - -`` - repeat last selection (for example `]p`); like Vim' `;` - -`Q` - start recording macro until `Esc` is hit - -`q` - replay the macro (saved in the `@` register) - -### Shell - -`|` - modify selections by passind to the shell command which will transform them and write back (`` will ignore results) - -`!` - insert a result of the shell cmd before selections (`` - append result) - -`$` - apply predicate to selections (0 return value is considered a success); filiter them - -### Tips - -`|fold -w80` - wrap selection - -`!date` - insert date before selection - -`$xsel -bi` - copy selection to clipboard. `-bi` stands for `--clipboard --input` - -`%|diff -u % -` - compare current buffer contents with the version saved to disk - -`` insert mode -> normal mode (for one cmd) -> back, preseving selections/bindings, modes can be deeply nested (hit Esc more than once if needed) - -The couple `u` and `U` lets you move backward and forward in the last branch while their alternative versions `` `` follow absolute history id which may be located somewhere else in the history tree. - diff --git a/banner.asc b/banner.asc deleted file mode 100644 index b2b7125c..00000000 --- a/banner.asc +++ /dev/null @@ -1,19 +0,0 @@ - -░█▀▀░█▀▀░█▀█░▀█▀░█▀█░█▀█░░░█▀▀░█░█░█▀▀░█▀█░▀█▀░░░░░█▀▀░█░█░█▀▀░█▀▀░▀█▀ -░█░█░█▀▀░█░█░░█░░█░█░█░█░░░█░░░█▀█░█▀▀░█▀█░░█░░▄▄▄░▀▀█░█▀█░█▀▀░█▀▀░░█░ -░▀▀▀░▀▀▀░▀░▀░░▀░░▀▀▀░▀▀▀░░░▀▀▀░▀░▀░▀▀▀░▀░▀░░▀░░░░░░▀▀▀░▀░▀░▀▀▀░▀▀▀░░▀░ - -dist-upgrade: 'sudo emaint sync -a && sudo emerge -avuDN @world' -list all pkgs installed : 'cat /var/lib/portage/world' or 'ls -d /var/db/pkg/*/*' -list all pkgs installed from group: 'qlist -IC kde-plasma kde-apps kde-frameworks' -search in overlays: 'eix-remote update && eix-sync && eix -R [search term]' -rebuild @world & @system 'emerge --ask --verbose --deep --emptytree --with-bdeps=y --keep-going @world' -*** *** *** *** *** *** *** *** *** -redirect STDOUT: foo 1> /dev/null *** redirect STDERR: foo 2> /dev/null *** redirect BOTH: foo > /dev/null 2>&1 -launch if not already running: 'pidof foo 1> /dev/null || foo &' (posix compliant) -restart plasmashell in-place: 'kquitapp5 plasmashell || killall plasmashell && kstart5 plasmashell' -*** *** *** *** *** *** *** *** *** -To execute programs with the amdgpu-pro-vulkan driver: - - Use the wrapper script: e.g. 'vk_pro vkcube' - - Define the following environment variable: - VK_DRIVER_FILES=/usr/share/vulkan/icd.d/amd_pro_icd64.json:/usr/share/vulkan/icd.d/amd_pro_icd32.json diff --git a/cheatsheet-bash.txt b/cheatsheet-bash.txt new file mode 100644 index 00000000..47e539d9 --- /dev/null +++ b/cheatsheet-bash.txt @@ -0,0 +1,61 @@ + _ _ + | |__ __ _ ___ | |__ + | '_ \ / _` |/ __|| '_ \ + | |_) || (_| |\__ \| | | | + |_.__/ \__,_||___/|_| |_| + +Line movement: +ctrl+a + Move cursor to the beginning of the line (home). +ctrl+e + Move cursor to the end of the line (end). +ctrl+f + Move the cursor forward one character. +ctrl+b + Move the cursor back one character. +alt+f + Move cursor forward one word. +alt+b + Move cursor backward one word. +ctrl+xx + Toggle the cursor between the current position and the beginning of the line. +ctrl+]- + Move cursor to the first occurrence of the entered character to the right. +ctrl+alt-]- + Move cursor to the first occurrence of the entered character to the left. + +Directory movement: +cd /path + Change to /path directory. +cd - + Change to previous directory. +cd + Change to home directory. + +Screen control: +ctrl+s + Stop (pause) output on the screen. +ctrl+q + Resume output on the screen (after stopping it with the previous command). +ctrl+l + Clears the screen preserving the current command (very similar to the clear command). + +Text manipulation: +ctrl+u + Remove text relative to the cursor's current position to the beginning of the line. +ctrl+k + Remove text relative to the cursor's current position to the end of the line. +alt+d + Remove one word moving forward from the cursor's current position. +ctrl+w + Remove one word moving backward from the cursor's current position. +ctrl+y + Paste deleted text. + +Command history: +ctrl+p + Scroll backward through previous command history for the current session. +ctrl+p + Scroll forward through next entry in command history for the current session +ctrl+r + Reverse search through history (type parts of the command to initiate query). diff --git a/cheatsheet-gentoo.txt b/cheatsheet-gentoo.txt new file mode 100644 index 00000000..b2b7125c --- /dev/null +++ b/cheatsheet-gentoo.txt @@ -0,0 +1,19 @@ + +░█▀▀░█▀▀░█▀█░▀█▀░█▀█░█▀█░░░█▀▀░█░█░█▀▀░█▀█░▀█▀░░░░░█▀▀░█░█░█▀▀░█▀▀░▀█▀ +░█░█░█▀▀░█░█░░█░░█░█░█░█░░░█░░░█▀█░█▀▀░█▀█░░█░░▄▄▄░▀▀█░█▀█░█▀▀░█▀▀░░█░ +░▀▀▀░▀▀▀░▀░▀░░▀░░▀▀▀░▀▀▀░░░▀▀▀░▀░▀░▀▀▀░▀░▀░░▀░░░░░░▀▀▀░▀░▀░▀▀▀░▀▀▀░░▀░ + +dist-upgrade: 'sudo emaint sync -a && sudo emerge -avuDN @world' +list all pkgs installed : 'cat /var/lib/portage/world' or 'ls -d /var/db/pkg/*/*' +list all pkgs installed from group: 'qlist -IC kde-plasma kde-apps kde-frameworks' +search in overlays: 'eix-remote update && eix-sync && eix -R [search term]' +rebuild @world & @system 'emerge --ask --verbose --deep --emptytree --with-bdeps=y --keep-going @world' +*** *** *** *** *** *** *** *** *** +redirect STDOUT: foo 1> /dev/null *** redirect STDERR: foo 2> /dev/null *** redirect BOTH: foo > /dev/null 2>&1 +launch if not already running: 'pidof foo 1> /dev/null || foo &' (posix compliant) +restart plasmashell in-place: 'kquitapp5 plasmashell || killall plasmashell && kstart5 plasmashell' +*** *** *** *** *** *** *** *** *** +To execute programs with the amdgpu-pro-vulkan driver: + - Use the wrapper script: e.g. 'vk_pro vkcube' + - Define the following environment variable: + VK_DRIVER_FILES=/usr/share/vulkan/icd.d/amd_pro_icd64.json:/usr/share/vulkan/icd.d/amd_pro_icd32.json diff --git a/cheatsheet-git.txt b/cheatsheet-git.txt new file mode 100644 index 00000000..d0951f8b --- /dev/null +++ b/cheatsheet-git.txt @@ -0,0 +1,8 @@ + +░█▀▀░█░▀█▀░░░█▀▀░█░█░█▀▀░█▀█░▀█▀░░░░░█▀▀░█░█░█▀▀░█▀▀░▀█▀ +░█░█░█░░█░░░░█░░░█▀█░█▀▀░█▀█░░█░░▄▄▄░▀▀█░█▀█░█▀▀░█▀▀░░█░ +░▀▀▀░▀░░▀░░░░▀▀▀░▀░▀░▀▀▀░▀░▀░░▀░░░░░░▀▀▀░▀░▀░▀▀▀░▀▀▀░░▀░ + +# delete references to files: +# git filter-branch -f --index-filter git rm --cached --ignore-unmatch "[FILENAME]" --tag-name-filter cat -- --all + diff --git a/cheatsheet-kak.md b/cheatsheet-kak.md new file mode 100644 index 00000000..90c5dee6 --- /dev/null +++ b/cheatsheet-kak.md @@ -0,0 +1,200 @@ +# Kakoune +###### [source](https://gist.github.com/lambda-mike/7ce75275b519c583a2a3410c56a7d546) + +set verbose mode (good for learning) +`:set -add global autoinfo normal` + +## Movement + +### Goto + +`10g` - go to line 10 + +`g` + + +`g` - buffer start + +`e` - buffer end + +`j` - buffer bottom + +`t` - window top + +`c` - window center + +`b` - window bottom + + +`l` - line end + +`h` - line begin + +`i` - line non blank start + +### Align screen relative to cursor (Vim z+) + +`v` + + +`v` - center vertically + +`m` - center horizontally + +`t` - top + +`b` - bottom + +`h`, `j`, `k`, `l` - scroll one char + +### Search + +`/ ` - start search forward (backward) + +`n ` - search next search pattern forward (backward) + +`N ` - extend next search pattern forward (backward) + +### Selections + +`%` - select whole buffer + +`s` - select (find) regex in selected text + +`` - select first and last char of selection(s) + +`` - split selection on line ends + +`S` - split selection on given regex + +`x` - select line (`X` - next line below) + +`` - extend selections to whole lines + +`` - crop selections to whole lines + +`` - switch anchor and cursor + +`;` - collapse selection to its anchor (one char, effectively reduce selection to one char) + +`` - select inner object + +`` - select all object (paragraph, sentence, etc) + +`[` - select to beginning of an object; `` - split selected text on line ends + +`` - select lines matching regexp inside selection + +`` - select lines NOT matching regexp inside selection + +`7G` - select to line 7 + +`` - select until beginning of; line like Vim `0` + +`` - select until end of line; like Vim `$` + +`m` - match paranthesis; like Vim's `%`, select parans and content inside + +`` - match parens backwards (direction) + +`M` - get a selection from current cursor to next block end or rather extend to next parans included + +`` - extend to prev parens + +`f` - select to next char included (`` - prev char) + +`C` - copy selection on next lines (`` - previus lines) + +`` - copy identation + +`Z` - save selection in mark register `^` + +`z` - restore selections stored in register `^` + +`` - combine selection from register, confirm by hitting `a` for example + +`` - combine selections to register + +`` - remove all selections except main + +`` - remove main selection + +`_` - trim selections + +### Text manipulation + +`y` - yank + +`p` - paste after (`P` before) + +`` - paste every yanked selection after selected text, keep new (pasted) selection (`` before) + +`d` - delete + +`i` - instert + +`c` - delete and inserst + +`R` - replace selection with the content of the register + +`` - replace selected text with yanked text + +`u` - undo + +`U` - redo + +`` - join with next line (`` include spaces) + +`backtick` - convert to lower-case (`` - swap case) + +`~` - convert to upper-case + +`o` - insert on new line below (`O` above) + +`` - add new line below (`` above) + +## Advanced + +`)` - loop through selections (`(` backward) + +`` - rotate splitted selection clock-wise (`` counter clock-wise) + +`"m*` - save smart search (*) pattern to register `m` (`_` is a null register) + +`` - instert into the buffer value stored in the register (`%` - buffer name, etc.); numbers correspond to submatches, like `(\w+)` + +`.` - repeat last insert session + +`` - repeat last selection (for example `]p`); like Vim' `;` + +`Q` - start recording macro until `Esc` is hit + +`q` - replay the macro (saved in the `@` register) + +### Shell + +`|` - modify selections by passind to the shell command which will transform them and write back (`` will ignore results) + +`!` - insert a result of the shell cmd before selections (`` - append result) + +`$` - apply predicate to selections (0 return value is considered a success); filiter them + +### Tips + +`|fold -w80` - wrap selection + +`!date` - insert date before selection + +`$xsel -bi` - copy selection to clipboard. `-bi` stands for `--clipboard --input` + +`%|diff -u % -` - compare current buffer contents with the version saved to disk + +`` insert mode -> normal mode (for one cmd) -> back, preseving selections/bindings, modes can be deeply nested (hit Esc more than once if needed) + +The couple `u` and `U` lets you move backward and forward in the last branch while their alternative versions `` `` follow absolute history id which may be located somewhere else in the history tree.