Git Product home page Git Product logo

Comments (4)

ervandew avatar ervandew commented on September 14, 2024

Hmm, seems to work fine for me. Do you have paste (:set paste?) enabled in your command window?

from supertab.

mimooh avatar mimooh commented on September 14, 2024

from supertab.

mimooh avatar mimooh commented on September 14, 2024

I figured it out somewhat. Fist thing is that we may use different compilations of vim:

"When Vim was compiled without the +cmdline_compl feature only file names,
directories and help items can be completed. The number of help item matches
is limited (currently to 300) to avoid a long delay when there are very many
matches."

I finally noticed I have this behaviour for :imap <Tab>
In a normal window:

i  <Tab>         <Plug>SuperTabForward

In the command line window:

i  <Tab>        @<C-X><C-V>
i  <Tab>         <Plug>SuperTabForward

Then I found the exactly same, unresolved problem that I face:
https://groups.google.com/forum/#!topic/vim_use/EX93BOy4XZM/discussion

QUOTE
I am trying to disable the default mapping for the tab key to @A in command window. according to :h command-line-window, adding the following two lines in .vimrc should do the job but it doesn't to my test.
au CmdwinEnter [:>] iunmap
au CmdwinEnter [:>] nunmap
below is the min repo vimrc I observed this behavior.
set nocompatible
au CmdwinEnter [:>] iunmap
au CmdwinEnter [:>] nunmap

once in command window (either by : then ctrl-f, or q: in normal mode), :map still shows "n @A", which conflicts/overwrites my other mapping for the tab key.

set wildchar= seems to avoid the default mapping, but I do want to use tab for auto-completion in vim. I also tried tightening the scope of non-tab wildchar with
au CmdwinEnter [:>] set wildchar=
au CmdwinLeave [:>] set wildchar=
but this doesn't work either.

meanwhile, with vim help recommended setting, I always got this error on entering command window:
Error detected while processing CmdwinEnter Auto commands for "[:>]":
E31: No such mapping
Press ENTER or type command to continue

it feels like by the time CmdwinEnter is triggered, the default tab mapping is not injected yet, and somehow it comes in at a later phase, but still before my "set wildchar=" takes effect, which is really confusing.

how can I disable them permanently? I am on vim 8.0.1420. thanks.
END OF QUOTE

from supertab.

mimooh avatar mimooh commented on September 14, 2024

As inspect it further, I can see that <S-Tab> is not affected by this, as I understand, broken vim behaviour. So this solves the issue for me: I will go with shift tab always.

from supertab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.