Merge branch 'main' of https://git.sagev.space/sage/dotfiles
This commit is contained in:
commit
7699de1ec9
|
@ -13,8 +13,10 @@ nnoremap <C-K> <C-W><C-K>
|
|||
nnoremap <C-L> <C-W><C-L>
|
||||
nnoremap <C-H> <C-W><C-H>
|
||||
|
||||
nnoremap vv vi
|
||||
|
||||
nnoremap <C-E> <C-E><C-E>
|
||||
nnoremap <C-E> <C-E><C-E>
|
||||
nnoremap <C-Y> <C-Y><C-Y>
|
||||
|
||||
nnoremap dK <Esc>kdd
|
||||
nnoremap dJ <Esc>jdd
|
||||
|
|
|
@ -123,14 +123,26 @@ function ungrep {
|
|||
echo "$output"
|
||||
}
|
||||
|
||||
function kubelog {
|
||||
function pwgen {
|
||||
echo "$@ $(openssl rand -base64 64 | tr -d '012456789+/=\n')"
|
||||
}
|
||||
|
||||
function kube-pod-name {
|
||||
local pods="$(kubectl get pods | grep "$1")"
|
||||
local selection="1"
|
||||
if [[ "$2" != "" ]]; then
|
||||
selection="$2"
|
||||
fi
|
||||
local pod="$(echo "$pods" | awk '{print $1}' | head -n $selection | tail -n 1)"
|
||||
kubectl logs -f "$pod"
|
||||
echo "$pod"
|
||||
}
|
||||
|
||||
function kubelog {
|
||||
kubectl logs -f "$(kube-pod-name $@)"
|
||||
}
|
||||
|
||||
function kubetty {
|
||||
kubectl exec "$(kube-pod-name $@)" -i -t -- bash
|
||||
}
|
||||
|
||||
function undelete {
|
||||
|
@ -276,6 +288,8 @@ alias systemctl="sudo systemctl"
|
|||
alias python="python3"
|
||||
alias py="python3"
|
||||
|
||||
alias g="git"
|
||||
|
||||
# Use `grubdate` to update grub
|
||||
alias grubdate="sudo update-grub"
|
||||
|
||||
|
|
|
@ -124,6 +124,9 @@ nnoremap dh d^
|
|||
" <C-P> will replace text after the cursor with unnamed reg contents
|
||||
nnoremap <C-P> m`v$hp``y$
|
||||
|
||||
nnoremap <Leader>jq ggVG:.!cat % <Bar> jq<CR>
|
||||
nnoremap <Leader><Leader> :w<CR>ggVG:.!cat % <Bar>
|
||||
|
||||
" Generate and display a printable version
|
||||
nnoremap <Leader>PP :ha > ~/.vim.ps<CR>:!xdg-open ~/.vim.ps<CR>
|
||||
vnoremap <Leader>PP :ha > ~/.vim.ps<CR>:!xdg-open ~/.vim.ps<CR>
|
||||
|
|
Loading…
Reference in New Issue