You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My guess would be that you have snipmate or some other plugin installed which is actually mapped to <tab>. You can confirm this using:
:verbose imap <tab>
The problem is probably due to the recent removal of the <c-n> and <c-p> mappings from supertab which doesn't affect supertab's functionality, but some plugins (the original author's version of snipmate being the most common) re-map tab and will delegate to supertab through those <c-n> and <c-p> mappings instead of the explicit <Plug>SuperTabForward and <Plug>SuperTabBackward mappings. But since the <c-n> and <c-p> mappings no longer exist in supertab, the offending plugin is now actually invoking vim's keyword completion directly, bypassing supertab entirely.
So, if you are using snipmate, you can:
Start using a more recent fork since the original author has abandoned it. garbas/vim-snipmate seems to be the most popular.
If you are using some other plugin that is triggering this issue, then first see if there is a more recent version, if not, let me know what the plugin is and I'll take a look.
That's something they would need to address. Snipmate handles this by looking for snippets first, then forwarding on to supertab if no snippets are found.
If you are using some other plugin that is triggering this issue, then first see if there is a more recent version, if not, let me know what the plugin is and I'll take a look.
Hi, when I use supertab together with jedi-vim, I met the similiar issue, this is my configuration:
let g:SuperTabDefaultCompletionType = "<c-space>"
let g:jedi#completions_command = "<c-space>"
I configured the default completion type of supertab to jedi-vim's for python scripts, and when I press tab in a python script, the cursor will move to the begining of the current line. below is what verbose imap <tab> returned
"<c-space>" isn't a valid vim insert completion keybinding, so I'm not sure that using that will work. If it doesn't, try using "<c-x><c-o>" instead since jedi does set vim's omnifunc option.
i <Tab> * <ESC>I
Last set from /.../vimrc
Somewhere in that vimrc file you've mapped <tab> to move the cursor to the beginning of the current line. If you no longer want that to be the behavior when you hit <tab>, then you'll need to remove that mapping from that file.
This is a very tricky issue, I used to use an autocmd :so % to re-source _vimrc when _vimrc is modified and saved, so at the very begining when vim is initialized and _vimrc has not been re-sourced, everything works perfectly, and later when I modify _vimrc and it get re-sourced, then the tab mapping is screwed up, which became * <ESC>I. Now I disabled _vimrc auto re-sourcing and I 'm able to use supertab and Jedi-vim together, but, still, I don't know what exactly makes my tab mapping fucked up.
This is a very tricky issue, I used to use an autocmd :so % to re-source _vimrc when _vimrc is modified and saved, so at the very begining when vim is initialized and _vimrc has not been re-sourced, everything works perfectly, and later when I modify _vimrc and it get re-sourced, then the tab mapping is screwed up, which became * <ESC>I.
Here is what is happening:
you start vim and your vimrc is loaded early in the process and creates the i <TAB> * <ESC>I mapping.
supertab is loaded later during startup and overrides you vimrc mapping with its own.
you modify your vimrc and the autocmd reloads it, re-executing your i <TAB> * <ESC>I mapping which now overrides the supertab mapping (supertab is not reloaded)
Now I disabled _vimrc auto re-sourcing and I 'm able to use supertab and Jedi-vim together, but, still, I don't know what exactly makes my tab mapping fucked up.
Simply remove the imap <Tab> <ESC>I mapping from your vimrc, problem solved.
Hi, I know you guys are genius, but none of your suggestions work.
@ervandew: I didn't find any imap <Tab> <ESC>I in my vimrc, so problem not solved.
@qstrahl: I tried to add this line to :imap <unique> <Tab> <ESC>I my vimrc, even though I saw the warning: tab mapping already exist, BUT, tab is mapped to <ESC>I anyway, when vimrc got re-sourced!
what's more, I scanned everyfile in vimfiles/autoload and vimfiles/bundle to try to find any <Tab> <ESC>I statements, but I found nothing.
That will tell you the file that last set that mapping, so there must be an imap, inoremap, etc in there that is mapping <tab>. If you're comfortable posting the contents of that file here, then I can point out the line.
source$VIMRUNTIME/vimrc_example.vim"" To open files in tabs in the instance, use command line option: "gvim -p --remote-tab-silent" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" pathogen" https://github.com/tpope/vim-pathogen" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<executepathogen#infect()
filetypepluginindenton" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" taglist" https://github.com/j5shi/vim-taglist.git" http://vim-taglist.sourceforge.net/" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<let Tlist_Auto_Highlight_Tag =1let Tlist_Auto_Open =1let Tlist_Auto_Update =1let Tlist_Close_On_Select =0let Tlist_Ctags_Cmd ='c:/ctags/ctags.exe'let Tlist_Enable_Fold_Column =0let Tlist_File_Fold_Auto_Close =1let Tlist_GainFocus_On_ToggleOpen =1let Tlist_Exit_OnlyWindow =1let Tlist_Display_Prototype =1let Tlist_Use_SingleClick =1let Tlist_Use_SingleClick =1let Tlist_Auto_Highlight_Tag =1let Tlist_Process_File_Always =1let Tlist_Show_One_File =0let Tlist_Sort_Type ="name"let Tlist_WinWidth =25let Tlist_Display_Prototype =1let Tlist_Show_Menu =1let Tlist_Max_Submenu_Items =25noremap<leader>tt :TlistToggle<CR>noremap<leader>tr <c-w>w<CR>/" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" snipmate" https://github.com/msanders/snipmate.vim" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<letg:snips_author='Jia Shi'" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" nerdtree" https://github.com/scrooloose/nerdtree.git" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<let NERDTreeChDirMode =1let NERDTreeQuitOnOpen =1let NERDTreeShowBookmarks =1let NERDTreeWinPos ="right"let NERDTreeWinSize =30let NERDTreeIgnore = ['\~$']
nnoremap<leader>ee :NERDTreeToggle<CR>nnoremap<leader>eo :NERDTree nnoremap<leader>em :NERDTreeMirror<CR>nnoremap<leader>ec :NERDTreeClose<CR>nnoremap<leader>ef :NERDTreeFind<CR>nnoremap<leader>eb :Bookmark nnoremap<leader>et :BookmarkToRoot nnoremap<leader>er :ClearBookmarks " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" nerdcommenter" https://github.com/scrooloose/nerdcommenter.git" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"<Leader>cc : Comment out the current line or text selected in visual mode."<Leader>cn : Same as <Leader>cc but forces nesting."<Leader>c<space>: Toggles the comment state of the selected line(s)."<Leader>cm : Comments the given lines using only one set of multipart delimiters."<Leader>ci : Toggles the comment state of the selected line(s) individually."<Leader>cs : Comments out the selected lines 'sexily'"<Leader>cy : Same as <Leader>cc except that the commented line(s) are yanked first."<Leader>c$ : Comments the current line from the cursor to the end of line."<Leader>cA : Adds comment delimiters to the end of line and goes into insert mode between them."<Leader>ca : Switches to the alternative set of delimiters."<Leader>cl : Same as NERDComComment except that the delimiters are aligned down the left side"<Leader>cb : Same as NERDComComment except that the delimiters are aligned down both side"<Leader>cu : Uncomments the selected line(s).let NERDSpaceDelims =1" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" jedi-vim" https://github.com/davidhalter/jedi-vim" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<letg:jedi#auto_initialization =1letg:jedi#auto_vim_configuration =0letg:jedi#completions_command ="<C-x><C-o>"letg:jedi#goto_assignments_command ="<leader>a"letg:jedi#goto_definitions_command ="<leader>d"letg:jedi#documentation_command ="<leader>k"letg:jedi#rename_command ="<leader>r"letg:jedi#usages_command ="<leader>n"letg:jedi#popup_on_dot =1letg:jedi#popup_select_first =0letg:jedi#auto_close_doc =1letg:jedi#show_call_signatures =1letg:jedi#use_tabs_not_buffers =1letg:jedi#completions_enabled =1letg:jedi#use_splits_not_buffers =""" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" supertab" https://github.com/ervandew/supertab.git" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<aufiletypepython :callSuperTabSetDefaultCompletionType("<c-x><c-o>")
letg:SuperTabDefaultCompletionType="context"letg:SuperTabContextDefaultCompletionType="<c-n>"" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" vim-markdown" https://github.com/plasticboy/vim-markdown" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<letg:vim_markdown_folding_disabled=1letg:vim_markdown_no_default_key_mappings=1setnofoldenable" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" delimitMate" https://github.com/Raimondi/delimitMate" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<letg:delimitMate_autoclose=1letg:delimitMate_matchpairs="(:),[:],{:},<:>"letg:delimitMate_quotes="\" ' ` *"letg:delimitMate_nesting_quotes= ['"','`']
letg:delimitMate_smart_quotes=1letg:delimitMate_smart_matchpairs="\" ' ` *"letg:delimitMate_excluded_regions=""letg:delimitMate_expand_cr=1" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" surround" https://github.com/tpope/vim-surround" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" ds delete surroundings" 'Hello *world!' ds' Hello world!" (123+4*56)/2 ds) 123+456/2" <div>Yo!*</div> dst Yo!" cs change surroundings" 'Hello *world!' cs'> <Hello world!>" 'Hello *world!' cs'<q> <q>Hello world!</q>" (123+4*56)/2 cs)] [123+456]/2" (123+4*56)/2 cs)[ [ 123+456 ]/2" <div>Yo!*</div> cst<p> <p>Yo!</p>" ys yank surroundings " yS yank surroundings and indent it" yss yank surroundings to the current line, ignoring leading whitespaces" ySS yank surroundings to the current line, and indent it. Ignoring leading whitespaces" Hello w*orld! ysiw) Hello (world)!" Hello w*orld! yssB {Hello world!}" S used in visual mode, wraps the selection" In linewise visual mode, the surroundings are placed on separate lines and indented. " In blockwise visual mode, each line is surrounded." gS used in visual mode, wraps the selection" In linewise visual mode, the automatic indenting is suppressed" In blockwise visual mode, this enables surrounding past the end of the line with " 'virtualedit' set " b, B, r, a Aliases for ), }, ], and >, If t or < is used, Vim prompts for an HTML/XML " tag to insert. " t pair of HTML or XML tags. See |tag-blocks| for details. " Remember that you can specify a numerical argument if " you want to get to a tag other than the innermost one." w, W, s Correspond to a |word|, a |WORD|, and a |sentence|" p Represents a |paragraph|" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" autopep8 " https://github.com/tell-k/vim-autopep8" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<letg:autopep8_ignore="E501,W293"letg:autopep8_max_line_length=99letg:autopep8_aggressive=1letg:autopep8_disable_show_diff=0" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" easy-align" https://github.com/junegunn/vim-easy-align" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" Option name Type Default Description" --------------------------------------------------------------------------------------------------------------" filter CTRL-F string Line Line filtering expression: g/../ or v/../" left_margin CTRL-L number 1 Number of spaces to attach before delimiter" right_margin CTRL-R number 1 Number of spaces to attach after delimiter" stick_to_left <Left>, boolean 0 Whether to position delimiter on the left-side" ignore_groups CTRL-G list ['String', 'Comment'] Delimiters in these syntax highlight groups are ignored" ignore_unmatched CTRL-U boolean 1 Whether to ignore lines without matching delimiter" indentation CTRL-I string k Indentation method (*k*eep, *d*eep, *s*hallow, *n*one)" delimiter_align CTRL-D string r Determines how to align delimiters of different lengths" align CTRL-A string l Alignment modes for multiple occurrences of delimitersvmap<Enter><Plug>(LiveEasyAlign)letg:easy_align_ignore_groups= []
letg:easy_align_delimiters= { 'h': { 'pattern': '-',
\ 'ignore_groups': []},
\ ':': { 'pattern': '\:',
\ 'left_margin': 0,
\ 'right_margin': 1,
\ 'ignore_groups': []},
\ '@': { 'pattern': '@',
\ 'left_margin': 0,
\ 'right_margin': 0,
\ 'ignore_groups': []},
\ '<': { 'pattern': '<<\|<=\|<',
\ 'left_margin': 1,
\ 'right_margin': 0,
\ 'ignore_groups': []},
\ '"': { 'pattern': '"',
\ 'ignore_groups': []},
\ "'": { 'pattern': "'",
\ 'left_margin': 1,
\ 'right_margin': 0,
\ 'ignore_groups': []},
\ '>': { 'pattern': '>>\|=>\|>',
\ 'ignore_groups': []},
\ '\': { 'pattern': '\\',
\ 'ignore_groups': []},
\ '/': { 'pattern': '//\+\|/\*\|\*/',
\ 'delimiter_align': 'l',
\ 'ignore_groups': []},
\ ']': { 'pattern': '[[\]]',
\ 'left_margin': 0,
\ 'right_margin': 0,
\ 'stick_to_left': 0,
\ 'ignore_groups': []},
\ ')': { 'pattern': '[()]',
\ 'left_margin': 0,
\ 'right_margin': 0,
\ 'stick_to_left': 0,
\ 'ignore_groups': []},
\ 'x': { 'pattern': ' \(\S\+\s*[;=]\)\@=',
\ 'left_margin': 0,
\ 'right_margin': 0,
\ 'ignore_groups': []},
\ }
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" Preference """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" popup menu color optionhighlightPmenu guibg=darkgrey guifg=whitehighlightPmenuSel guibg=LightYellow guifg=darkgreyhighlightPmenuSbar guibg=darkgreysyntaxenablecolorscheme molokai
setguifont=meslo_lg_l_dz:h11:cANSI
setguioptions=erRbh
setguitablabel=%tsetlaststatus=2setstatusline=%y%r%m[BUF:%n]%=%l,%c\ \ [ASCII:%b]\ \ \ \ \ \ \ [%p%%]
setnumbersetnowrapsetautoindentsetsmartindentsetformatoptions=croqj
setencoding=utf-8setautowritesetnobackupsetcompleteopt=longest,menuone
setbackspace=indent,eol,startsetclipboard=unnamed
setnospellsetspelllang=en_us
setmousemodel=popupsetsmarttabsetexpandtabsetshiftwidth=4setsofttabstop=4sethlsearchsetincsearchsetignorecasesetcryptmethod=blowfish
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" key mapping """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""inoremap<F11><ESC>:g//p<CR>nnoremap<F11><ESC>:g//p<CR>inoremap<F12><ESC>:tabnew $VIM/_vimrc<CR>nnoremap<F12><ESC>:tabnew $VIM/_vimrc<CR>inoremap<C-a><ESC>Annoremap<C-a><ESC>ggVGinoremap<C-c><ESC>lCinoremap<C-d><ESC>lDainoremap<C-i><ESC>Innoremap<C-del>gg"_dGinoremap<C-p><C-R>+cnoremap<C-p><C-R>+inoremap<C-s><ESC>:w!<CR>nnoremap<C-s><ESC>:w!<CR>inoremap<C-z><ESC>uinnoremap<C-z>uinoremap<C-y><ESC>lY$annoremapgf<c-w>gfnnoremapYy$nnoremapr<C-r>nnoremapS"_Cnnoremap;;yiw:%s///gc<Left><Left><Left><Left>vnoremap;;:s///gc<Left><Left><Left><Left>vnoremap\\:s/\\/\//gc<Left><Left><Left><Left>noremap<silent><m-w>:call ToggleWrap()<CR>function!ToggleWrap()
if &wrapsetnowrapsilent!iunmap<buffer><Up>silent!nunmap<buffer><Up>silent!iunmap<buffer><Down>silent!iunmap<buffer><Down>silent!nunmap<buffer><Home>silent!iunmap<buffer><Home>silent!nunmap<buffer><End>silent!nunmap<buffer><End>elsesetwrapinoremap<buffer><silent><Up><C-o>gknoremap<buffer><silent><Up> gkinoremap<buffer><silent><Down><C-o>gjnoremap<buffer><silent><Down> gjinoremap<buffer><silent><Home><C-o>g^noremap<buffer><silent><Home> g^inoremap<buffer><silent><End><C-o>g$noremap<buffer><silent><End> g$endifendfunction" black hole replacementnnoremapR"_Dpnnoremaprr"_ddPnnoremapriw"_diwPnnoremapraw"_dawPnnoremapri""_di"Pnnoremapri'"_di'Pnnoremapra""_da"Pnnoremapra'"_da'Pnnoremapri]"_di]Pnnoremapra]"_da]Pnnoremapri)"_di)Pnnoremapra)"_da)Pnnoremapri}"_di}Pnnoremapra}"_da}Pnnoremapri>"_di>Pnnoremapra>"_da>P" black hole changeinoremap<C-x><ESC>l"_Cnnoremap<C-x>"_Cinoremap<C-x><ESC>l"_Cvnoremapx"_cnnoremapxx"_ccnnoremapxs"_snnoremapxiw"_ciwnnoremapxaw"_cawnnoremapxis"_cisnnoremapxas"_casnnoremapxip"_cipnnoremapxap"_capnnoremapxi""_ci"nnoremapxa""_ca"nnoremapxi'"_ci'nnoremapxa'"_ca'nnoremapxi]"_ci]nnoremapxa]"_ca]nnoremapxi)"_ci)nnoremapxa)"_ca)nnoremapxi>"_ci>nnoremapxa>"_ca>nnoremapxi}"_ci}nnoremapxa}"_ca}" <ENTER>nnoremap<expr><ENTER> getpos('.')[2] == 1 ? "i<ENTER><ESC>" : "i<ENTER><ESC>"inoremap<S-ENTER><ESC><up>Jnnoremap<S-ENTER><up>Jinoremap<C-ENTER><ESC>onnoremap<C-ENTER>oinoremap<C-S-ENTER><ESC>Onnoremap<C-S-ENTER>O" <SPACE>" warning: remapping <SPACE> in insert mode " would cause abbr. And folding issue.nnoremap<SPACE>i<SPACE><ESC>lvnoremap<SPACE>Iinoremap<S-SPACE><ESC>geldwi<SPACE>nnoremap<S-SPACE>geldwi<SPACE><ESC>linoremap<expr><C-SPACE> getpos('.')[2] == 1 ? "<ESC>" : "<ESC>l"nnoremap<C-SPACE>i"" <TAB> vnoremap<TAB>>nnoremap<TAB>>>inoremap<C-TAB><TAB>vnoremap<S-TAB><nnoremap<S-TAB><<inoremap<S-TAB><BackSpace>"" <ARROW>inoremap<silent><S-left><Esc><C-v>nnoremap<silent><S-left><C-v>inoremap<silent><S-right><right><Esc><C-v>nnoremap<silent><S-right><C-v>inoremap<silent><S-up><ESC><UP><S-v>nnoremap<silent><S-up><S-v>inoremap<silent><S-down><ESC><S-v>nnoremap<silent><S-down><S-v>inoremap<silent><C-left><c-PageUp>nnoremap<silent><C-left><c-PageUp>inoremap<silent><C-right><c-PageDown>nnoremap<silent><C-right><c-PageDown>nnoremap<silent><M-left><c-o>nnoremap<silent><M-right><c-i>nnoremap<silent><M-up>#nnoremap<silent><M-down>*"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" AUTO COMMAND """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""if!exists("autocmdLoaded")
letg:autocmdLoaded=1" start with window maximized 'x' on an English Windows version. 'n' on a French oneauGUIEnter*simalt ~x" set the working directoryauBufEnter*silent!lcd%:p:hauBufEnterpythonexecutePython()
auBufEnterxmlexecuteXML()
auBufEntermarkdownexecuteMarkdown()
auBufEntertextexecutePlainText()
"" restore last view, don't change the position of it"" You might want to clean up your 'viewdir' directory now and then.auBufLeave*[._]*silentmkviewauBufReadPost,BufEnter*[._]*silentloadview" au BufWritePost _vimrc so %endif"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" USER DEFINED COMMAND """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""command! TabtoSpace :%s/\t/ /gc
command! RemoveTab :%s/\t//gc
command! ClearView :!del /Q "c:\Program Files (x86)\Vim\vimfiles\view""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" FUNCTION DEFINITION """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""function!Python()
setlocalfoldmethod=indent" fdm=syntax doesn't work properlysetlocalfoldlevel=1nnoremap<F1>/^class .*:<CR>zzinoremap<F1><ESC>/^class .*:<CR>zznnoremap<S-F1>?^class .*:<CR>zzinoremap<S-F1><ESC>?^class .*:<CR>zznnoremap<C-F1>:g/^class .*:/print<CR>inoremap<C-F1><ESC>:g/^class .*:/print<CR>nnoremap<F2>/def .*:<CR>zzinoremap<F2><ESC>/def .*:<CR>zznnoremap<S-F2>?def .*:<CR>zzinoremap<S-F2><ESC>?def .*:<CR>zznnoremap<C-F2>:g/def .*:/print<CR>inoremap<C-F2><ESC>:g/def .*:/print<CR>nnoremap<F3>/^ *[\(def\)\|\(class\)]\+ .*inoremap<F9><ESC>:wa<CR>:!python "%:p"<CR><CR>nnoremap<F9><ESC>:wa<CR>:!python "%:p"<CR><CR>inoremap<C-\><ESC>/__main__<CR>nnoremap<C-\>/__main__<CR>endfunctionfunction!XML()
" zc close a fold at the cursor." zC close all fold at the cursor." za toggle open and folder." zA toggle open and folder all." zo open fold at the cursor." zO open all below folds under cursor." zr decreases folding by one level." zR decreases all folds." zm increases more folding by level." zM increases all folds." zf creates a fold from the cursor to motion." zd deletes the fold at the cursor." zE deletes all folds." [z move to start of open fold." ]z move to end of open fold.setlocalfoldmethod=indentsetlocalfoldlevel=1inoremap<F5><ESC>zannoremap<F5>zainoremap<F6><ESC>zOnnoremap<F6>zOinoremap<S-F6><ESC>zcnnoremap<S-F6>zcnnoremap<F9>:%!"c:\Program Files (x86)\Vim\vimfiles\bundle\xmllint\xmllint-1.0.exe" % --format<CR>inoremap<F9><ESC>:% !"c:\Program Files (x86)\Vim\vimfiles\bundle\xmllint\xmllint-1.0.exe" % --format<CR>endfunctionfunction!Markdown()
nnoremap<F1>/^[ ]*#\{1}[ ].*<CR>zznnoremap<S-F1>?^[ ]*#\{1}[ ].*<CR>zznnoremap<C-F1>:g/^[ ]*#\{1}[ ].*/print<CR>nnoremap<F2>/^[ ]*#\{2}[ ].*<CR>zznnoremap<S-F2>?^[ ]*#\{2}[ ].*<CR>zznnoremap<C-F2>:g/^[ ]*#\{2}[ ].*/print<CR>nnoremap<F3>/^[ ]*#\{3}[ ].*<CR>zznnoremap<S-F3>?^[ ]*#\{3}[ ].*<CR>zznnoremap<C-F3>:g/^[ ]*#\{3}[ ].*/print<CR>nnoremap<F4>/^[ ]*#\{4}[ ].*<CR>zznnoremap<S-F4>?^[ ]*#\{4}[ ].*<CR>zznnoremap<C-F4>:g/^[ ]*#\{4}[ ].*/print<CR>nnoremap<F5>/^[ ]*#\{5}[ ].*<CR>zznnoremap<S-F5>?^[ ]*#\{5}[ ].*<CR>zznnoremap<C-F5>:g/^[ ]*#\{5}[ ].*/print<CR>nnoremap<F6>/^[ ]*#\{6}[ ].*<CR>zznnoremap<S-F6>?^[ ]*#\{6}[ ].*<CR>zznnoremap<C-F6>:g/^[ ]*#\{6}[ ].*/print<CR>nnoremap<F7>:g/^[ ]*#\{1,6}[ ].*/print<CR>nnoremap<C-F7>:0,.g/^[ ]*#\{1,6}[ ].*/print<CR>inoremap<F8><ESC>/^ *#\+ .*nnoremap<F8>/^ *#\+ .*inoremap<F9><ESC>:!start "c:\program Files (x86)\google\Chrome\Application\chrome.exe" "%:p"<CR>nnoremap<F9>:!start "c:\program Files (x86)\google\Chrome\Application\chrome.exe" "%:p"<CR>nnoremap-I-<Space><Esc>endfunctionfunction!PlainText()
inoremap<F9><ESC>:wa<CR>:!"%:p"<CR><CR>nnoremap<F9><ESC>:wa<CR>:!"%:p"<CR><CR>endfunction
Well I'm not seeing the mapping in that file, but I'm curious if that is the right file. Your original post showed Last set from /.../vimrc (I'm assuming you abbreviated the path before posting?) , and you've posted your _vimrc file, so can you confirm that the /.../vimrc in your :verbose imap <tab> output was actually the full path to your _vimrc?
sorry, my bad, it should be Last set from /.../_vimrc, and I double checked that my last post was exactly the file where Tab mapping was changed to i <Tab> * <Esc>I.
I found the configuration which causing this issue: inoremap <C-i> <ESC>I, but I still don't know how this happened. As long as I remove <C-i> mapping in insert mode, it will work fine, and I find <C-i> will cause auto completion in insert mode, that's strange since I didn't configured it specifically.
I found the configuration which causing this issue: inoremap <C-i> <ESC>I, but I still don't know how this happened. As long as I remove <C-i> mapping in insert mode, it will work fine, and I find <C-i> will cause auto completion in insert mode, that's strange since I didn't configured it specifically.
Ah yes, I forgot that due to the way vim handles keyboard input, it sees <c-i> and <tab> as the same key, so you can't map them separately.
I think I am having this problem using recent pulls of supertab and garbas/vim-snipmate.
The only SuperTab setting I have in my .vimrc is: let g:SuperTabDefaultCompletionType = "<c-x><c-o>"
Yet typically when I try to complete I get keyword completion instead of omnicompletion.
The behavior seems to be erratic.
The first time I hit tab in a file I get omnicomplete.
However after that I usually (but not always) get keyword complete when expecting omnicomplete.
I have also tried adding let g:SuperTabContextDefaultCompletionType = "<c-x><c-o>"
Activity
ervandew commentedon Apr 30, 2013
My guess would be that you have snipmate or some other plugin installed which is actually mapped to
<tab>. You can confirm this using:The problem is probably due to the recent removal of the
<c-n>and<c-p>mappings from supertab which doesn't affect supertab's functionality, but some plugins (the original author's version of snipmate being the most common) re-map tab and will delegate to supertab through those<c-n>and<c-p>mappings instead of the explicit<Plug>SuperTabForwardand<Plug>SuperTabBackwardmappings. But since the<c-n>and<c-p>mappings no longer exist in supertab, the offending plugin is now actually invoking vim's keyword completion directly, bypassing supertab entirely.So, if you are using snipmate, you can:
If you are using some other plugin that is triggering this issue, then first see if there is a more recent version, if not, let me know what the plugin is and I'll take a look.
paulstaab commentedon Apr 30, 2013
Removing the original version of snipmate solved the issue for me. Thanks.
l3pp4rd commentedon May 2, 2013
thanks, guess it would be good to place this in readme as well.
srushti commentedon May 3, 2013
That was indeed it. Using the newer version fixed it. Thanks.
ygt-luca commentedon Apr 2, 2014
Hi Eric,
I recently found that the default supertab mapping is overridden by ultisnips.
As a workaround I temporarily mapped ultisnip completion to
<s-tab>(https://github.com/lucabelmondo/bouncing-vim/commit/630f519be3cb0915404447eeb03cf4b77001d26e) but I thought to let you know.Thanks,
Luca
ervandew commentedon Apr 2, 2014
That's something they would need to address. Snipmate handles this by looking for snippets first, then forwarding on to supertab if no snippets are found.
ygt-luca commentedon Apr 2, 2014
Ah, cool, thanks for letting me know. I will post an issue for ultisnips then :-)
fespinoza commentedon Jul 24, 2014
just to clarify... when you execute
:verbose imap <tab>the result should saySnippmate...and at least with Vundle, the plugin inclussion with
should be after the snipmate bundle definition... at least in my configuration
j5shi commentedon Nov 29, 2014
Hi, when I use
supertabtogether withjedi-vim, I met the similiar issue, this is my configuration:I configured the default completion type of supertab to jedi-vim's for python scripts, and when I press
tabin a python script, the cursor will move to the begining of the current line. below is whatverbose imap <tab>returnedervandew commentedon Dec 2, 2014
"<c-space>"isn't a valid vim insert completion keybinding, so I'm not sure that using that will work. If it doesn't, try using"<c-x><c-o>"instead since jedi does set vim'somnifuncoption.Somewhere in that vimrc file you've mapped
<tab>to move the cursor to the beginning of the current line. If you no longer want that to be the behavior when you hit<tab>, then you'll need to remove that mapping from that file.j5shi commentedon Dec 3, 2014
This is a very tricky issue, I used to use an autocmd
:so %to re-source _vimrc when _vimrc is modified and saved, so at the very begining when vim is initialized and _vimrc has not been re-sourced, everything works perfectly, and later when I modify _vimrc and it get re-sourced, then the tab mapping is screwed up, which became* <ESC>I. Now I disabled _vimrc auto re-sourcing and I 'm able to use supertab and Jedi-vim together, but, still, I don't know what exactly makes my tab mapping fucked up.ervandew commentedon Dec 3, 2014
Here is what is happening:
i <TAB> * <ESC>Imapping.i <TAB> * <ESC>Imapping which now overrides the supertab mapping (supertab is not reloaded)Simply remove the
imap <Tab> <ESC>Imapping from your vimrc, problem solved.qstrahl commentedon Dec 3, 2014
Alternatively, use
:imap <unique> <Tab> <ESC>Iso that it only creates the map if nothing is mapped to<Tab>.j5shi commentedon Dec 4, 2014
Hi, I know you guys are genius, but none of your suggestions work.
@ervandew: I didn't find any
imap <Tab> <ESC>Iin my vimrc, so problem not solved.@qstrahl: I tried to add this line to
:imap <unique> <Tab> <ESC>Imy vimrc, even though I saw the warning:tabmapping already exist, BUT, tab is mapped to<ESC>Ianyway, when vimrc got re-sourced!what's more, I scanned everyfile in
vimfiles/autoloadandvimfiles/bundleto try to find any<Tab> <ESC>Istatements, but I found nothing.ervandew commentedon Dec 4, 2014
When you run
That will tell you the file that last set that mapping, so there must be an
imap,inoremap, etc in there that is mapping<tab>. If you're comfortable posting the contents of that file here, then I can point out the line.j5shi commentedon Dec 4, 2014
@ervandew: that's my _vimrc
ervandew commentedon Dec 4, 2014
Well I'm not seeing the mapping in that file, but I'm curious if that is the right file. Your original post showed
Last set from /.../vimrc(I'm assuming you abbreviated the path before posting?) , and you've posted your_vimrcfile, so can you confirm that the/.../vimrcin your:verbose imap <tab>output was actually the full path to your_vimrc?j5shi commentedon Dec 5, 2014
sorry, my bad, it should be
Last set from /.../_vimrc, and I double checked that my last post was exactly the file whereTabmapping was changed toi <Tab> * <Esc>I.That's really weird.
j5shi commentedon Dec 6, 2014
I found the configuration which causing this issue:
inoremap <C-i> <ESC>I, but I still don't know how this happened. As long as I remove<C-i>mapping in insert mode, it will work fine, and I find<C-i>will cause auto completion in insert mode, that's strange since I didn't configured it specifically.ervandew commentedon Dec 6, 2014
Ah yes, I forgot that due to the way vim handles keyboard input, it sees
<c-i>and<tab>as the same key, so you can't map them separately.j5shi commentedon Dec 6, 2014
omg, then everything can be explained, thank you Eric.
evencoil commentedon Jan 17, 2016
I think I am having this problem using recent pulls of supertab and garbas/vim-snipmate.
The only SuperTab setting I have in my .vimrc is:
let g:SuperTabDefaultCompletionType = "<c-x><c-o>"Yet typically when I try to complete I get keyword completion instead of omnicompletion.
The behavior seems to be erratic.
The first time I hit tab in a file I get omnicomplete.
However after that I usually (but not always) get keyword complete when expecting omnicomplete.
I have also tried adding
let g:SuperTabContextDefaultCompletionType = "<c-x><c-o>"But this doesn't change anything.
verbose imap returns:
<Plug>snipMateNextOrTriggerAm I doing something wrong?
nerdpad commentedon Dec 1, 2016
@atorg Did you solve your issue? I have the same problem.