vim 按tab补全 并取消 “按Enterg确定的提示”

tab补全

1 function! CleverTab()
2     if strpart( getline('.') ,0,col('.')-1) =~'^\s*$'
3         return "\<Tab>"
4     else    
5         return "\<C-N>"
6     endif   
7 endfunction
8 inoremap <Tab> <C-R>=CleverTab()<CR>

 

 

取消提示

set shortmess=a
set cmdheight=2  

https://www.jianshu.com/p/79f3a5eb32dd?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

posted @ 2021-01-08 20:22  miaorn  阅读(271)  评论(0编辑  收藏  举报