minor changes here and there, working on a zettlekasten implementation.
This commit is contained in:
parent
50cbee95d4
commit
37dd285600
@ -130,15 +130,6 @@ cmd mkfile_and_edit ${{
|
||||
eval $EDITOR $ans
|
||||
}}
|
||||
|
||||
cmd zk_edit ${{
|
||||
eval zk edit --interactive --sort modified-
|
||||
}}
|
||||
|
||||
cmd zk_edit_file ${{
|
||||
name=$(echo "$f" | sed 's/\..*//' | sed 's/.*\///')
|
||||
eval zk edit -i -m "$name"
|
||||
}}
|
||||
|
||||
cmd setbg "$1"
|
||||
cmd bulkrename $vidir
|
||||
|
||||
@ -166,7 +157,7 @@ map t
|
||||
map tt trash
|
||||
map tr restore_trash
|
||||
|
||||
map tmo $tmux-sessioniser $PWD
|
||||
map T $tmux-sessioniser $PWD
|
||||
|
||||
map m
|
||||
map md mkdir
|
||||
@ -188,6 +179,11 @@ map gcs cd ~/.config/shell
|
||||
map gcz cd ~/.config/zsh
|
||||
map gcx1 cd ~/.config/x11
|
||||
map gw cd ~/work
|
||||
map gNN cd ~/notes/zk/
|
||||
map gNi cd ~/notes/zk/inbox/
|
||||
map gNw cd ~/notes/zk/work/
|
||||
map gNn cd ~/notes/zk/notes/
|
||||
map gNj cd ~/notes/zk/journal/
|
||||
|
||||
map A rename # at the very end
|
||||
map c push A<c-u> # new rename
|
||||
@ -205,8 +201,5 @@ map W $setsid -f $TERMINAL >/dev/null 2>&1
|
||||
|
||||
map Y $printf "%s" "$fx" | xclip -selection clipboard
|
||||
|
||||
map zke zk_edit
|
||||
map zkf zk_edit_file
|
||||
|
||||
# Source Bookmarks
|
||||
# source "~/.config/lf/shortcutrc"
|
||||
|
||||
@ -35,7 +35,8 @@ map("n", "<C-y>", '"+y', opts)
|
||||
map("n", "<C-p>", '"+p', opts)
|
||||
|
||||
-- Save
|
||||
map("n", "<C-s>", ":w<CR>", opts)
|
||||
map("n", "<C-s>", "<ESC>:w<CR>", opts)
|
||||
map("i", "<C-s>", "<ESC>:w<CR>", opts)
|
||||
|
||||
-- Switch between buffers
|
||||
map("n", "<S-l>", ":bnext<CR>", opts)
|
||||
@ -48,9 +49,6 @@ map("n", "<C-d>", "<C-d>zz", opts)
|
||||
-- Easy exit insert mode
|
||||
map("i", "jk", "<ESC>", opts)
|
||||
|
||||
-- Save
|
||||
map("i", "<C-s>", "<ESC>:w<CR>a", opts)
|
||||
|
||||
-- Indenting
|
||||
map("v", "<", "<gv", opts)
|
||||
map("v", ">", ">gv", opts)
|
||||
@ -59,4 +57,5 @@ map("v", ">", ">gv", opts)
|
||||
map("v", "<C-j>", ":m .+1<CR>==<ESC>V", opts)
|
||||
map("v", "<C-k>", ":m .-2<CR>==<ESC>V", opts)
|
||||
|
||||
-- Don't have a terminal implemented yet but when I do...
|
||||
map("t", "<esc><esc>", "<c-\\><c-n>", { desc = "Enter Normal Mode" })
|
||||
|
||||
@ -8,57 +8,57 @@
|
||||
|
||||
# sudo not required for some system commands
|
||||
for command in mount umount pacman su shutdown poweroff reboot ; do
|
||||
alias $command="sudo $command"
|
||||
alias $command="sudo $command"
|
||||
done; unset command
|
||||
|
||||
# Verbosity and settings that you pretty much just always are going to want.
|
||||
alias \
|
||||
cp="cp -iv" \
|
||||
mv="mv -iv" \
|
||||
rm="rm -vI" \
|
||||
bc="bc -ql" \
|
||||
mkd="mkdir -pv" \
|
||||
ffmpeg="ffmpeg -hide_banner"
|
||||
cp="cp -iv" \
|
||||
mv="mv -iv" \
|
||||
rm="rm -vI" \
|
||||
bc="bc -ql" \
|
||||
mkd="mkdir -pv" \
|
||||
ffmpeg="ffmpeg -hide_banner"
|
||||
|
||||
# Colorize commands when possible.
|
||||
alias \
|
||||
ls="ls -hN --color=auto --group-directories-first" \
|
||||
grep="grep --color=auto" \
|
||||
diff="diff --color=auto" \
|
||||
ccat="highlight --out-format=ansi" \
|
||||
ip="ip -color=auto"
|
||||
ls="ls -hN --color=auto --group-directories-first" \
|
||||
grep="grep --color=auto" \
|
||||
diff="diff --color=auto" \
|
||||
ccat="highlight --out-format=ansi" \
|
||||
ip="ip -color=auto"
|
||||
|
||||
# These common commands are just too long! Abbreviate them.
|
||||
alias \
|
||||
ka="killall" \
|
||||
g="git" \
|
||||
e="$EDITOR" \
|
||||
v="$EDITOR" \
|
||||
z="zathura"
|
||||
ka="killall" \
|
||||
g="git" \
|
||||
e="$EDITOR" \
|
||||
v="$EDITOR" \
|
||||
z="zathura"
|
||||
|
||||
alias \
|
||||
lf="lfub" \
|
||||
magit="nvim -c MagitOnly" \
|
||||
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \
|
||||
lf="lfub" \
|
||||
magit="nvim -c MagitOnly" \
|
||||
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \
|
||||
|
||||
# Alias dotfiles/config related commands
|
||||
# Alias dotfiles/config related commands
|
||||
alias \
|
||||
config="/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME" \
|
||||
ccam="config commit -am" \
|
||||
cpush="config push" \
|
||||
cpull="config pull" \
|
||||
cst="config status" \
|
||||
config="/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME" \
|
||||
ccam="config commit -am" \
|
||||
cpush="config push" \
|
||||
cpull="config pull" \
|
||||
cst="config status" \
|
||||
|
||||
# Alias tmux commands for ease of use
|
||||
# Alias tmux commands for ease of use
|
||||
alias \
|
||||
tmn="tmux new" \
|
||||
tma="tmux-worker" \
|
||||
tmn="tmux new" \
|
||||
tma="tmux-worker" \
|
||||
tms="tmux-sessioniser" \
|
||||
tm.="tmux-sessioniser ."
|
||||
|
||||
# Alias some extra things for ease of use
|
||||
alias \
|
||||
myip="curl api.ipify.org" \
|
||||
cls="clear" \
|
||||
c="clear" \
|
||||
myip="curl api.ipify.org" \
|
||||
cls="clear" \
|
||||
c="clear" \
|
||||
cdc="cd && clear"
|
||||
|
||||
@ -87,10 +87,16 @@ lfcd() {
|
||||
fi
|
||||
}
|
||||
|
||||
# lf
|
||||
bindkey -s '^o' '^ulfcd\n'
|
||||
|
||||
# tmux sessioniser
|
||||
bindkey -s '^t' '^utms\n'
|
||||
|
||||
# zk related things
|
||||
bindkey -s '^n' '^uzk edit --interactive --sort modified-\n'
|
||||
|
||||
|
||||
if [ -f /etc/hostname ]; then
|
||||
HOST=$(cat /etc/hostname)
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user