From cba68be4f36e9a1d34bc7a2d88ceda7a08ea0ddd Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Fri, 13 May 2022 13:47:14 +0200 Subject: update --- .vimrc | 25 ++++++++++++++++++++++--- bin/gauth | 4 ++-- bin/start_godoc | 2 +- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/.vimrc b/.vimrc index 8faef1d..9a12605 100644 --- a/.vimrc +++ b/.vimrc @@ -1,7 +1,9 @@ " General vim defaults " set background= -set t_te= t_ti= ls=1 ruler +"set t_te= t_ti= +set ls=1 ruler set ai ts=4 sw=4 noet +set mouse=a syntax off filetype on filetype plugin on @@ -40,7 +42,7 @@ autocmd FileType go nmap p :cprevious autocmd FileType go nmap a :cclose " autocmd BufNewFile,BufRead *.go setlocal noexpandtab tabstop=4 shiftwidth=4 -let g:netrw_browsex_viewer = "open" +let g:netrw_browsex_viewer = "xdg-open" let g:netrw_gx = "" let g:netrw_banner = 0 @@ -74,7 +76,7 @@ hi SpellBad gui=undercurl noremap n :bn noremap :bd -noremap o :!open & +noremap o :!xdg-open & noremap :tag noremap :Files @@ -99,3 +101,20 @@ noremap e :cs find e =expand("") noremap i :cs find i =expand("") noremap f :cs find f =expand("") noremap d :cs find d =expand("") + + +function! CloseOnLast() + let cnt = 0 + for i in range(0, bufnr("$")) + if buflisted(i) + let cnt += 1 + endif + endfor + if cnt <= 1 + q + else + bd + endif +endfunction + +"noremap :call CloseOnLast() diff --git a/bin/gauth b/bin/gauth index b18f73d..169fd3b 100755 --- a/bin/gauth +++ b/bin/gauth @@ -1,8 +1,8 @@ #!/bin/sh # Use backup from andOTP -# cat ~/.otp_accounts.json | -gpg -qd ~/.otp_accounts.json.gpg 2>/dev/null | +#gpg -qd ~/.otp_accounts.json.gpg 2>/dev/null | +cat ~/.otp_accounts.json | jq -r '.[] | "\(.label) \(.secret)"' | while read -r l s; do echo "$l $(oathtool --totp -b "$s")" diff --git a/bin/start_godoc b/bin/start_godoc index 15bb70a..6433377 100755 --- a/bin/start_godoc +++ b/bin/start_godoc @@ -1,3 +1,3 @@ #!/bin/sh -/Users/marc/go/bin/godoc >/tmp/godoc.out 2>&1 & +/home/marc/go/bin/godoc >/tmp/godoc.out 2>&1 & -- cgit v1.2.3