当前位置:网站首页>vim备份历史命令
vim备份历史命令
2022-06-23 13:36:00 【fqbqrr】
vim自身的历史命令好像有问题,我们自己备份一份.
fun! Lsks()
//"历史开始.
let s:k=histnr("cmd")
endf
fun! Lsjs()
//历史结束.文件中历史命令.
//应该是打开文件前,取前后,历史命令,再全部加至`历史命令.vim`.
let s:j=histnr("cmd")
if s:k==s:j
return
//没有变化,直接返回.
endif
let l=[]
//:call Qjzl(s:k,s:j,l)
:call Qjls(s:k,s:j,l)
call Glkh(l)
//过滤空行.
//要取历史内容.
let s:ls=$XVIM."/历史命令.vim"
//echo l
call Jlrl(s:ls,l)
//自动添加.或者`删历史`.
endf
au VimEnter * :call Lsks()
au VimLeave * :call Lsjs()
//写在vim进入或退出后,
只需要在VimEnter和VimLeave时,每次调用一下,就完成了.
边栏推荐
- KS007基于JSP实现人个人博客系统
- Technology sharing | do you understand the requirements of the tested project?
- SQLserver2008r2安装dts组件不成功
- MIT 6.031 reading5: version control learning experience
- Web technology sharing | [Gaode map] to realize customized track playback
- KS003基于JSP和Servlet实现的商城系统
- 腾讯云TDSQL-C重磅升级,性能全面领跑云原生数据库市场
- 同花顺是股票用的么?现在网上开户安全么?
- KS008基于SSM的新闻发布系统
- 【深入理解TcaplusDB技术】单据受理之表管理
猜你喜欢

3 interview salary negotiation skills, easily win 2K higher than expected salary to apply for a job

The company has only one test, but the leader asked me to operate 1000 mobile numbers at the same time

ICML 2022 𞓜 context integrated transformer based auction design neural network

微信小程序之在wx:for中绑定事件

如何正确计算导入Excel的行数(POI/NPOI)

Error when Oracle enters sqlplus

vulnhub靶机Os-hackNos-1

Acquisition of wechat applet JSON for PHP background database transformation

Wechat applet pop up the optional menu from the bottom

Actual combat | how to make a slam track truth acquisition device?
随机推荐
php接收和发送数据
WPF (c) new open source control library: newbeecoder UI waiting animation
首个大众可用PyTorch版AlphaFold2复现,哥大开源OpenFold,star量破千
2021-04-15
Basic data types of C language and their printouts
When pandas met SQL, a powerful tool library was born
微信小程序之flex属性
【无标题】
Detailed explanation of serial port, com, UART, TTL, RS232 (485) differences
[in depth understanding of tcapulusdb technology] how to realize single machine installation of tmonitor
【深入理解TcaplusDB技术】TcaplusDB导入数据
微信小程序之在wx:for中绑定事件
渗透测试-提权专题
Low grain prices hurt farmers, low wages hurt farmers!
Shell process control - 39. Special process control statements
如何正确计算导入Excel的行数(POI/NPOI)
PHP receiving and sending data
Is flush a stock? Is it safe to open an account online now?
What does it mean for AI developers after 2022
[deeply understand tcapulusdb technology] tmonitor background one click installation