add nvim plugins
Added: - flash.nvim for better movement - debugprint.nvim for insert print debug statements
This commit is contained in:
parent
d082d41624
commit
d870d23e79
7 changed files with 72 additions and 31 deletions
|
|
@ -1,55 +1,55 @@
|
|||
# SSH tunnel
|
||||
ssh-tunnel() {
|
||||
|
||||
local_port=$1 && shift
|
||||
remote_port=$1 && shift
|
||||
server=$1 && shift
|
||||
local_port=$1 && shift
|
||||
remote_port=$1 && shift
|
||||
server=$1 && shift
|
||||
|
||||
echo "Starting SSH Tunnel for $server"
|
||||
echo "Starting SSH Tunnel for $server"
|
||||
|
||||
ssh -N -L "$local_port":localhost:"$remote_port" "$server"
|
||||
ssh -N -L "$local_port":localhost:"$remote_port" "$server"
|
||||
}
|
||||
|
||||
# quick wordpress in docker
|
||||
dwps() {
|
||||
image_name="wordpress-development"
|
||||
container_build_path="$HOME/Repos/Private/docker-services/wordpress"
|
||||
original_path="$PWD"
|
||||
image_name="wordpress-development"
|
||||
container_build_path="$HOME/Repos/Private/docker-services/wordpress"
|
||||
original_path="$PWD"
|
||||
|
||||
if [[ "$(docker images -q $image_name 2> /dev/null)" == "" ]] ; then
|
||||
cd "$container_build_path"
|
||||
docker build --tag "$image_name" .
|
||||
cd "$original_path"
|
||||
fi
|
||||
if [[ "$(docker images -q $image_name 2>/dev/null)" == "" ]]; then
|
||||
cd "$container_build_path"
|
||||
docker build --tag "$image_name" .
|
||||
cd "$original_path"
|
||||
fi
|
||||
|
||||
docker run -d --rm -p 3000:80 --user 1000:1000 -v "$PWD":/var/www/html --name "$image_name" "$image_name"
|
||||
docker run -d --rm -p 3000:80 --user 1000:1000 -v "$PWD":/var/www/html --name "$image_name" "$image_name"
|
||||
}
|
||||
|
||||
## Create python venv
|
||||
pvenv() {
|
||||
[[ -n $VIRTAUL_ENV ]] && echo "Virtual enviroment already sourced" && return
|
||||
[[ -n $VIRTAUL_ENV ]] && echo "Virtual enviroment already sourced" && return
|
||||
|
||||
dir=${1:-venv}
|
||||
dir=${1:-venv}
|
||||
|
||||
[[ ! -d $dir ]] && echo "Creating virtual enviroment..." && python -m venv $dir
|
||||
[[ ! -d $dir ]] && echo "Creating virtual enviroment..." && python -m venv $dir
|
||||
|
||||
source "$dir/bin/activate"
|
||||
source "$dir/bin/activate"
|
||||
}
|
||||
|
||||
# Print bottlenecks
|
||||
profzsh() {
|
||||
shell=${1-$SHELL}
|
||||
ZPROF=true $shell -i -c exit
|
||||
shell=${1-$SHELL}
|
||||
ZPROF=true $shell -i -c exit
|
||||
}
|
||||
|
||||
# Pretty Help
|
||||
alias bathelp='bat --plain --language=help'
|
||||
help() {
|
||||
"$@" --help 2>&1 | bathelp
|
||||
"$@" --help 2>&1 | bathelp
|
||||
}
|
||||
|
||||
fzf-jq() {
|
||||
echo '' | fzf --print-query --preview="jq -r {q} <$@"
|
||||
echo '' | fzf --print-query --preview="jq -r {q} <$@"
|
||||
}
|
||||
|
||||
function ya() {
|
||||
|
|
@ -60,3 +60,9 @@ function ya() {
|
|||
fi
|
||||
rm -f -- "$tmp"
|
||||
}
|
||||
|
||||
# Zellij
|
||||
function zr() { zellij run --name "$*" -- zsh -ic "$*"; }
|
||||
function zrf() { zellij run --name "$*" --floating -- zsh -ic "$*"; }
|
||||
function ze() { zellij edit "$*"; }
|
||||
function zef() { zellij edit --floating "$*"; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue