opened
thornomad
username_0
<!-- Check all that apply [x] -->
- Category
    - [x] Question
    - [ ] Bug
    - [ ] Suggestion
- OS
    - [ ] Linux
    - [x] macOS
    - [ ] Windows
    - [ ] Etc.
- Vim
    - [ ] Vim
    - [x] Neovim

I have a question about the order of results -- when I use `:GitFiles` and type in a partial file name, I tend to get the results in an order I would expect.  However, when I use `:Buffers` and start typing, the order is different.  How can I make `:Buffers` behave like `:GitFiles` ?  

### preferred order (see first hit) output `:GitFiles`
![image](https://user-images.githubusercontent.com/124717/53893044-45570380-3fe2-11e9-9729-58a7d57b6cb8.png)

### what I am getting with `:Buffers` (the `slip.rb` file that I would expect is far at the top)
![image](https://user-images.githubusercontent.com/124717/53893190-8e0ebc80-3fe2-11e9-8e17-4a5cd83770b1.png)


The file I am expecting with `:Buffers` is not the first choice as it is with `:GitFiles`.

Thanks in advance for any help.
Results order differs between :GitFiles/:Files and :Buffers
issue
created
junegunn
username_1
`:Buffers` command lists open buffers in MRU-order (most recently used), and the difference in the initial orderings seems to affect the final result in your case. There's no easy way to fix this, as fzf is a general-purpose text filter rather than a file selector, the sorting algorithm is not specifically tailored for file paths.

*A good way to prioritize `slip.rb` is to append `.` at the end of your query.* e.g. `slip.` or `s.`.

The entry with `slip` in its file name component gets a better score over the ones with `slip` in directory names, because in that case, `slip` is closer to `.`.
comment
closed
junegunn
username_1
issue
created
thornomad
username_0
Thank you for the detailed response -- that tip about adding the `.` at the end of the query really helps in many situations.  Thank you!  I may look at changing the order of the buffers to align more with out the GitFiles sorts them ... maybe that would help.  Thanks again for these tools!
comment