Giter VIP home page Giter VIP logo

neovim-fuzzy's People

Contributors

arkq avatar cloudhead avatar hlidotbe avatar idanarye avatar insidewhy avatar janogonzalez avatar nannery avatar o0th avatar techhazard avatar yourealwaysbe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

neovim-fuzzy's Issues

[Feature Request] FuzzyBuffer

Add a command to fuzzy search in opened buffers. I usually open all the files I need but navigating through them is not fun, it would be cool if I could :FuzzyBuffer and switch to buffer I need.

Make it clear when fzy is not installed

I installed fzy on my desktop and moved over the init.vim file to my laptop but I could not figure out why it would not load the plugin. I checked vim-plug, my neovim installation and reinstalled my plugins several times. I decided to look at the plugin and I saw

if exists("g:loaded_fuzzy") || &cp || !executable('fzy') || !has('nvim')
  finish
endif

Perhaps a warning would be better? Silently not registering the plugin isn't very good UX

Support searching inside the files themselves

with fzf.vim, I was able to add this:

function! s:with_git_root()
    let root = systemlist('git rev-parse --show-toplevel')[0]
    return v:shell_error ? {} : {'dir': root}
endfunction

command! -nargs=* FzfGit call fzf#vim#ag(<q-args>, extend(s:with_git_root(), g:fzf#vim#default_layout))
map <C-s> :FzfGit

which meant that control-s would do a search of the contents of all the git files, and then I could fuzzy find the list, and then hit enter and open the found file. what's the best way to do this with neovim-fuzzy?

:FuzzyOpen searches in root directory

Hi I installed this on Ubuntu and it works great - on my mac though - whenever I use :FuzzyOpen it starts the search from the root directory - rather than my current directory. It's possible it's something in my setup but I can't think what - my init.vim is the same for both machines.

Unknown function win_getid?

when trying to run :FuzzyOpen, on OSX(OSX El Capitan, iTerm2 3.0.9, zsh 5.2, fzy 0.7, neovim 0.1.4), and centos(centos 7.0.1406, iTerm2 3.0.9, zsh 5.0.8, fzy 0.7, neovim 0.1.4):

Error detected while processing function <SNR>104_fuzzy_open[36]..<SNR>104_fuzzy:
line   42:
E117: Unknown function: win_getid
E15: Invalid expression: win_getid()
Press ENTER or type command to continue

FuzzyGrep should grep content only, not filenames.

Or at least there should be an option to let you select whether filenames are also matched.

I often use the grep feature of my old plugin to grab the files that have included another file, with the way :FuzzyGrep currently works it obfuscates the results I want.

Feature request: FuzzyOpen with query pre-populated

Thank you for this great plugin! fzy accepts an option to pre-populate a query:

       -q, --query=QUERY
              Use QUERY as the initial search query.

It would be really useful if neovim-fuzzy exposed a function that would pass this value to fzy. My use case, for example, is that I want to write a simple plugin to open FuzzyOpen with a modified version of the current buffer's filename pre-populated (e.g. to quickly jump to a test file or some other similarly named file).

I started on an implementation of this, but I wasn't sure the right public interface to expose. Here's what I have so far: https://github.com/schreifels/neovim-fuzzy/commit/2e98b3351769d6d67b21b55c56075d07b4b9be53

Let me know your thoughts. Thanks!

Also search hidden files?

It seems to ignore hidden files by default. How can we make it also include hidden results? - Joe

go to window if file is already open

Hi, if the file is already open in another window and/or tab, is there a way to automatically go to that window instead of opening the file again? It would be a behaviour like :sbuffer.

Thanks!

Populate the quick fix list after :FuzzyGrep

Hi @cloudhead, amazing plugin. I was only looking for a files fuzzy finder but now I'm also impressed by the :FuzzyGrep UX. I just miss the :cn and :cp commands. Would it be possible to populate the quick fix list with the :FuzzyGrep results?

Thanks beforehand.

Is it possible to enable finding "hidden" files?

When I bring up the finder, how can I enable finding "hidden" files? For example, if I have a file named .config, it currently doesn't appear in my search results if I search for "config". Is there a way to enable this?

Include all files within a "project"

Right now, this plugin seems to only find files within pwd. I write a lot of Django projects that have a structure like this:

apps/
  app1/
  app2/
settings.py
urls.py
templates/
  base.html
  app1/
  app2/
...

If I cd into apps/app1 and open a file for editing, I can't hit CTRL+P to find/open base.html, for example, because base.html doesn't live under apps/app1. ctrlp.vim searches for all files within the project root by default (I guess it detects all files within the current Python environment?). Is there a way for this plugin to do the same?

When opening a new file using neovim-fuzzy the cwd for the "current" tab is changed to the git root

This happens when fuzzy_opencmd is set to tabe (or tab drop or any other command that opens the result in a new tab).

e.g. say I am in a project called project inside subdirectory subdir which contains two files, file1 and file2.

When I open the first file with neovim-fuzzy, say file1 then the file1 tab corrrectly has project/subdir as its cwd. Now if I open a second file while the file1 tab is focussed, say file2 then the new tab with file2 in it has the correct cwd of project/subdir but the file1 tab now has a cwd of project.

Then if I were to open a third file with neovim-fuzzy, while looking at the file2 tab, now that tab will also have a cwd of the project root. It always sets the cwd of the "current" tab to the project root.

FuzzyOpen not working in a git repo

Whenever I call FuzzyOpen in a directory that's under a git repository, it yields an error:

Error detected while processing function <SNR>70_fuzzy_open:                                                                                                   
line    2:                                                                                                                                                     
E344: Can't find directory "^[[1 q/home/afnan/dev/gfx_research/sampleview" in cdpath                                                                           
E472: Command failed  

This seems to only occur in git repositories, or subfolders under a git repository. FuzzyGrep is not affected. If this is relevant, I'm running Linux 4.19.11.

fuzzy find stopped working

I get this error. really cant remember what i did :'( Trying to figure out why. help much appreciated!

:FuzzyOpen
E79: Cannot expand wildcards
Error detected while processing function 23_fuzzy_open:
line 2:
E344: Can't find directory "stty: stdin isn't a terminal" in cdpath
E472: Command failed
Press ENTER or type command to continue


my init.vim

" -------
" Python
" -------
let g:python3_host_prog = '/Users/u606/.pyenv/versions/neovim3/bin/python'
let g:python_host_prog = '/Users/u606/.pyenv/versions/neovim2/bin/python'

" ----
" Set
" ----
set nocursorline
set encoding=utf8
set nocp " 'compatible' is not set
set number
set shiftwidth=2
set expandtab
autocmd Filetype ruby setlocal tabstop=2
autocmd Filetype rb setlocal tabstop=2
let g:ackprg = 'ag --nogroup --nocolor --column'

" -------
" PLUGINS
" -------
call plug#begin('~/.config/nvim/plugged')

Plug 'vim-airline/vim-airline'
Plug 'w0rp/ale'
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'carlitux/deoplete-ternjs', { 'for': ['javascript', 'javascript.jsx'] }
Plug 'othree/jspc.vim', { 'for': ['javascript', 'javascript.jsx'] }
Plug 'mxw/vim-jsx'
Plug 'cloudhead/neovim-fuzzy'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
" Plug 'neomake/neomake' "| Plug 'dojoteef/neomake-autolint'
Plug 'mhartington/oceanic-next'
Plug 'ervandew/supertab'
Plug 'ternjs/tern_for_vim', { 'for': ['javascript', 'javascript.jsx'] }
Plug 'SirVer/ultisnips'
Plug 'tpope/vim-cucumber'
Plug 'tpope/vim-fugitive'
" Plug 'ryanoasis/vim-devicons'
Plug 'tpope/vim-surround'
Plug 'honza/vim-snippets'
Plug 'benmills/vimux'
" Plug 'terryma/vim-multiple-cursors'
" Plug '~/.config/nvim/scripts/ColDevicons'

call plug#end()
"

" ----------------------
" PLUGIN CONFIGURATIONS
" ----------------------

" ---------
" DevIcons
" ---------
let g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol='๐Ÿ‘ฉ '
if exists('g:loaded_webdevicons')
""" call webdevicons#refresh()
endif
let g:WebDevIconsUnicodeDecorateFolderNodes = 1
let g:DevIconsEnableFoldersOpenClose = 1
let g:webdevicons_gui_glyph_fix = 1

" ---------
" Deoplete
" ---------
" let g:deoplete#enable_at_startup = 1
let g:deoplete#omni#functions = {}
let g:deoplete#omni#functions.javascript = [
\ 'tern#Complete',
\ 'jspc#omni'
]

" ---------
" Nerd Tree
" ---------
nnoremap :NERDTreeToggle
"autocmd vimenter * NERDTree "// Open the tree by default
let NERDTreeShowHidden=1
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif

" ---------
" Neomake
" ---------
"jcall neomake#configure#automake('n')

" -----------
" UltiSnips
" -----------
let g:UltiSnipsExpandTrigger=""
let g:UltiSnipsJumpForwardTrigger=""
let g:UltiSnipsJumpBackwardTrigger=""
let g:UltiSnipsEditSplit="vertical"

" ---------
" AUTOCMD
" ---------
autocmd BufNewFile,BufRead *.sharedrc set syntax=perl
" Jump to the main window.
autocmd VimEnter * wincmd p

" ----------
" REMAPS
" ----------
nnoremap :FuzzyOpen
noremap s :w

filetype plugin indent on

" --------
" Airline
" --------
let g:airline_powerline_fonts = 1

syntax on
set termguicolors

" Visual Mode Orange Background, Black Text
hi Visual guifg=#000000 guibg=#FD971F

" Default Colors for CursorLine
highlight CursorLine guibg=#3E3D32
highlight Cursor guibg=#A6E22E;

" Change Color when entering Insert Mode
autocmd InsertEnter * highlight CursorLine guibg=#323D3E
autocmd InsertEnter * highlight Cursor guibg=#00AAFF;

" Revert Color to default when leaving Insert Mode
autocmd InsertLeave * highlight CursorLine guibg=#3E3D32
autocmd InsertLeave * highlight Cursor guibg=#A6E22E;

colorscheme monokai
syntax enable

Feature: buffer finder

Hello, fantastic plugin! Tried it for the first time today and I think it's brilliant (have previously used a lot of different file finders, most recently using fzf.)

One thing I've always used with my file finders is a buffer finder. It would be awesome if fuzzy supported buffer search too.

Keep up the great work!

Error when run FuzzyOpen in neovim

Error when run FuzzyOpen in neovim:
Error detected while processing function 36_fuzzy_open:
line 22:
Vim(let):E118: Too many arguments for function: 263

Env:
OS: Ubuntu 16.04.1 LTS
NVIM: 0.2.0-dev

Terminal buffers randomly disappear from FuzzyOpen

It seems like one of the last commits introduced a little bug: Some times FuzzyOpen doesn't show any terminal buffer and I need to manually look for them using :b (ewww). I say they disappear because usually they show at least once.

fuzzy_open Unknown flag w

Disclaimer: I am completely new to all of this.

Ubuntu 17.04, ag 1.0.2, fzy 0.9, nvim v0.2.1-dev

FuzzyGrep works

FuzzyOpen prints out

Error detected while processing function <SNR>9_fuzzy_open:
line 24:
Vim(call):E5060: Unknow flag: w

my best guess is writefile call

[Bug] `hg` command not found

I don't have hg installed, and whenever I try to fuzzy search it gives an error (every time), and after I hit enter it works fine. I found solution to the problem, that is to manually set g:fuzzy_rootcmds to only have the programs you have on the system (for me it's git).

Wrong argument when invoking

I get an error message saying --path-to-ignore is not a valid argument.
Changing to --path-to-agignore seems to fix the issue.

I'm running ag version 0.31.0.

Unknown function: win_getid

I get following error when trying to use this plugin:

Error detected while processing function <SNR>17_fuzzy:
line   47:
E117: Unknown function: win_getid
E15: Invalid expression: win_getid()

Neovim version: 0.1.4
Terminal: Gnome Terminal
$TERM: xterm-256color
system: Fedora 23

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.