Search from the $HOME directory
ItsNilDev opened this issue · 13 comments
Problems summary
How can I set fzf-preview to not to search from current directory? I mean I am In ~/.config
I want to search from ~
not .config
You can use cd, lcd, tcd, etc. or pass the path to DirectoryFiles.
How Can I ?
Read the vim doc and the FzfPreviewDirectoryFiles doc.
When I use :CocCommand fzf-preview.DirectoryFiles ~
it shows me nothing
It works in my environment.
I can't reproduce it because I don't have the environment entries in the minimum .vimrc and Issue template.
What do you mean!?
You are creating an Issue without writing the required fields in the Issue template.
What do you need to know?
And Can You Please Open this issue...
"-----------------Plugins----------------
call plug#begin('~/.config/nvim/plugins')
Plug 'scrooloose/nerdtree'
Plug 'majutsushi/tagbar'
Plug 'luochen1990/rainbow'
Plug 'gruvbox-community/gruvbox'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'yuki-ycino/fzf-preview.vim', { 'branch': 'release', 'do': ':UpdateRemotePlugins' }
Plug 'jiangmiao/auto-pairs'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" --For isntalling telescope
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-lua/telescope.nvim'
Plug 'nvim-treesitter/nvim-treesitter'
call plug#end()
"-----------------Plugins----------------
"----------Etc.-----------
syntax on
filetype plugin indent on
syntax enable
set tags=tags
set number
set nowrap
set relativenumber
set noshowmode
set smartindent
set smartcase
let g:airline_theme='base16'
" Stop Tab at 4 Spaces
set tabstop=4 softtabstop=4
set shiftwidth=4
set expandtab
autocmd Filetype css setlocal tabstop=4
let g:fzf_preview_directory_files_command = 'fd'
let $FZF_DEFAULT_OPTS = '--color=hl:#F6A616',hl+:'#F6A616'
" -----------------Bindings------------
nmap <C-L> <Esc>
imap <C-L> <Esc>
cmap <C-L> <Esc>
vmap <C-L> <Esc>
" File Searchers-----
nmap <leader>s :FZF ~ <CR>
nnoremap <Leader>d <cmd>lua require'telescope.builtin'.find_files{}<CR>
nmap <leader>f :CocCommand fzf-preview.DirectoryFiles <CR>
" -----------------Bindings------------
"--------------Theme and Rainbow Settings--------------
colorscheme gruvbox9
set background=dark
let g:rainbow_active = 1 "set to 0 if you want to enable it later via :RainbowToggle
let g:gruvbox_filetype_hi_groups = 1
"--------------Theme and Rainbow Settings--------------
" autocmd StdinReadPre * let s:std_in=1
" autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
" autocmd StdinReadPre * let s:std_in=1
" autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif
" autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" nnoremap <silent> <C-k><C-B> :NERDTreeToggle<CR>
"" nnoremap <silent> <C-K><C-T> :TagbarToggle<CR>
This is my init.vim
When I copy this file, I get an error and cannot read it.
Error detected while processing /root/.config/nvim/init.vim:
line 44:
E15: Invalid expression: '--color=hl:#F6A616',hl+:'#F6A616'
I've tried, but I can't see any issues that I can't reproduce.
Please create a Dockerfile that reproduces the problem.
Ref: https://github.com/yuki-ycino/fzf-preview.vim/blob/master/.github/issue_example/Dockerfile