home archives github knives links
tags vim
categories
only title title and content
vimscript笔记

资料

函数

函数调用

inoremap <expr><tab> Func()
inoremap <tab> <c-r>=Func()<cr>
inoremap <tab> <esc>:call Func()<cr>a

外部函数调用

file.vim中定义

function file#main()
...
endfunction

在其他文件

call file#main()

系统函数

命令

自定义命令

command! On call MyFunction()

变量

变量的作用域

访问变量

特殊字符/按键

关于vim-sb-complete

地址

-https://github.com/NiaBie/vim-sb-complete1
-https://github.com/NiaBie/vim-sb-complete2
-https://github.com/NiaBie/vim-sb-complete3

手册查询

踩过的坑

字符及转义

let g:sbcom_isword = ["[0-9a-zA-Z:_]"]
let g:sbcom_issplit = ["`", "\\~", "!", "@", "#", "\\$", "%", "\\^", "&", "*", "(", ")", "-", "=", "+", "[", "{", "]", "}", "\\", "|", ";", "\'", "\"", ",", "<", "\\.", ">", "/", "?", " ", "\t", "\n"]