微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

VIM:let g:,let b:等之间有什么区别?

我经常看到在vim插件类似这样:
let g:variable
let b:variable
let l:variable

我对vim文档和互联网上的这些字母’g’,’b’,’l’进行了长时间的研究,但我发现注意到。

那么这些字母对应是什么呢?什么是完整的字母表?

请参阅:help internal-variables

它列出以下类型:

                (nothing) In a function: local to a function; otherwise: global 
buffer-variable    b:     Local to the current buffer.                          
window-variable    w:     Local to the current window.                          
tabpage-variable   t:     Local to the current tab page.                        
global-variable    g:     Global.                                               
local-variable     l:     Local to a function.                                  
script-variable    s:     Local to a :source'ed Vim script.                     
function-argument  a:     Function argument (only inside a function).           
vim-variable       v:     Global,predefined by Vim.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐