Browse Source

add more fzf goodies

feature/improve-speed
bretello 4 months ago
parent
commit
6a1bba6bbd
Signed by: brethil GPG Key ID: 876AAC6290170FE7
  1. 4
      aliases.sh
  2. 2
      antibody_plugins.txt
  3. 4
      vim/plugins_config.vim
  4. 11
      vim/plugs.vim
  5. 8
      vim/shortcuts.vim
  6. 2
      vim/vimrc

4
aliases.sh

@ -92,6 +92,10 @@ alias pvim='poetry run vim'
alias pshell='poetry shell'
alias venv='source .venv/bin/activate'
# Run fzf with file preview
alias pf="fzf --preview='BAT_STYLE='header,changes' bat --color=always {}' --bind shift-up:preview-page-up,shift-down:preview-page-down"
alias fgitlog="git log --oneline | fzf --multi --preview 'git -p show --color=always {+1}"
# dotfiles user aliases
if [[ -f ~/.dotfiles_aliases ]]; then
source $HOME/.dotfiles_aliases

2
antibody_plugins.txt

@ -14,7 +14,7 @@ robbyrussell/oh-my-zsh path:plugins/pyenv
robbyrussell/oh-my-zsh path:plugins/pylint
robbyrussell/oh-my-zsh path:plugins/sudo
robbyrussell/oh-my-zsh path:plugins/vi-mode
robbyrussell/oh-my-zsh path:plugins/zsh-navigation-tools
robbyrussell/oh-my-zsh path:plugins/fzf
robbyrussell/oh-my-zsh path:plugins/zsh_reload
zdharma/fast-syntax-highlighting
zsh-users/zsh-autosuggestions

4
vim/plugins_config.vim

@ -177,3 +177,7 @@ let g:ackprg = 'rg --vimgrep --no-heading'
"" Quickpeek
" Automatically open the quickpeek window
let g:quickpeek_auto = v:true
"" Fzf
let g:fzf_layout = { 'down': '~40%' }"

11
vim/plugs.vim

@ -40,8 +40,15 @@ Plug 'https://github.com/maxbrunsfeld/vim-yankstack'
" Mark indentation level
Plug 'https://github.com/nathanaelkane/vim-indent-guides'
" Quickpeek
Plug 'https://github.com/AndrewRadev/quickpeek.vim'
" Meson + Ninja
Plug 'https://github.com/igankevich/mesonic'
if g:uname == "Darwin"
" mac
Plug '/usr/local/opt/fzf'
elseif g:uname == "Linux"
Plug '/usr/bin/fzf'
end
" snipmate
Plug 'https://github.com/MarcWeber/vim-addon-mw-utils'

8
vim/shortcuts.vim

@ -92,7 +92,8 @@ map <leader>nn :NERDTreeToggle<CR>
"" CtrlP
" Quickly find and open a recently opened file
map <leader>o :CtrlPBuffer<CR>
map <leader>j :CtrlP<CR>
map <leader>j :call fzf#run({'sink': 'edit', 'options': '--preview="BAT_STYLE=header,changes bat --color=always {}"', 'down': '40%'}) <CR>
map <leader>f :CtrlPMRUFiles<CR>
map <leader>T :CtrlPBufTag<CR>
map <leader>t :CtrlPTag<CR>
@ -111,10 +112,9 @@ nmap <leader>za :Goyo 80%x85%<CR>
nmap <leader>zz :Goyo<CR>
""Misc stuff
let s:uname = system('uname | tr -d "\n"') " Get platform name (stripping the trailing newline)
if s:uname == "Darwin"
if g:uname == "Darwin"
"" Mac specific stuff
elseif s:uname == "Linux"
elseif g:uname == "Linux"
"" Linux specific stuff
function! s:WaylandYank()
if v:event['regname'] == '+' || (v:event['regname'] == 'w' && s:plus_to_w)

2
vim/vimrc

@ -1,4 +1,6 @@
" Install all plugins
let g:uname = system('uname | tr -d "\n"') " Get platform name (stripping the trailing newline)
source $DOTFILES/vim/plugs.vim
" Sanity

Loading…
Cancel
Save