From dd4940ac218890ddd0537af9250470f50eb77099 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Sat, 25 Oct 2025 11:13:19 +0200 Subject: Some changes from the last months --- bashrc | 19 +++++++++++++++++++ gitignore | 1 + vimrc | 2 ++ 3 files changed, 22 insertions(+) diff --git a/bashrc b/bashrc index 01dde1a..eca50d7 100644 --- a/bashrc +++ b/bashrc @@ -95,3 +95,22 @@ source /usr/local/bin/virtualenvwrapper.sh 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 "$*" +) + diff --git a/gitignore b/gitignore index b9cea99..3c0a6f2 100644 --- a/gitignore +++ b/gitignore @@ -12,3 +12,4 @@ ~$*.xlk* ~$*.ppt* +.wine/dosdevices/** diff --git a/vimrc b/vimrc index 82c619a..dc65e05 100644 --- a/vimrc +++ b/vimrc @@ -70,6 +70,8 @@ let cmdline_map_start = 's' " R plugin {{{1 Plug 'jalvesaq/Nvim-R' vmap r :call SendSelectionToR("echo", "down") +imap ,, \|> +vmap ,, a \|> let R_assign = 0 let R_pdfviewer = 'okular' let R_openpdf = 1 -- cgit v1.2.3