Compare commits
2 Commits
65f8992ca1
...
e27931e626
Author | SHA1 | Date |
---|---|---|
Sage Vaillancourt | e27931e626 | |
Sage Vaillancourt | 0616f3a86e |
|
@ -13,6 +13,8 @@ nnoremap <C-K> <C-W><C-K>
|
||||||
nnoremap <C-L> <C-W><C-L>
|
nnoremap <C-L> <C-W><C-L>
|
||||||
nnoremap <C-H> <C-W><C-H>
|
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-E> <C-E><C-E>
|
nnoremap <C-E> <C-E><C-E>
|
||||||
|
|
||||||
|
|
|
@ -86,14 +86,26 @@ function ungrep {
|
||||||
echo "$output"
|
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 pods="$(kubectl get pods | grep "$1")"
|
||||||
local selection="1"
|
local selection="1"
|
||||||
if [[ "$2" != "" ]]; then
|
if [[ "$2" != "" ]]; then
|
||||||
selection="$2"
|
selection="$2"
|
||||||
fi
|
fi
|
||||||
local pod="$(echo "$pods" | awk '{print $1}' | head -n $selection | tail -n 1)"
|
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 {
|
function undelete {
|
||||||
|
|
|
@ -124,6 +124,9 @@ nnoremap dh d^
|
||||||
" <C-P> will replace text after the cursor with unnamed reg contents
|
" <C-P> will replace text after the cursor with unnamed reg contents
|
||||||
nnoremap <C-P> m`v$hp``y$
|
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
|
" Generate and display a printable version
|
||||||
nnoremap <Leader>PP :ha > ~/.vim.ps<CR>:!xdg-open ~/.vim.ps<CR>
|
nnoremap <Leader>PP :ha > ~/.vim.ps<CR>:!xdg-open ~/.vim.ps<CR>
|
||||||
vnoremap <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