Filename completion

3 views
Skip to first unread message

ylixir

unread,
Apr 18, 2011, 2:48:49 AM4/18/11
to ya...@googlegroups.com
Filename completion has been minimally implemented, but isn't quite right.

Let's discuss the specific behavior for the completion that will make the thing super efficient to use, but also super intuitive to figure out too, heh.

Number one: tab in vim and bash completes file names. this is awesome. tab in gui programs switches to the next gui element. this is also win, but not compatible with bash behavior. which should we go with, or something else altogether?

Right now i'm thinking tab will cycle through completions, ala bash, and escape will bail and switch focus to the editor pane.

Another option is to make tab switch focus to the drop down completion list, this has the advantage of not breaking the expected behavior of tab as much as the above option, but may sacrifice usability.

Another thing to consider is what the completion list should contain. Right now it has the full path of the possible completions, i'm thinking about switching that to only the last part of the path, or streamlining the display with ellipses. One thing to be aware of is matches from multiple sources. For example: typing "code" should match "~/code, /code, c:\code, etc".

Windows is kind of a mess also. Drive letters are really a mess. Should typing "c:" give completions for the working directory on the "c:" drive? the root of the "c:" drive? should typing in "code" drop completions for all possible drives (c:\code, d:\code, e:\code, etc)?

Home directory expansion needs some work too. Should the list show "/home/name/etc", or "~/etc"?

Jarrett Wold

unread,
Apr 27, 2011, 3:04:08 PM4/27/11
to yaed
> Number one: tab in vim and bash completes file names. this is awesome. tab
> in gui programs switches to the next gui element. this is also win, but not
> compatible with bash behavior. which should we go with, or something else
> altogether?
> Right now i'm thinking tab will cycle through completions, ala bash, and
> escape will bail and switch focus to the editor pane.

>
> Another option is to make tab switch focus to the drop down completion list,
> this has the advantage of not breaking the expected behavior of tab as much
> as the above option, but may sacrifice usability.

Maybe there could be a compromise. Using key combinations to affect
behavior. Ex: shift-tab


> Another thing to consider is what the completion list should contain. Right
> now it has the full path of the possible completions, i'm thinking about
> switching that to only the last part of the path, or streamlining the
> display with ellipses. One thing to be aware of is matches from multiple
> sources. For example: typing "code" should match "~/code, /code, c:\code,
> etc".

I'm thinking ellipses after a certain character limit is reached for
the path.


> Windows is kind of a mess also. Drive letters are really a mess. Should
> typing "c:" give completions for the working directory on the "c:" drive?
> the root of the "c:" drive? should typing in "code" drop completions for all
> possible drives (c:\code, d:\code, e:\code, etc)?

Maybe using unix style pathing would work ".\" for working directory
and "c:\" for root of the drive

> Home directory expansion needs some work too. Should the list show
> "/home/name/etc", or "~/etc"?

I personally like "/home/whatever/" but whether that's good for the
design I don't know.

ylixir

unread,
Apr 28, 2011, 2:44:24 PM4/28/11
to ya...@googlegroups.com
For now i'm basically just dumping filenames to the system functions and letting them work it out, so c:whatever points to the working directory on the c drive and d:whatever points to the working directory on the d drive, .\ works as expected, etc.

i put in some manual code to expand ~ but it does it at the last possible minute, just before it hits the filesystem. As i'm thinking about it now, this will cause a bug with multiple tabs/same file. For example, the program won't know that ~/code and /home/user/code are the same file and so will not synchronize them. I'm inclined to open a bug report and push forward without worrying about that for now.

I've done some tweaks since the last time i had you try out the program, they up on google code, but haven't uploaded a windows binary or anything yet. Right now the major annoyance for me is that autocompleting a directory doesn't append the directory separator automatically. I think i'm gonna fix that next.

Jarrett Wold

unread,
Apr 30, 2011, 8:22:05 PM4/30/11
to yaed
How do I save? I grabbed the new build and tried ctl-s and it was
saving. Also is the settings icon off to the right supposed do
anything?

A refinement on my opinion with the tabbing behavior

Start typing in your path, tab should cycle through the list box
elements, enter selects and opens.
Reply all
Reply to author
Forward
0 new messages