XVim
XVim copied to clipboard
Able to toggle through autosuggestion list using tab instead of the arrow key.
I believe it would be a handy feature
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.
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?
.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)
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.
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.
I followed your suggestion and override the key bindings here:
Thanks very much.