aboutsummaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorAnton Bobov <abobov@gmail.com>2017-08-06 20:35:17 +0500
committerAnton Bobov <abobov@gmail.com>2017-08-06 20:35:17 +0500
commitfc1bf76fde67eb913adff2f50eeef0d4a468df4a (patch)
tree50936084b34ec783f0fe16d11f60d93e154ab5bc /files
parentf48a20fe77b94474260eb5d46dc6883ce0705803 (diff)
Updates.
- [git] new aliases and ignore Infinitest files - [offlineimap] remove backend option, it's set by default - [vim] enable spellchecking by default - [vim] format JSON with jq - [zsh] run ip via grc coloring - [zsh] ledger command easy query by camelcase
Diffstat (limited to 'files')
-rw-r--r--files/.gitconfig3
-rw-r--r--files/.gitignore4
-rw-r--r--files/.offlineimaprc1
-rw-r--r--files/.vimrc10
-rw-r--r--files/.zsh/rc/S50_aliases1
-rw-r--r--files/.zsh/rc/S51_ledger6
6 files changed, 21 insertions, 4 deletions
diff --git a/files/.gitconfig b/files/.gitconfig
index e657f8f..b88d000 100644
--- a/files/.gitconfig
+++ b/files/.gitconfig
@@ -33,7 +33,10 @@
ka = !sh -c 'gitk --all' -
kb = !sh -c 'gitk --branches' -
lg = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
+ l = "!git lg -10"
+ f = !sh -c 'git branch | grep -F "feature/$1" | xargs -r -n 1 git co' -
st = status
+ stashlist = stash list --date=short
addnw = !sh -c 'git diff --unified=0 --ignore-all-space --no-color "$@" | git apply --cached --ignore-whitespace --unidiff-zero -'
branch-name = "!git rev-parse --abbrev-ref HEAD"
publish = "!git push -u origin $(git branch-name)"
diff --git a/files/.gitignore b/files/.gitignore
index 1e9d1b3..009d228 100644
--- a/files/.gitignore
+++ b/files/.gitignore
@@ -8,3 +8,7 @@
# Python
*.pyc
+
+# Infinitest
+infinitest.filters
+infinitest.args
diff --git a/files/.offlineimaprc b/files/.offlineimaprc
index 47055ad..09b56f8 100644
--- a/files/.offlineimaprc
+++ b/files/.offlineimaprc
@@ -7,7 +7,6 @@ pythonfile = ~/.offlineimap-utf7.py
[Account Gmail]
localrepository = LocalGmail
remoterepository = RemoteGmail
-status_backend = sqlite
postsynchook = notmuch new
[Repository LocalGmail]
diff --git a/files/.vimrc b/files/.vimrc
index f7a764d..da66aef 100644
--- a/files/.vimrc
+++ b/files/.vimrc
@@ -96,6 +96,7 @@ if has("multi_byte")
endif
set keymap=russian-jcukenwin
set spelllang=ru,en
+set spell
set iminsert=0
set imsearch=0
@@ -407,6 +408,9 @@ nnoremap <Leader>ev :vsplit $MYVIMRC<CR>
" Commands {{{
command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_
\ | diffthis | wincmd p | diffthis
+if executable('jq')
+ command -range Jq <line1>,<line2>!jq --indent 4 .
+endif
" }}}
" Filetype {{{
" XML {{{
@@ -432,9 +436,9 @@ augroup END
augroup ft_json
au!
- if executable('jq')
- au FileType json noremap <Leader>jq :%!jq --indent 4 .<CR>
- au FileType json vnoremap <Leader>jq :'<,'>!jq --indent 4 .<CR>
+ if exists(':Jq')
+ au FileType json noremap <Leader>jq :%Jq<CR>
+ au FileType json vnoremap <Leader>jq :%Jq<CR>
endif
augroup END
diff --git a/files/.zsh/rc/S50_aliases b/files/.zsh/rc/S50_aliases
index b04f986..32e3778 100644
--- a/files/.zsh/rc/S50_aliases
+++ b/files/.zsh/rc/S50_aliases
@@ -32,6 +32,7 @@ alias mux='tmuxinator'
if $(which grc >/dev/null 2>&1) ; then
alias ping='grc ping'
alias dig='grc dig'
+ alias ip='grc ip'
fi
alias display_off='xset dpms force off'
diff --git a/files/.zsh/rc/S51_ledger b/files/.zsh/rc/S51_ledger
index b683128..37a6bf5 100644
--- a/files/.zsh/rc/S51_ledger
+++ b/files/.zsh/rc/S51_ledger
@@ -7,9 +7,15 @@ alias lweek='noglob ledger register --begin "last 7 days"'
alias balc='bal --current --aux-date'
alias lpending='ledger register --pending'
+_ledger_smartcase_expr() {
+ echo "$1" | sed -r 's/[A-Z]/.*&/g'
+}
+
bal() {
if [ $# -eq 0 ] || [[ $1 =~ [-].+ ]] ; then
ledger balance $* ^Assets ^Liabilities
+ elif [ $# -eq 1 ] ; then
+ ledger balance ^Assets and $(_ledger_smartcase_expr "$*")
else
ledger balance ^Assets and $*
fi