Skip to content

Commit

Permalink
fzf-preview.vim: vim + fzf
Browse files Browse the repository at this point in the history
  • Loading branch information
bpinto committed Aug 7, 2020
1 parent 2aaf7f8 commit 89d1bfa
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 15 deletions.
21 changes: 10 additions & 11 deletions .config/nvim/init.vim
Expand Up @@ -26,6 +26,7 @@ Plug 'tpope/vim-rhubarb'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'w0rp/ale'
Plug 'yuki-ycino/fzf-preview.vim'

call plug#end()

Expand Down Expand Up @@ -417,18 +418,16 @@ augroup END
runtime macros/matchit.vim

" FZF
" Act like CtrlP
let g:fzf_action = {
\ 'ctrl-s': 'split',
\ 'ctrl-v': 'vsplit'
\ }
" <C-p> or <C-t> to search files
nnoremap <silent> <C-t> :FZF -m<cr>
nnoremap <silent> <C-p> :FZF -m<cr>
" Hide statusline
autocmd! FileType fzf
autocmd FileType fzf set laststatus=0 noshowmode noruler
\| autocmd BufLeave <buffer> set laststatus=2 showmode ruler
nnoremap <silent> <C-t> :FzfPreviewProjectFiles -resume<cr>
nnoremap <silent> <C-p> :FzfPreviewProjectFiles -resume<cr>
" Use colors on preview window
let g:fzf_preview_command = 'bat --color=always --style=grid {-1}'
" Use ripgrep for file list
let g:fzf_preview_filelist_command = 'rg --files --hidden --follow --no-messages -g \!"* *"'
" Unmap ctrl-u binding
let g:fzf_preview_preview_key_bindings = 'ctrl-d:preview-page-down,?:toggle-preview'


" NerdCommenter
" Menu remapping
Expand Down
1 change: 1 addition & 0 deletions Brewfile
Expand Up @@ -2,6 +2,7 @@ tap "homebrew/bundle"
tap "homebrew/cask-fonts"
tap "homebrew/core"

brew 'bat'
brew 'diff-so-fancy'
brew 'elvish'
brew 'fzf'
Expand Down
29 changes: 25 additions & 4 deletions Brewfile.lock.json
Expand Up @@ -2,13 +2,13 @@
"entries": {
"tap": {
"homebrew/bundle": {
"revision": "677f39d62a8aefdcbc091f193af1f7ddbee0052d"
"revision": "04a8b37bbdd9bb801a5fde72fd82232846cf2b69"
},
"homebrew/core": {
"revision": "93ac3eae768eae1afb48e7f252543287ade83873"
"revision": "91c772afe0076500306f05b23d6b5a04b7cee9d9"
},
"homebrew/cask-fonts": {
"revision": "55230b81bc317fcc1d1784b222160d7174d76f8d"
"revision": "fca9a79d88b9b9da43d47b0b959854fc8506ac69"
}
},
"cask": {
Expand Down Expand Up @@ -181,6 +181,27 @@
}
}
}
},
"bat": {
"version": "0.12.1",
"bottle": {
"cellar": ":any_skip_relocation",
"prefix": "/usr/local",
"files": {
"catalina": {
"url": "https://homebrew.bintray.com/bottles/bat-0.12.1.catalina.bottle.2.tar.gz",
"sha256": "fe47d61a6eedc6442d4a2b45bb15eadce806102c46247dd866e762fc510f2ac0"
},
"mojave": {
"url": "https://homebrew.bintray.com/bottles/bat-0.12.1.mojave.bottle.2.tar.gz",
"sha256": "c01694ccd70256fe852f5f597ed1ab917161642e1309b367caa537f77f98ebf8"
},
"high_sierra": {
"url": "https://homebrew.bintray.com/bottles/bat-0.12.1.high_sierra.bottle.2.tar.gz",
"sha256": "d06770fb4f496a0dfa8294431d65d93c53c4fa14a09c28ca7d87bbacf8419cb3"
}
}
}
}
}
},
Expand All @@ -189,7 +210,7 @@
"catalina": {
"HOMEBREW_VERSION": "2.2.6",
"HOMEBREW_PREFIX": "/usr/local",
"Homebrew/homebrew-core": "93ac3eae768eae1afb48e7f252543287ade83873",
"Homebrew/homebrew-core": "91c772afe0076500306f05b23d6b5a04b7cee9d9",
"CLT": "11.0.33.17",
"Xcode": "11.3",
"macOS": "10.15.3"
Expand Down

0 comments on commit 89d1bfa

Please sign in to comment.