diff options
| author | Marc Vertes <mvertes@free.fr> | 2022-05-13 13:47:14 +0200 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2022-05-13 13:47:14 +0200 |
| commit | cba68be4f36e9a1d34bc7a2d88ceda7a08ea0ddd (patch) | |
| tree | cc80a7fde9d70a4cf113f709b89235b216677e7f | |
| parent | 1e1a1087f799632c021af612eb3c919cf1143237 (diff) | |
update
| -rw-r--r-- | .vimrc | 25 | ||||
| -rwxr-xr-x | bin/gauth | 4 | ||||
| -rwxr-xr-x | bin/start_godoc | 2 |
3 files changed, 25 insertions, 6 deletions
@@ -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 <leader>p :cprevious<CR> autocmd FileType go nmap <leader>a :cclose<CR> " 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 = "<cWORD>" let g:netrw_banner = 0 @@ -74,7 +76,7 @@ hi SpellBad gui=undercurl noremap <leader>n :bn<cr> noremap <leader><leader> :bd<cr> -noremap <leader>o :!open <cWORD>&<cr><cr> +noremap <leader>o :!xdg-open <cWORD>&<cr><cr> noremap <C-g> :tag <c-r><c-w><cr> noremap <C-p> :Files<cr> @@ -99,3 +101,20 @@ noremap <leader>e :cs find e <C-R>=expand("<cword>")<CR><CR><tab> noremap <leader>i :cs find i <C-R>=expand("<cfile>")<CR><CR><tab> noremap <leader>f :cs find f <C-R>=expand("<cfile>")<CR><CR><tab> noremap <leader>d :cs find d <C-R>=expand("<cword>")<CR><CR><tab> + + +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 <leader><leader> :call CloseOnLast()<cr> @@ -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 & |
