Skip to content
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

support line and file completion #2141

Open
jab opened this issue Nov 13, 2017 · 8 comments
Open

support line and file completion #2141

jab opened this issue Nov 13, 2017 · 8 comments

Comments

@jab
Copy link

jab commented Nov 13, 2017

  • Click thumbs-up 👍 on this issue if you want it!
  • Click confused 😕 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


Is this a BUG REPORT or FEATURE REQUEST? (choose one): FEATURE REQUEST

In stock Vim you can press <C-X><C-L> to complete the rest of the current line from all matching lines in all open buffers. You can also press <C-X><C-F> to complete the current path from matching paths on the filesystem. Might there be any interest in adding support here for these powerful features? Thanks for your consideration and for the great work on VSCodeVim!

Environment:

  • VSCode Version: 1.18.0
  • VsCodeVim Version: 0.10.2
  • OS: macOS 10.12.6
@jab
Copy link
Author

jab commented Nov 13, 2017

@jaanauati
Copy link

this is called ctrl-x mode:
http://vimdoc.sourceforge.net/htmldoc/insert.html#i_CTRL-X
and it seems that it is also not working in neovim mode: ('vim.enableNeovim': true`)
thanks.

@xlucas
Copy link

xlucas commented May 2, 2018

This is something I miss a lot particularly in documentation to complete sentences with similar constructs.

@shawnaxsom
Copy link
Contributor

I can take this one. I looked at a line completion solution this morning. I have line completion working by just going through lines of visible editors and matching startsWith of the current line. If performance is fine with many files open then hopefully that is all we need.

@shawnaxsom
Copy link
Contributor

Quick update after I discussed with @Chillee. The completion UI will probably look like this:

https://cl.ly/5526d0bc36df

I am assuming this will be fine for users. You can still search through that quick pick list, it is just unexpected UI.

The issue is that vscode doesn't appear to allow you to open a standard completion list at the cursor with just your own entries. You can register a CompletionItemProvider, and trigger the completion menu to open, but your completions are mixed with other completions in the context. If you try to do a line completion where the previous character before the cursor is a space, then you get a huge list of completions and it is then difficult to find the actual line completions.

@shawnaxsom
Copy link
Contributor

PR is up with #3048 for line completion. I may look at file completion after that is merged. It will likely behave similarly, using Quick Pick.

@tehmasterer
Copy link

Is autocomplete for file paths (C-X><C-F>) still planned?

@adamency
Copy link

Yes please, file completion is one of the best text editing feature of Vim, and an enormous help for any DevOps/sysadmin workflow. Can you update us on the status ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants