XVim icon indicating copy to clipboard operation
XVim copied to clipboard

Able to toggle through autosuggestion list using tab instead of the arrow key.

Open chaekit opened this issue 12 years ago • 6 comments

I believe it would be a handy feature

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/900188-able-to-toggle-through-autosuggestion-list-using-tab-instead-of-the-arrow-key?utm_campaign=plugin&utm_content=tracker%2F252770&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F252770&utm_medium=issues&utm_source=github).

chaekit avatar Dec 02 '12 06:12 chaekit

What you mean is to select an item in the auto suggestion list by tab key?

I wonder if this is really a Vim's feature... I do knot know well how Vim's auto completion works but as far as I know Vim is using "C-n" and "C-p" to select item in a suggestion list.

Anyway I would like to implement to select an item in auto suggestion list by C-n or C-p and you can remap the key by .xvimrc I think.

JugglerShu avatar Dec 03 '12 06:12 JugglerShu

Xcode shows a list of autocompletion as you type. In my Vim, I have to press tab to see a list of options, and I use tab again to scroll through the list. In Xcode, you can only do that using the arrow keys. I just thought that it would be a handy feature since users don't need to use the arrow keys at all :)

And I just forked the repo last night so I am very new to the code base and setup. Where can I find .xvimrc?

chaekit avatar Dec 03 '12 06:12 chaekit

.xvimrc is just a config file for XVim. Its just like .vimrc file of Vim. You can put the file in your home directory.

I think to implement autocompletion related features you need to interact with DVTCompletionTextView or related classes' methods. Where you should implement it would be in XVimInsertEvaluator.m ( since auto compleltion works when you are in insert mode)

JugglerShu avatar Dec 03 '12 08:12 JugglerShu

I'm trying to remap "C-n" and "C-p" functionality to "C-j" and "C-k" respectively in .xvimrc to navigate the autocomplete menu but it doesn't seem to work. Any ideas how I could get this to work? It would be really convenient since my my fingers are already on the home-rows.

gaza3g avatar Mar 03 '14 06:03 gaza3g

Currently, the input into only text areas are intercepted and remapped. It means key inputs into other areas are not processed by XVim...

I do not know if it works well but my current suggestion is to see if you can remap keys with Xcode default key remapping system.

JugglerShu avatar Mar 03 '14 07:03 JugglerShu

I followed your suggestion and override the key bindings here: screen shot 2014-03-03 at 3 57 23 pm

Thanks very much.

gaza3g avatar Mar 03 '14 07:03 gaza3g