Compare commits

...

4 commits

Author SHA1 Message Date
pull[bot]
9c70e7bfa4
Merge pull request #280 from dmitmel/master
[pull] master from dmitmel:master
2021-06-04 03:23:33 +00:00
Dmytro Meleshko
20c3f3b524 [nvim] redirect PutOutput into a preview window 2021-06-03 20:40:36 +03:00
Dmytro Meleshko
4c3f20a0ce [zsh] use a proper theme for sharkdp/bat 2021-06-03 19:07:08 +03:00
Dmytro Meleshko
2bf31fc1c0 [zsh] don't crash when rustup isn't installed 2021-06-03 19:06:56 +03:00
3 changed files with 19 additions and 7 deletions

View file

@ -78,7 +78,13 @@ set commentstring=//%s
nmap <silent> <leader>] m'yygccp`'j nmap <silent> <leader>] m'yygccp`'j
nmap <silent> <leader>[ m'yygccP`'k nmap <silent> <leader>[ m'yygccP`'k
command! -nargs=+ -complete=command PutOutput execute 'put =execute(' . escape(string(<q-args>), '|"') . ')' function! PutOutput(cmd)
let output = execute(a:cmd)
execute "noswapfile pedit" "+" . fnameescape("setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile") fnameescape("preview://" . a:cmd)
wincmd P
call setline(1, split(output, "\n"))
endfunction
command! -nargs=+ -complete=command PutOutput silent call PutOutput(<q-args>)
" ,c is easier to type than "+ because it doesn't require pressing Shift " ,c is easier to type than "+ because it doesn't require pressing Shift
noremap <leader>c "+ noremap <leader>c "+

View file

@ -34,3 +34,6 @@ export HOMEBREW_NO_AUTO_UPDATE=1
# https://github.com/junegunn/fzf/blob/764316a53d0eb60b315f0bbcd513de58ed57a876/src/tui/tui.go#L496-L515 # https://github.com/junegunn/fzf/blob/764316a53d0eb60b315f0bbcd513de58ed57a876/src/tui/tui.go#L496-L515
export FZF_DEFAULT_OPTS="--color=16 --height=40% --reverse" export FZF_DEFAULT_OPTS="--color=16 --height=40% --reverse"
# <https://github.com/sharkdp/bat#8-bit-themes>
export BAT_THEME="base16-256"

View file

@ -14,13 +14,16 @@ _plugin completions-rustc 'https://raw.githubusercontent.com/rust-lang/zsh-confi
_plugin completions-cargo 'https://raw.githubusercontent.com/rust-lang/cargo/master/src/etc/_cargo' from=url \ _plugin completions-cargo 'https://raw.githubusercontent.com/rust-lang/cargo/master/src/etc/_cargo' from=url \
after_load='plugin-cfg-path fpath prepend ""' after_load='plugin-cfg-path fpath prepend ""'
rustup_comp_path="${ZSH_CACHE_DIR}/site-functions/_rustup" rustup_bin="${commands[rustup]}"
if [[ "${commands[rustup]}" -nt "$rustup_comp_path" || ! -s "$rustup_comp_path" ]]; then if [[ -n "$rustup_bin" ]]; then
rustup_comp_path="${ZSH_CACHE_DIR}/site-functions/_rustup"
if [[ "$rustup_bin" -nt "$rustup_comp_path" || ! -s "$rustup_comp_path" ]]; then
_perf_timer_start "generate rustup completions" _perf_timer_start "generate rustup completions"
rustup completions zsh >| "$rustup_comp_path" "$rustup_bin" completions zsh >| "$rustup_comp_path"
_perf_timer_stop "generate rustup completions" _perf_timer_stop "generate rustup completions"
fi
unset rustup_comp_path
fi fi
unset rustup_comp_path
# compinit {{{ # compinit {{{
_perf_timer_start "compinit" _perf_timer_start "compinit"