Compare commits
8 commits
c6b61a35e4
...
1028ad1120
Author | SHA1 | Date | |
---|---|---|---|
Dmitry Voronin | 1028ad1120 | ||
Dmitry Voronin | 40b97132a7 | ||
Dmitry Voronin | fe3e84babf | ||
Dmitry Voronin | 5a490bb555 | ||
Dmitry Voronin | c78ca65672 | ||
Dmitry Voronin | 02f37e515c | ||
Dmitry Voronin | 7acb122e26 | ||
Dmitry Voronin | 59ad301d4c |
|
@ -32,7 +32,7 @@ function archive() {
|
||||||
_iterate_targets process ${targets[@]}
|
_iterate_targets process ${targets[@]}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Archive using multiple threads. Uses 50% of free RAM.
|
# Archive using multiple threads. Uses 75% of free RAM.
|
||||||
# All directories by default.
|
# All directories by default.
|
||||||
# Supports .archiveignore exclude file.
|
# Supports .archiveignore exclude file.
|
||||||
# Usage: archive_mt [DIRS]
|
# Usage: archive_mt [DIRS]
|
||||||
|
@ -54,7 +54,7 @@ function archive_mt() {
|
||||||
|
|
||||||
# Determine memory limit.
|
# Determine memory limit.
|
||||||
local mem_free=$(_mem_free)
|
local mem_free=$(_mem_free)
|
||||||
local mem_limit=$((mem_free/2))
|
local mem_limit=$((mem_free*3/4))
|
||||||
|
|
||||||
# create archive.
|
# create archive.
|
||||||
local hash=$(tar ${exclude} -c ${target} | pv -s $(/usr/bin/du -sb ${target} | awk '{print $1}') | xz -9e --threads=0 --memlimit=${mem_limit}MiB | tee ${name}.txz | sha1sum | cut -d\ -f1)
|
local hash=$(tar ${exclude} -c ${target} | pv -s $(/usr/bin/du -sb ${target} | awk '{print $1}') | xz -9e --threads=0 --memlimit=${mem_limit}MiB | tee ${name}.txz | sha1sum | cut -d\ -f1)
|
||||||
|
|
|
@ -1,26 +1,36 @@
|
||||||
# CD (back) to directory.
|
# CD (back to) directory.
|
||||||
# Finds first directory that matches the input (case-insensitive).
|
# Goes to the exact-match dir first. If no exact match found, it finds first directory that contains the input (case-insensitive).
|
||||||
# Usage: cdd <DIR>
|
# Usage: cdd <DIR>
|
||||||
function cdd() {
|
function cdd() {
|
||||||
local target="${1}"
|
local target="${1}"
|
||||||
local array
|
|
||||||
|
if [[ "${target}" = "" ]]; then
|
||||||
|
help cdd
|
||||||
|
return 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
local array=($(_cdd_directories))
|
||||||
local result
|
local result
|
||||||
IFS='/' read -r -a array <<< "${PWD}"
|
|
||||||
array=("${array[@]:1}")
|
|
||||||
|
|
||||||
# Make search case-insensitive.
|
# Check for exact match ELSE look for containing.
|
||||||
shopt -s nocasematch
|
if _contains ${target} ${array[@]}; then
|
||||||
|
local current="${PWD%/*}"
|
||||||
|
result="${current%\/$target\/*}/${target}"
|
||||||
|
else
|
||||||
|
# Make search case-insensitive.
|
||||||
|
shopt -s nocasematch
|
||||||
|
|
||||||
# Find desired dir.
|
# Find dir name that contains input.
|
||||||
local found=1
|
local found=1
|
||||||
for (( idx=${#array[@]}-2 ; idx>=0 ; idx-- )); do
|
for (( idx=${#array[@]}-1 ; idx>=0 ; idx-- )); do
|
||||||
dir="${array[idx]}"
|
dir="${array[idx]}"
|
||||||
[[ "${dir}" =~ "${target}" ]] && found=0
|
[[ "${dir}" =~ "${target}" ]] && found=0
|
||||||
[[ ${found} = 0 ]] && result="/${dir}${result}"
|
[[ ${found} = 0 ]] && result="/${dir}${result}"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Clean-up???
|
# Clean-up???
|
||||||
shopt -u nocasematch
|
shopt -u nocasematch
|
||||||
|
fi
|
||||||
|
|
||||||
# Go there!
|
# Go there!
|
||||||
if [[ "${result}" != "" ]]; then
|
if [[ "${result}" != "" ]]; then
|
||||||
|
@ -31,12 +41,19 @@ function cdd() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
_cdd_directories() {
|
# Get list of all parent dirs.
|
||||||
|
function _cdd_directories() {
|
||||||
local array
|
local array
|
||||||
IFS='/' read -r -a array <<< "${PWD}"
|
IFS='/' read -r -a array <<< "${PWD}"
|
||||||
array=("${array[@]:1}")
|
array=("${array[@]:1}")
|
||||||
unset array[-1]
|
unset array[-1]
|
||||||
_autocomplete_first "${array[@]}"
|
printf "%s\n" "${array[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
complete -o nosort -o filenames -F _cdd_directories cdd
|
function _comp_cdd() {
|
||||||
|
local IFS=$'\n'
|
||||||
|
local dirs=($(_cdd_directories))
|
||||||
|
_autocomplete_first ${dirs[@]}
|
||||||
|
}
|
||||||
|
|
||||||
|
complete -o nosort -o filenames -F _comp_cdd cdd
|
||||||
|
|
15
.config/bash/module/Markdown.sh
Normal file
15
.config/bash/module/Markdown.sh
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# Render markdown in browser using Gitea API. Because I want consistency with Gitea web render.
|
||||||
|
# Works only inside LAN.
|
||||||
|
# Usage: markdown_render <FILE.md>
|
||||||
|
function markdown_render() {
|
||||||
|
local IFS=$'\n'
|
||||||
|
local file="${1}"
|
||||||
|
local render="markdown_render.html"
|
||||||
|
|
||||||
|
if [[ "${file}" = "" ]]; then
|
||||||
|
help markdown_render
|
||||||
|
return 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl -X POST https://git.voronind.com/markdown -d "$(cat ${file})" > "${render}" && o "${render}" && sleep 2 && rm "${render}"
|
||||||
|
}
|
|
@ -124,7 +124,7 @@ function parse_titlecase() {
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${minors[@]}" =~ $(echo ${part} | sed -e "s/[${_PARSE_SPLIT_CHARS}]//g") ]]; then
|
if _contains $(echo ${part} | sed -e "s/[${_PARSE_SPLIT_CHARS}]//g") ${minors[@]}; then
|
||||||
echo -n "${part}"
|
echo -n "${part}"
|
||||||
else
|
else
|
||||||
echo -n "${part^}"
|
echo -n "${part^}"
|
||||||
|
|
|
@ -28,7 +28,7 @@ function tl() {
|
||||||
tmux list-sessions
|
tmux list-sessions
|
||||||
}
|
}
|
||||||
|
|
||||||
# Rename current session. Uses current dir name by default.
|
# Assign name to session. Uses current dir name by default.
|
||||||
# Usage: tns [NAME]
|
# Usage: tns [NAME]
|
||||||
function tns() {
|
function tns() {
|
||||||
local name="${1}"
|
local name="${1}"
|
||||||
|
@ -39,8 +39,8 @@ function tns() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Assign name to window. Uses current dir name by default.
|
# Assign name to window. Uses current dir name by default.
|
||||||
# Usage: tn [NAME]
|
# Usage: tnw [NAME]
|
||||||
function tn() {
|
function tnw() {
|
||||||
local name="${1}"
|
local name="${1}"
|
||||||
|
|
||||||
[[ "${name}" = "" ]] && name="${PWD##*/}"
|
[[ "${name}" = "" ]] && name="${PWD##*/}"
|
||||||
|
|
|
@ -97,3 +97,22 @@ function _debug() {
|
||||||
function _info() {
|
function _info() {
|
||||||
>&2 echo -e "${color_bwhite}${*}${color_default}"
|
>&2 echo -e "${color_bwhite}${*}${color_default}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Check if array contains an element (strict).
|
||||||
|
# Usage: _contains <ELEMENT> <ARRAY>
|
||||||
|
function _contains() {
|
||||||
|
local IFS=$'\n'
|
||||||
|
local target="${1}"
|
||||||
|
local array="${@:2}"
|
||||||
|
|
||||||
|
if [[ "${target}" = "" ]] || [[ "${array}" = "" ]]; then
|
||||||
|
help _contains
|
||||||
|
return 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
for item in ${array[@]}; do
|
||||||
|
[[ "${item}" = "${target}" ]] && return 0
|
||||||
|
done
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
|
@ -1,15 +1,21 @@
|
||||||
require('key/Rekey')
|
require('key/Rekey')
|
||||||
|
|
||||||
rekey_normal('<Leader>.', '@:') -- repeat command.
|
-- Write all we can and exit. Created this to drop non-writable stuff when piping to nvim.
|
||||||
rekey_visual('<Leader>.', '@:') -- repeat command.
|
function bye()
|
||||||
rekey_normal('zz', '<cmd>wa<cr>') -- save all files.
|
pcall(vim.cmd, "wa")
|
||||||
rekey_normal('<Leader>z', '<cmd>wqa<cr>') -- save & quit all.
|
vim.cmd[[qa!]]
|
||||||
rekey_normal('<Leader>v', 'v') -- visual select (duplicate).
|
end
|
||||||
rekey_normal('gh', '0') -- go left.
|
|
||||||
rekey_normal('gl', '$') -- go right.
|
rekey_normal('<Leader>.', '@:') -- repeat command.
|
||||||
rekey_normal('gj', 'G') -- go bottom.
|
rekey_visual('<Leader>.', '@:') -- repeat command.
|
||||||
rekey_normal('gk', 'gg') -- go top.
|
rekey_normal('zz', '<cmd>wa<cr>') -- save all files.
|
||||||
rekey_normal('U', '<C-r>') -- redo.
|
rekey_normal('<Leader>z', '<cmd>lua bye()<cr>') -- save & quit all.
|
||||||
|
rekey_normal('<Leader>v', 'v') -- visual select (duplicate).
|
||||||
|
rekey_normal('gh', '0') -- go left.
|
||||||
|
rekey_normal('gl', '$') -- go right.
|
||||||
|
rekey_normal('gj', 'G') -- go bottom.
|
||||||
|
rekey_normal('gk', 'gg') -- go top.
|
||||||
|
rekey_normal('U', '<C-r>') -- redo.
|
||||||
|
|
||||||
rekey_normal(';', ':') -- remap ; to :.
|
rekey_normal(';', ':') -- remap ; to :.
|
||||||
rekey_visual(';', ':') -- remap ; to :.
|
rekey_visual(';', ':') -- remap ; to :.
|
||||||
|
|
|
@ -1,63 +1,59 @@
|
||||||
require("key/Rekey")
|
require("key/Rekey")
|
||||||
|
|
||||||
-- wraps.
|
-- wraps.
|
||||||
rekey_visual("mwx", "s<delete><backspace><esc>p") -- unwrap once (select only stuff inside).
|
rekey_visual("<Leader>mwx", "s<delete><backspace><esc>p") -- unwrap once (select only stuff inside).
|
||||||
rekey_visual("mw\"", "s\"\"<esc>P") -- wrap in "".
|
rekey_visual("<Leader>mw\"", "s\"\"<esc>P") -- wrap in "".
|
||||||
rekey_visual("mw3\"", "s\"\"\"\"\"\"<esc>hhP") -- wrap in 3x "".
|
rekey_visual("<Leader>mw3\"", "s\"\"\"\"\"\"<esc>hhP") -- wrap in 3x "".
|
||||||
rekey_visual("mw'", "s''<esc>P") -- wrap in "".
|
rekey_visual("<Leader>mw'", "s''<esc>P") -- wrap in "".
|
||||||
rekey_visual("mw(", "s()<esc>P") -- wrap in ().
|
rekey_visual("<Leader>mw(", "s()<esc>P") -- wrap in ().
|
||||||
rekey_visual("mw)", "s()<esc>P") -- wrap in ().
|
rekey_visual("<Leader>mw)", "s()<esc>P") -- wrap in ().
|
||||||
rekey_visual("mw{", "s{}<esc>P") -- wrap in {}.
|
rekey_visual("<Leader>mw{", "s{}<esc>P") -- wrap in {}.
|
||||||
rekey_visual("mw}", "s{}<esc>P") -- wrap in {}.
|
rekey_visual("<Leader>mw}", "s{}<esc>P") -- wrap in {}.
|
||||||
rekey_visual("mw<", "s<><esc>P") -- wrap in {}.
|
rekey_visual("<Leader>mw<", "s<><esc>P") -- wrap in {}.
|
||||||
rekey_visual("mw>", "s<><esc>P") -- wrap in {}.
|
rekey_visual("<Leader>mw>", "s<><esc>P") -- wrap in {}.
|
||||||
rekey_visual("mw[", "s[]<esc>P") -- wrap in [].
|
rekey_visual("<Leader>mw[", "s[]<esc>P") -- wrap in [].
|
||||||
rekey_visual("mw]", "s[]<esc>P") -- wrap in [].
|
rekey_visual("<Leader>mw]", "s[]<esc>P") -- wrap in [].
|
||||||
rekey_visual("mw`", "s``<esc>P") -- wrap in ``.
|
rekey_visual("<Leader>mw`", "s``<esc>P") -- wrap in ``.
|
||||||
rekey_visual("mw3`", "s``````<esc>hhP") -- wrap in 3x ``.
|
rekey_visual("<Leader>mw3`", "s``````<esc>hhP") -- wrap in 3x ``.
|
||||||
rekey_visual("mw*", "s**<esc>P") -- wrap in **.
|
rekey_visual("<Leader>mw*", "s**<esc>P") -- wrap in **.
|
||||||
rekey_visual("mw2*", "s****<esc>hP") -- wrap in 2x **.
|
rekey_visual("<Leader>mw2*", "s****<esc>hP") -- wrap in 2x **.
|
||||||
rekey_visual("mw3*", "s******<esc>hhP") -- wrap in 3x **.
|
rekey_visual("<Leader>mw3*", "s******<esc>hhP") -- wrap in 3x **.
|
||||||
rekey_visual("mw ", "s <esc>P") -- wrap in spaces.
|
rekey_visual("<Leader>mw ", "s <esc>P") -- wrap in spaces.
|
||||||
|
|
||||||
-- rewraps. <delete><backspace>
|
-- rewraps. <delete><backspace>
|
||||||
rekey_visual("mwrx", "s<delete><backspace><delete><backspace><esc>p") -- unwrap once (select only stuff inside).
|
rekey_visual("<Leader>mwrx", "s<delete><backspace><delete><backspace><esc>p") -- unwrap once (select only stuff inside).
|
||||||
rekey_visual("mwr\"", "s<delete><backspace>\"\"<esc>P") -- wrap in "".
|
rekey_visual("<Leader>mwr\"", "s<delete><backspace>\"\"<esc>P") -- wrap in "".
|
||||||
rekey_visual("mwr3\"", "s<delete><backspace>\"\"\"\"\"\"<esc>hhP") -- wrap in 3x "".
|
rekey_visual("<Leader>mwr3\"", "s<delete><backspace>\"\"\"\"\"\"<esc>hhP") -- wrap in 3x "".
|
||||||
rekey_visual("mwr'", "s<delete><backspace>''<esc>P") -- wrap in "".
|
rekey_visual("<Leader>mwr'", "s<delete><backspace>''<esc>P") -- wrap in "".
|
||||||
rekey_visual("mwr(", "s<delete><backspace>()<esc>P") -- wrap in ().
|
rekey_visual("<Leader>mwr(", "s<delete><backspace>()<esc>P") -- wrap in ().
|
||||||
rekey_visual("mwr)", "s<delete><backspace>()<esc>P") -- wrap in ().
|
rekey_visual("<Leader>mwr)", "s<delete><backspace>()<esc>P") -- wrap in ().
|
||||||
rekey_visual("mwr{", "s<delete><backspace>{}<esc>P") -- wrap in {}.
|
rekey_visual("<Leader>mwr{", "s<delete><backspace>{}<esc>P") -- wrap in {}.
|
||||||
rekey_visual("mwr}", "s<delete><backspace>{}<esc>P") -- wrap in {}.
|
rekey_visual("<Leader>mwr}", "s<delete><backspace>{}<esc>P") -- wrap in {}.
|
||||||
rekey_visual("mwr<", "s<delete><backspace><><esc>P") -- wrap in {}.
|
rekey_visual("<Leader>mwr<", "s<delete><backspace><><esc>P") -- wrap in {}.
|
||||||
rekey_visual("mwr>", "s<delete><backspace><><esc>P") -- wrap in {}.
|
rekey_visual("<Leader>mwr>", "s<delete><backspace><><esc>P") -- wrap in {}.
|
||||||
rekey_visual("mwr[", "s<delete><backspace>[]<esc>P") -- wrap in [].
|
rekey_visual("<Leader>mwr[", "s<delete><backspace>[]<esc>P") -- wrap in [].
|
||||||
rekey_visual("mwr]", "s<delete><backspace>[]<esc>P") -- wrap in [].
|
rekey_visual("<Leader>mwr]", "s<delete><backspace>[]<esc>P") -- wrap in [].
|
||||||
rekey_visual("mwr`", "s<delete><backspace>``<esc>P") -- wrap in ``.
|
rekey_visual("<Leader>mwr`", "s<delete><backspace>``<esc>P") -- wrap in ``.
|
||||||
rekey_visual("mwr3`", "s<delete><backspace>``````<esc>hhP") -- wrap in 3x ``.
|
rekey_visual("<Leader>mwr3`", "s<delete><backspace>``````<esc>hhP") -- wrap in 3x ``.
|
||||||
rekey_visual("mwr*", "s<delete><backspace>**<esc>P") -- wrap in **.
|
rekey_visual("<Leader>mwr*", "s<delete><backspace>**<esc>P") -- wrap in **.
|
||||||
rekey_visual("mwr2*", "s<delete><backspace>****<esc>hP") -- wrap in 2x **.
|
rekey_visual("<Leader>mwr2*", "s<delete><backspace>****<esc>hP") -- wrap in 2x **.
|
||||||
rekey_visual("mwr3*", "s<delete><backspace>******<esc>hhP") -- wrap in 3x **.
|
rekey_visual("<Leader>mwr3*", "s<delete><backspace>******<esc>hhP") -- wrap in 3x **.
|
||||||
rekey_visual("mwr ", "s<delete><backspace> <esc>P") -- wrap in spaces.
|
rekey_visual("<Leader>mwr ", "s<delete><backspace> <esc>P") -- wrap in spaces.
|
||||||
|
|
||||||
-- markdown.
|
-- markdown.
|
||||||
rekey_normal("mmx", ":s/- \\[ \\]/- \\[x\\]<C-l>/<cr>") -- mark checkbox.
|
rekey_normal("<Leader>mmx", ":s/- \\[ \\]/- \\[x\\]<C-l>/<cr>") -- mark checkbox.
|
||||||
rekey_normal("mm ", ":s/- \\[x\\]/- \\[ \\]<C-l>/<cr>") -- unmark checkbox.
|
rekey_normal("<Leader>mm ", ":s/- \\[x\\]/- \\[ \\]<C-l>/<cr>") -- unmark checkbox.
|
||||||
rekey_visual("mmx", ":s/- \\[ \\]/- \\[x\\]<C-l>/<cr>") -- mark checkbox (multiline select),
|
rekey_visual("<Leader>mmx", ":s/- \\[ \\]/- \\[x\\]<C-l>/<cr>") -- mark checkbox (multiline select),
|
||||||
rekey_visual("mm ", ":s/- \\[x\\]/- \\[ \\]<C-l>/<cr>") -- unmark checkbox (multiline select).
|
rekey_visual("<Leader>mm ", ":s/- \\[x\\]/- \\[ \\]<C-l>/<cr>") -- unmark checkbox (multiline select).
|
||||||
rekey_normal("mmp", "I <esc>") -- insert paragraph (indent).
|
rekey_normal("<Leader>mmp", "I <esc>") -- insert paragraph (indent).
|
||||||
rekey_visual("mmb", "s****<esc>hP") -- make bold.
|
rekey_visual("<Leader>mmb", "s****<esc>hP") -- make bold.
|
||||||
rekey_visual("mmi", "s**<esc>P") -- make italic.
|
rekey_visual("<Leader>mmi", "s**<esc>P") -- make italic.
|
||||||
rekey_visual("mms", "s~~~~<esc>hP") -- make strikethrough.
|
rekey_visual("<Leader>mms", "s~~~~<esc>hP") -- make strikethrough.
|
||||||
rekey_visual("mmr", "s``<esc>P") -- wrap in `` (reference).
|
rekey_visual("<Leader>mmr", "s``<esc>P") -- wrap in `` (reference).
|
||||||
rekey_visual("mmc", "s``````<esc>hhPa<cr><cr><esc><up>") -- wrap in 3x `` (code).
|
rekey_visual("<Leader>mmc", "s``````<esc>hhPa<cr><cr><esc><up>") -- wrap in 3x `` (code).
|
||||||
-- rekey_visual("mm>", ":s/^")
|
|
||||||
-- rekey_visual("mm<", "")
|
|
||||||
-- rekey_normal("mm>", "")
|
|
||||||
-- rekey_normal("mm<", "")
|
|
||||||
|
|
||||||
-- increment.
|
-- increment.
|
||||||
rekey_normal("mi", "<C-a>yyup<C-o>j") -- copy line and increment number under cursor.
|
rekey_normal("<Leader>mi", "<C-a>yyup<C-o>j") -- copy line and increment number under cursor.
|
||||||
|
|
||||||
-- select.
|
-- select.
|
||||||
rekey_normal("ma", "ggVG") -- select all.
|
rekey_normal("<Leader>ma", "ggVG") -- select all.
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
require('key/Rekey')
|
require("key/Rekey")
|
||||||
|
|
||||||
rekey_normal('<Leader>0', '<cmd>WhichKey<cr>')
|
rekey_normal("?", "<cmd>WhichKey<cr>")
|
||||||
|
|
14
.doc/Bash.md
14
.doc/Bash.md
|
@ -21,7 +21,7 @@ Command|Description
|
||||||
Command|Description
|
Command|Description
|
||||||
---|---
|
---|---
|
||||||
`archive [DIRS]`|Archive directories. All directories by default. Supports .archiveignore exclude file.
|
`archive [DIRS]`|Archive directories. All directories by default. Supports .archiveignore exclude file.
|
||||||
`archive_mt [DIRS]`|Archive using multiple threads. Uses 50% of free RAM. All directories by default. Supports .archiveignore exclude file.
|
`archive_mt [DIRS]`|Archive using multiple threads. Uses 75% of free RAM. All directories by default. Supports .archiveignore exclude file.
|
||||||
`archive_fast [DIRS]`|Archive directories with fast compression. All directories by default. Supports .archiveignore exclude file.
|
`archive_fast [DIRS]`|Archive directories with fast compression. All directories by default. Supports .archiveignore exclude file.
|
||||||
`archive_check [FILES]`|Check archives integrity. Checks all archives by default.
|
`archive_check [FILES]`|Check archives integrity. Checks all archives by default.
|
||||||
`archive_prune [NAME] [VERSIONS]`|Delete old versions of an archive. All archives with 1 version by default.
|
`archive_prune [NAME] [VERSIONS]`|Delete old versions of an archive. All archives with 1 version by default.
|
||||||
|
@ -51,7 +51,7 @@ Command|Description
|
||||||
|
|
||||||
Command|Description
|
Command|Description
|
||||||
---|---
|
---|---
|
||||||
`cdd <DIR>`|CD (back) to directory. Finds first directory that matches the input (case-insensitive).
|
`cdd <DIR>`|CD (back to) directory. Goes to the exact-match dir first. If no exact match found, it finds first directory that contains the input (case-insensitive).
|
||||||
|
|
||||||
## Checksum.
|
## Checksum.
|
||||||
|
|
||||||
|
@ -220,6 +220,12 @@ Command|Description
|
||||||
`la [DIRS]`|List all files in dirs, incl. hidden files. Current dir by default.
|
`la [DIRS]`|List all files in dirs, incl. hidden files. Current dir by default.
|
||||||
`lla [DIRS]`|List all files in dirs, incl. hidden files, sorted by mtime. Current dir by default.
|
`lla [DIRS]`|List all files in dirs, incl. hidden files, sorted by mtime. Current dir by default.
|
||||||
|
|
||||||
|
## Markdown.
|
||||||
|
|
||||||
|
Command|Description
|
||||||
|
---|---
|
||||||
|
`markdown_render <FILE.md>`|Render markdown in browser using Gitea API. Because I want consistency with Gitea web render. Works only inside LAN.
|
||||||
|
|
||||||
## Name.
|
## Name.
|
||||||
|
|
||||||
Command|Description
|
Command|Description
|
||||||
|
@ -339,8 +345,8 @@ Command|Description
|
||||||
`td`|Detach from running session.
|
`td`|Detach from running session.
|
||||||
`tda`|Detach all other tmux clients.
|
`tda`|Detach all other tmux clients.
|
||||||
`tl`|List running sessions.
|
`tl`|List running sessions.
|
||||||
`tns [NAME]`|Rename current session. Uses current dir name by default.
|
`tns [NAME]`|Assign name to session. Uses current dir name by default.
|
||||||
`tn [NAME]`|Assign name to window. Uses current dir name by default.
|
`tnw [NAME]`|Assign name to window. Uses current dir name by default.
|
||||||
`tk [NAME]`|Kill specified session. By default it kills `main` session.
|
`tk [NAME]`|Kill specified session. By default it kills `main` session.
|
||||||
`tka`|Kill all sessions.
|
`tka`|Kill all sessions.
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,8 @@ Key|Action
|
||||||
`Super+j`|None.
|
`Super+j`|None.
|
||||||
`Super+k`|None.
|
`Super+k`|None.
|
||||||
`Super+l`|None.
|
`Super+l`|None.
|
||||||
|
`Super+p`|None.
|
||||||
|
`Super+n`|None.
|
||||||
|
|
||||||
## Tmux.
|
## Tmux.
|
||||||
|
|
||||||
|
@ -57,6 +59,8 @@ Key|Action
|
||||||
`Meta+j`|Resize split to the down.
|
`Meta+j`|Resize split to the down.
|
||||||
`Meta+k`|Resize split to the up.
|
`Meta+k`|Resize split to the up.
|
||||||
`Meta+l`|Resize split to the right.
|
`Meta+l`|Resize split to the right.
|
||||||
|
`Meta+p`|Scroll up.
|
||||||
|
`Meta+n`|Scroll down.
|
||||||
|
|
||||||
## Nvim.
|
## Nvim.
|
||||||
|
|
||||||
|
@ -83,5 +87,7 @@ Key|Action
|
||||||
`Space+j`|Resize split to the down.
|
`Space+j`|Resize split to the down.
|
||||||
`Space+k`|Resize split to the up.
|
`Space+k`|Resize split to the up.
|
||||||
`Space+l`|Resize split to the right.
|
`Space+l`|Resize split to the right.
|
||||||
|
`Space+p`|None.
|
||||||
|
`Space+n`|None.
|
||||||
|
|
||||||
More info in [Nvim doc.](Nvim.md)
|
More info in [Nvim doc.](Nvim.md)
|
||||||
|
|
Reference in a new issue