function! TabOrCompletion() let col = col('.') - 1 if col==0 || getline('.')[col - 1] !~ '\k' return "\" else return "\" endif endfunction inoremap =TabOrCompletion()