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

Inserting a literal tab #49

Closed
lencioni opened this issue Sep 17, 2012 · 2 comments
Closed

Inserting a literal tab #49

lencioni opened this issue Sep 17, 2012 · 2 comments

Comments

@lencioni
Copy link

It would be nice if there was an easy way to insert a literal tab instead of triggering auto completion. Other editors have solved this problem by binding <Shift> + <Tab> to insert a literal tab.

@skeept
Copy link

skeept commented Sep 17, 2012

If you desire that behavior just put in your .vimrc

:inoremap pumvisible() ? "" : ""

this way you still use tab for completion and if you are already in the
midle of a a completion you can use to go back and forth in the
completion options, but if you are just typing, then hitting shift-tab will
just insert a tab.

On second though, the .vimrc file may not be the correct place to put the
above line, you may have to create a file in .vim/after/plugin and put that
line there (the name doesn't really matter) so that file is sourced after
all the plugins are sourced.

Note that supertab does have a variable that you can set in your .vimrc
that specifies the mapping you would use to insert a literal tab:
g:SuperTabMappingTabLiteral.
The default value for this is ctrl-tab which is pretty close to shift-tab.

On Mon, Sep 17, 2012 at 3:20 PM, Joe Lencioni notifications@github.comwrote:

It would be nice if there was an easy way to insert a literal tab instead
of triggering auto completion. Other editors have solved this problem by
binding + to insert a literal tab.


Reply to this email directly or view it on GitHubhttps://github.com//issues/49.

@ervandew
Copy link
Owner

It would be nice if there was an easy way to insert a literal tab instead of triggering auto completion. Other editors have solved this problem by binding <Shift> + <Tab> to insert a literal tab.

<S-Tab> is used for scrolling through the completions in reverse. You can set g:SuperTabMappingTabLiteral to define your own mapping for inserting a literal tab. Note that the default for g:SuperTabMappingTabLiteral (<c-tab>) doesn't work for vim in the terminal because of limitations w/ vim's character input when running in a terminal.

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

No branches or pull requests

3 participants