Encoding is always a headache issue.
After change the encoding to utf-8, I can't switch tabbar by alt-k.
There're many docs about vim encoding and alt/meta issue.
I find a solution. mapping it after change encoding:
hook the encoding change by:
:au EncodingChanged * :call <SID>Set_Tab_switch_shortcut()
implementate Set_Tab_switch_shortcut:
function! s:Set_Tab_switch_shortcut()
if mapcheck('^[1') == "" && mapcheck('<M-1>') == "" "if unique is used by mapping, need these judgements.
... " copy the mapping from tabbar.vim
endif " %%
endfunction
useful links:
http://vim.wikia.com/wiki/Get_Alt_key_to_work_in_terminal
http://vim.wikia.com/wiki/Mapping_fast_keycodes_in_terminal_Vim
http://hi.baidu.com/cs_peanuts/blog/item/3cee4ff0c0cd4a19b17ec5f3.html
still have encode issue after change encoding.
It's the encoding of console and dialog output.
add the following code in Set_Tab_switch_shortcut():
if &encoding == "utf-8"
language message zh_CN.utf-8
endif
if &encoding == "cp936"
language message zh_CN
endif
useful link: