≡

wincent.dev

  • Products
  • Blog
  • Wiki
  • Issues
You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Home » Issues » Feature request #2109

Feature request #2109: Add option to show relative paths in :CommandTBuffer

Kind feature request
Product Command-T
When Created 2013-09-11T23:37:15Z, updated 2013-09-12T15:30:41Z
Status open
Reporter anonymous
Tags no tags

Description

Add option to show relative paths when doing :CommandTBuffer, because often all buffers have the same path prefix anyway, and then the fuzzy search works worse, because irrelevant characters in the common prefix gets matched against the search.

Comments

  1. Greg Hurrell 2013-09-12T07:00:24Z

    Relative to what, exactly? Vim already uses relative paths for buffers, and Command-T uses the paths that Vim provides.

  2. anonymous 2013-09-12T07:21:27Z

    Well, when I do :pwd in Vim, I can see that I'm in C:\Users\oskarkv\Desktop\spelet. And when I do :CommandTBuffer, the buffers are listed like this:

    C:\Users\oskarkv\Desktop\spelet\src\game\client\core.clj
    C:\Users\oskarkv\Desktop\spelet\src\game\server\core.clj
    C:\Users\oskarkv\Desktop\spelet\src\game\networking\core.clj
    C:\Users\oskarkv\Desktop\spelet\src\game\utils.clj

    etc.

    But in :CommandT, the C:\Users\oskarkv\Desktop\spelet prefix is gone. I would like :CommandTBuffer to work the same way. But you said Command-T uses what Vim provides, so maybe the problem is not with Command-T. Hm...

  3. Greg Hurrell 2013-09-12T07:37:28Z

    Not entirely sure if the behavior on Windows is the same as on UNIX, but you can look at the buffer listing as provided by Vim with :ls.

    At least on UNIX, that always uses relative paths. Command-T isn't literally using the output of :ls (it's actually using the Ruby API) but on UNIX the returned strings are the same.

  4. anonymous Created 2013-09-12T15:30:41Z, edited 2013-09-13T02:59:43Z

    :ls returns

     1  h   "dev\user.clj"                 line 50
     2  a   "[Scratch]"                    line 0
     4  h + "src\game\server\core.clj"     line 60
     5 [/tags/a #a] + "src\game\client\core.clj"     line 73
     6  h   "todo.txt"                     line 69
    15 %a   "\Program Files (x86)\Vim\_vimrc" line 36

    So I guess the Ruby API does not return the same then. Maybe the Ruby code can check that somehow and strip the prefix?

Add a comment

Comments are now closed for this issue.

  • contact
  • legal

Menu

  • Blog
  • Wiki
  • Issues
  • Snippets