-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
auto show available tab completion for :open and :tabopen #253
Comments
Hm, this is one of those features that make software slow. And as I know it fomr pentadactyl it's really slow. This would generate some list of possible completions as the user types in any url. I don'tthink that it makes much sense to show a list of completions without user requested it by pressing Tab or Shift-Tab. I don normally type in some significant parts of the url separated by space and press Tab and get a really short list of items where I pick up the one I think that's the right. |
The problem with this, and the whole completion system in general, is that once Tab has been pressed, the first item from a completion list is pasted into the input field, which erases the initial query. So it becomes impossible to append something to it or to change it. Maybe it would be better just to show the corresponding completion list on the first Tab press to let the user to append/change something in the inital query, and only on the second Tab press actually paste the first completion item into the input field. And on a side note, why not unite completion lists for :open and :tabopen? It seems quite reasonable for these two commands to have a common completion list, and I cannot think of any argument against it. |
Ah, I you like to cahnge the initial contenty you typed after you sen the too long completion list. This would be a nice feature I think too, but it's not what the users who know vim would expect. But if we have this current behavior as fallback this should be no showstopper.
Don't know if I understand you right. But the urls that are completed for the |
Sorry, my bad. I really wanted to refer to another problem, but while I typed the text, the two issues got mixed up in my head. The actual problem is that I often use to look back at what I typed before. For example, I use :open and then after some time I can do :tabopen and I expect to see the (because I don't remember which of the two command I run to open that URL) , but since I used :open for it, it will not show up. I don't know if there are any other people with the same kind of problem. But I also don't know how to get around it. I often use these two commands for a web-search, and after some time I may want to change something in the initial query and run the search again. I would like to do it independently of the way I run the previous search (with :open or :tabopen). |
With |
Possibility to change initial content user typed after tab completion list is shown is something I would like to have in vimb. This is exactly what vimperator does by auto generating tab completion list. I can type small part of url and I instantly see what completions are available. |
@fanglingsu wrote
Yes.
I see. But haven't you ever fallen into the problem I described above? I understand your intention to make Vimb more like Vim, but Vim isn't perfect, and an enormous amount of plugins for it is an example of this fact. What's the point of cloning shortcomings of Vim? It may be useful only for those Vim users who've got used to some quirks inside Vim. People who don't want to get used to these quirks just use plugins or tweak Vim to get a satisfactory behavior. I think the main strength of Vim is that you can easily change it to suit your needs, and not its defaults. Since Vimb is not as customizable, it is wise to make it more usable by itself, even for users who are not very familiar with Vim, or users who change the standard Vim behavior to their preference. I've expressed my opinion not particularly on this issue but rather on the future of Vimb. I'm probably not the right person to say all this, I haven't contributed a line into the project. But I've been using Vimb for quite a long time and it almost always does what I want. Thank you! Let's return to the command history. If I am the only one affected by the issue, then I would like to know how others avoid it. The only possibility I see is to use @serpent7776 wrote
What shell are you using? For example, this is what Zsh does, and Bash does a similar thing. The place where I use completion the most is on the command line. The completion system there is qute simple yet effective. On the other hand, the completion system of Vim always seemed to me clumsy. It's either not simple, or it is not effective. I have nothing against the "complete as you type" idea if it is available as an option. Some people don't like when software becomes too "interactive". |
I don't use the command history in conjunktion with :open or :tabopen. Mostly I use it for settings and some fancy JavaScript one liners @serpent7776 To summarize there are two issues.
|
@serpent7776 I would like to avoid to insert a new keybinding like |
@fanglingsu appending typed text to tab completion list seems a good way to fix this issue for me. |
@serpent7776 wrote
Zsh does the same but after showing you possible commands, it allows you to cycle through them by pressing @fanglingsu wrote
Sounds good to me. About the second issue, I have an idea in mind. Can we introduce a new symbol for completion like it is done with completion for bookmarks? Let's say
The user can type
and so on. Of course, it would be nice to extend it a little bit further. For example, by typing |
This patch adapts the vim behaviour. If you reach the end of the possible completion items, the initial content is written to the inputbox. This makes it easier to change the filter string to reduce the completion by simply step right to the very last entry with <S-Tab>.
So I implemented the appending of the inital content as the item after the last real completion item. So if the completion list is to long, you can jumpt with @cdlscpmv Kan you explain the logik behind the new |
I think it should work in exactly the same way as
Exactly. It is similar to what |
@cdlscpmv I think if we introduce another char like |
@fanglingsu This is a very good idea. |
OK, I've transfered the idea of the external tool for the completion into a new issue. So we can close this. |
Changes: The new vimb 2.11 is now released. With some new features and important bug fixes. I thank following people for providing ideas and patches: - Benjamin Petrenko - Chris Salzberg - Dmitrij D. Czarkoff - Jiri Marsicek - Leonardo Taccari - PLR - Yutao Yuan Added * Added hint-number-same-length option * VERBOSE flag to Makefile to toggle verbose make on * `<Esc>` removes selections in normal mode * Support for multiple configuration profiles. New parameter `-p` or `--profile` * Adds support for contenteditable attribute as input mode trigger [#237](fanglingsu/vimb#237) * Added `^` as normal mode alias of `0` [#236](fanglingsu/vimb#236) * Added :source command to source a config file * Added path completion for :save command too * Added closed-max-items option to allow to store more than one closed page Changed * Set only required CFLAGS * Replaced `-Wpedantic` with `-pedantic` CFLAGS for older gcc versions * Check for focused editable element as soon as possible * Do not blur the focused element after alt-tabbing * Show typed text as last completion entry to easily change it [#253](fanglingsu/vimb#253) Fixed * Fixed [#224](fanglingsu/vimb#224): Wrong URL and titles shown in case one or more pages could not be loaded. * Fixed Makefile install target using -D * Fixed [#232](fanglingsu/vimb#232): Fixed misplaced hint labels on some sites * Fixed [#235](fanglingsu/vimb#235): Randomly reset cookie file * Fixed none POSIX `echo -n` call
Import behaviour from vimperator where
:open
and:tabopen
automatically show panel with available tab completion entries. Currently when I enter:open goo
I don't know what completions are available until I press<TAB>
, but then address part that I've typed is replaced with first completion which might not be what I wanted.This could be enabled by setting to keep default behaviour.
The text was updated successfully, but these errors were encountered: