Compare commits
7 commits
9561777fb7
...
67477adc1b
Author | SHA1 | Date | |
---|---|---|---|
67477adc1b | |||
ed3f9a26ec | |||
1545c6ad6a | |||
b6d5a3423a | |||
29ad47e394 | |||
c7fa78c3a4 | |||
de09d79b1f |
8 changed files with 36 additions and 12 deletions
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
echo "$1/?.lua;$1/?/init.lua"
|
echo 'export LUA_PATH="'"$1/?.lua;$1/?/init.lua;;"'"'
|
||||||
|
|
7
bin/xls2csv
Executable file
7
bin/xls2csv
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
for sheet in $(in2csv --names "$1")
|
||||||
|
do
|
||||||
|
basename=$(echo $1 | sed -e 's/\.[^\.]\+$//')
|
||||||
|
in2csv --sheet "$sheet" "$1" | csvformat -D \; > "$basename-$sheet.csv"
|
||||||
|
done
|
|
@ -20,7 +20,8 @@
|
||||||
[alias]
|
[alias]
|
||||||
adog = log --all --decorate --oneline --graph --date-order
|
adog = log --all --decorate --oneline --graph --date-order
|
||||||
dog = log --decorate --oneline --graph --date-order
|
dog = log --decorate --oneline --graph --date-order
|
||||||
fadd = "! git status --porcelain | sed 's/^...//' | fzf -m --layout=reverse-list | xargs --open-tty git add"
|
fadd = "! git status --porcelain | sed -e '/^??/d' -e 's/^...//' | fzf -m --layout=reverse-list | xargs --open-tty git add"
|
||||||
|
faddall = "! git status --porcelain | sed 's/^...//' | fzf -m --layout=reverse-list | xargs --open-tty git add"
|
||||||
fixup = "!git commit --patch --no-edit --amend $(git diff --name-only HEAD~1..HEAD)"
|
fixup = "!git commit --patch --no-edit --amend $(git diff --name-only HEAD~1..HEAD)"
|
||||||
h = log -1 --format=%h
|
h = log -1 --format=%h
|
||||||
hash = log -1 --format=%H
|
hash = log -1 --format=%H
|
||||||
|
|
|
@ -24,17 +24,19 @@ pp() {
|
||||||
}
|
}
|
||||||
|
|
||||||
gfc() {
|
gfc() {
|
||||||
|
command="fadd"
|
||||||
unset patch
|
unset patch
|
||||||
while test $# != 0
|
while test $# != 0
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--patch | -p) patch="--patch" ;;
|
--patch | -p) patch="--patch" ;;
|
||||||
|
--untracked | -u) command="faddall" ;;
|
||||||
--) shift; break ;;
|
--) shift; break ;;
|
||||||
*) break ;;
|
*) break ;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
git fadd $patch && git commit $@
|
git $command $patch && git commit $@
|
||||||
}
|
}
|
||||||
|
|
||||||
# Funny
|
# Funny
|
||||||
|
|
|
@ -11,7 +11,7 @@ return function(_, bufnr)
|
||||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
|
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
|
||||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
|
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
|
||||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
|
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
|
||||||
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
|
--vim.keymap.set('v', '<C-k>', vim.lsp.buf.signature_help, bufopts)
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>wa', vim.lsp.buf.add_workspace_folder, bufopts)
|
vim.keymap.set('n', '<leader>wa', vim.lsp.buf.add_workspace_folder, bufopts)
|
||||||
vim.keymap.set('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
|
vim.keymap.set('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
|
||||||
|
|
|
@ -265,17 +265,12 @@ command! GitFirst call <sid>git_first() | call s:git_info()
|
||||||
command! GitLast call <sid>git_last() | call s:git_info()
|
command! GitLast call <sid>git_last() | call s:git_info()
|
||||||
command! GitInfo call <sid>git_info()
|
command! GitInfo call <sid>git_info()
|
||||||
command! -nargs=1 GitCheckout call <sid>file_at_revision(<f-args>)
|
command! -nargs=1 GitCheckout call <sid>file_at_revision(<f-args>)
|
||||||
command! -nargs=? GitCompare try
|
|
||||||
\| call s:gitroot() | call <sid>git_diff(<f-args>)
|
|
||||||
\| catch
|
|
||||||
\| echo 'Not a git repo!'
|
|
||||||
\| endtry
|
|
||||||
command! GitRoot call <SID>cd_git_root('%')
|
command! GitRoot call <SID>cd_git_root('%')
|
||||||
command! GitOrig exec 'e '.b:git_original_file
|
command! GitOrig exec 'e '.b:git_original_file
|
||||||
command! ShowGitRoot try
|
command! ShowGitRoot try
|
||||||
\| echo <sid>gitroot()
|
\| echo <sid>gitroot()
|
||||||
\| catch | echo 'Not a git repository'
|
\| catch | echo 'Not a git repository'
|
||||||
\| endtry
|
\| endtry
|
||||||
command! GitDiff diffthis | vert bel split | exec "silent GitPrev" | diffthis
|
command! GitDiff set nolist | diffthis | vert bel split | exec "silent GitPrev" | set nolist | diffthis
|
||||||
|
|
||||||
augroup END
|
augroup END
|
||||||
|
|
|
@ -529,6 +529,8 @@ exec 'noremap gk '.g:jmp_dist.'k'
|
||||||
|
|
||||||
nnoremap <C-k> ddkP
|
nnoremap <C-k> ddkP
|
||||||
nnoremap <C-j> ddp
|
nnoremap <C-j> ddp
|
||||||
|
vnoremap <C-k> :m '<-2<CR>gv
|
||||||
|
vnoremap <C-j> :m '>+1<CR>gv
|
||||||
nnoremap <C-h> b
|
nnoremap <C-h> b
|
||||||
nnoremap <C-l> e
|
nnoremap <C-l> e
|
||||||
|
|
||||||
|
|
21
zshrc
21
zshrc
|
@ -30,6 +30,23 @@ task_prompt() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
due_soon_prompt() {
|
||||||
|
if [ $run_task_prompt -eq 0 ]
|
||||||
|
then
|
||||||
|
if [ "$(task +PENDING due.before:30min count)" -gt 0 ]; then
|
||||||
|
echo "%F{red}%B$(task +PENDING +DUE count)%b "; return
|
||||||
|
fi
|
||||||
|
if [ "$(task +PENDING due.before:1h count)" -gt 0 ]; then
|
||||||
|
echo "%F{yellow}%B$(task +PENDING +DUE count)%b "; return
|
||||||
|
fi
|
||||||
|
if [ "$(task +PENDING due.before:3h count)" -gt 0 ]; then
|
||||||
|
echo "%F{green}%B$(task +PENDING +DUE count)%b "; return
|
||||||
|
fi
|
||||||
|
if [ "$(task +PENDING due.before:tomorrow count)" -gt 0 ]; then
|
||||||
|
echo "%F{black}%B$(task +PENDING +DUE count)%b "; return
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
which timew > /dev/null
|
which timew > /dev/null
|
||||||
run_timew_prompt=$?
|
run_timew_prompt=$?
|
||||||
|
@ -52,9 +69,9 @@ ranger_prompt() {
|
||||||
}
|
}
|
||||||
|
|
||||||
prompt='$(task_prompt)%(?.%F{green}.%F{red})λ%F{blue}$(ranger_prompt)%f '
|
prompt='$(task_prompt)%(?.%F{green}.%F{red})λ%F{blue}$(ranger_prompt)%f '
|
||||||
export PROMPT_full='$(timew_prompt)%B%F{magenta}%n%F{blue}@%F{magenta}%m%b %F{magenta}%~
|
export PROMPT_full='$(due_soon_prompt)%B%F{magenta}%n%F{blue}@%F{magenta}%m%b %F{magenta}%~
|
||||||
'"$prompt"
|
'"$prompt"
|
||||||
export PROMPT_gitlong='%F{red}$(timew_prompt)$(gitprompt && echo -ne " ")%F$(git log --oneline --no-decorate -1 2>/dev/null)
|
export PROMPT_gitlong='$(due_soon_prompt)$(gitprompt && echo -ne " ")%F$(git log --oneline --no-decorate -1 2>/dev/null)
|
||||||
%F{cyan}$(gitpath)'"$prompt"
|
%F{cyan}$(gitpath)'"$prompt"
|
||||||
# export PS1tiny=
|
# export PS1tiny=
|
||||||
# export PS1nano=
|
# export PS1nano=
|
||||||
|
|
Loading…
Reference in a new issue