![]() I had already seen this plugin, but I simply didn't understand the plugin based on the readme file. I installed supertab and it does exactly what I want - completions are shown when appropriate, snippets are expanded if any, else a character is inserted. UPDATE The first question is not valid anymore. What does your key do in vim (generally vs in insert mode)? Maybe I could learn something. I'm just wondering if maybe anyone knows of a way to integrate a third else ifblock in the original function to check for snippets. I also mapped shift-tab to expand triggers, but it's just not the same, and feels a bit clumsy every time. ![]() I am currently simply using to show my completions, which isn't all to bad. This makes Ultisnips take-over the previous mapping, no more Tab_Or_Complete() action. ![]() Next I wanted to get some snippet action going: let g:UltiSnipsExpandTrigger="" Before I used any snippets in vim, I found this function that inserts a tab or expands autocompletion according the context. My attempted solution: Firstly, I use UltiSnips for snippet pleasure. It inserts a tab (or spaces), it auto-completes the current word or it expands a snippet. My problem: Tab has many uses in most IDE's. If you need this, you will have either use the original version which applies regardless of what the wildmenu is completing, or use a more complicated regular expression to check for all the commands where you need the mappings to be in effect.I'm wondering how other vimmers handle the behavior of the key. Unfortunately, I couldn't find any way of checking whether the wildmenu is completing filenames ( complete_info() only appears to work for insert mode completion, and I couldn't find a similar function for command-line completion), so there doesn't appear to be a better method of applying it to all filename wildmenu completions. If you also need the mappings to work for the other variants of the :e command: :ed, :edi, and :edit, you can instead use a regular expression: set wildcharm=Ĭnoremap getcmdline() =~# edit_re
0 Comments
Leave a Reply. |