summaryrefslogtreecommitdiff
path: root/bashrc
diff options
context:
space:
mode:
Diffstat (limited to 'bashrc')
-rw-r--r--bashrc38
1 files changed, 27 insertions, 11 deletions
diff --git a/bashrc b/bashrc
index 2285c44..eca50d7 100644
--- a/bashrc
+++ b/bashrc
@@ -1,17 +1,7 @@
# vim: foldmethod=marker ts=4 sw=4
# editor {{{
# Prefer neovim over vim over vi
-if [ -e /usr/bin/nvim ]
-then
- EDITOR=/usr/bin/nvim
-else
- if [ -e /usr/bin/vim ]
- then
- EDITOR=/usr/bin/vim
- else
- EDITOR=/usr/bin/vi
- fi
-fi
+EDITOR=/usr/bin/vim
export EDITOR
# }}}
# R {{{
@@ -22,6 +12,9 @@ PATH=/usr/lib/R/site-library/littler/examples:"${PATH}"
# Path where the R sources are
export RTOP=~/svn/R
# }}}
+# Julia {{{
+alias julia='/home/jranke/git/julia/julia'
+# }}}
# debian {{{
export DEBEMAIL=jranke@uni-bremen.de
export DEBFULLNAME="Johannes Ranke"
@@ -98,3 +91,26 @@ export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS=' -p /usr/bin/python3 '
source /usr/local/bin/virtualenvwrapper.sh
# }}}
+# {{{ reticulate
+export RETICULATE_PYTHON=/usr/bin/python3
+export RETICULATE_AUTOCONFIGURE=FALSE
+# }}}
+# ripgrep->fzf->vim [QUERY] from https://junegunn.github.io/fzf/tips/ripgrep-integration/
+rfv() (
+ RELOAD='reload:rg --column --color=always --smart-case {q} || :'
+ OPENER='if [[ $FZF_SELECT_COUNT -eq 0 ]]; then
+ vim {1} +{2} # No selection. Open the current line in Vim.
+ else
+ vim +cw -q {+f} # Build quickfix list for the selected items.
+ fi'
+ fzf --disabled --ansi --multi \
+ --bind "start:$RELOAD" --bind "change:$RELOAD" \
+ --bind "enter:become:$OPENER" \
+ --bind "ctrl-o:execute:$OPENER" \
+ --bind 'alt-a:select-all,alt-d:deselect-all,ctrl-/:toggle-preview' \
+ --delimiter : \
+ --preview 'bat --style=full --color=always --highlight-line {2} {1}' \
+ --preview-window '~4,+{2}+4/3,<80(up)' \
+ --query "$*"
+)
+

Contact - Imprint