commit b7df476b3ce014998d71535697f6b782cfafcc5c
parent c9d2852cecc62b2a9b85f613af8d9f9beafd16d3
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Mon, 20 May 2019 13:16:43 +0200
Update commands and zathura yank, change sent presentation to <F7>
Diffstat:
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/.commands.sh b/.commands.sh
@@ -39,12 +39,14 @@ o() {
$open "$1" >/dev/null 2>&1 &
disown $!
else
- IFS=$'\n' out=($(fzf --query="$1" --exit-0 --expect=ctrl-o,ctrl-e --preview-window=hidden))
+ IFS=$'\n' out=($(fzf --query="$1" --exit-0 --expect=ctrl-o,ctrl-e,ctrl-y --preview-window=hidden))
key=$(head -1 <<< "$out")
file=$(head -2 <<< "$out" | tail -1)
if [ -n "$file" ]; then
if [ "$key" = ctrl-e ]; then
${EDITOR:-vim} "$file"
+ elif [ "$key" = ctrl-y ]; then
+ printf "%s" "$PWD/$file" | xclip
elif [ "$key" = ctrl-o ]; then
cd "$(dirname "$file")"
else
diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc
@@ -11,4 +11,4 @@ set completion-highlight-fg "#aaaaaa"
map <C-o> feedkeys ":exec getdoi --clip '$FILE'<Return>"
map <C-b> feedkeys ":exec scholarref --add '$FILE'<Return>"
-map <C-y> feedkeys ":exec sh -c 'echo "$FILE" | xclip'<Return>"
+map <C-y> feedkeys ":exec bash -c 'echo -n "$FILE" | xclip'<Return>"
diff --git a/.vim/plugin/keybinds.vim b/.vim/plugin/keybinds.vim
@@ -136,7 +136,7 @@ nnoremap <silent> [c :cprevious<cr>
" <C-x>s: spelling suggestions
" show as presentation in sent
-nnoremap <silent><F5> :w!<cr>:Start! sent <c-r>%<cr><cr>
+nnoremap <silent><F7> :w!<cr>:Start! sent <c-r>%<cr><cr>
" save current session
" (open with `vim -S <sessionname>.vim` or :source <sessionname>