当前位置:网站首页>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实现人个人博客系统
- [in depth understanding of tcapulusdb technology] tcapulusdb business data backup
- Execute the sc.exe QC command to query some services. The data area passed to the system call is too small
- How to install the DTS component of SQL server2008r2 on win10 64 bit systems?
- Interrupt and polling
- 【深入理解TcaplusDB技术】 Tmonitor模块架构
- 系统设计与分析-技术报告-定时清理验证码的一种解决方案
- 微信小程序之下拉菜单场景
- Unity realizes the function of playing Ogg format video
- 【深入理解TcaplusDB技术】Tmonitor系统升级
猜你喜欢

Shutter clip clipping component

微信小程序之input调整
![[in depth understanding of tcapulusdb technology] how to realize single machine installation of tmonitor](/img/6d/8b1ac734cd95fb29e576aa3eee1b33.png)
[in depth understanding of tcapulusdb technology] how to realize single machine installation of tmonitor

KS003基于JSP和Servlet实现的商城系统
![[digital signal processing] linear time invariant system LTI (judge whether a system is a](/img/98/6819646ea602781101ac9994213129.jpg)
[digital signal processing] linear time invariant system LTI (judge whether a system is a "non time variant" system | case 2)

如何使用笔记软件 FlowUs、Notion 进行间隔重复?基于公式模版
![[deeply understand tcapulusdb technology] tmonitor background one click installation](/img/0a/742503e96a9b51735f5fd3f598b9af.png)
[deeply understand tcapulusdb technology] tmonitor background one click installation

MySQL installation

首个大众可用PyTorch版AlphaFold2复现,哥大开源OpenFold,star量破千

Ks007 realizes personal blog system based on JSP
随机推荐
PHP receiving and sending data
[deeply understand tcapulusdb technology] tmonitor module architecture
[digital signal processing] linear time invariant system LTI (judge whether a system is a "non time variant" system | case 2)
DTU上报的数据值无法通过腾讯云规则引擎填入腾讯云数据库中
【二级等保】过二级等保用哪个堡垒机品牌好?
How to correctly calculate the number of rows imported into EXCEL (poi/npoi)
【深入理解TcaplusDB技術】TcaplusDB構造數據
kali使用
Working for 7 years to develop my brother's career transition test: only by running hard can you get what you want~
How does activity implement lifecycleowner?
Detailed explanation of kubernetes log monitoring system architecture
【深入理解TcaplusDB技术】Tmonitor系统升级
leetcode:242. Valid Letter ectopic words
Actual combat | how to make a slam track truth acquisition device?
Unity realizes the function of playing Ogg format video
Penetration test - right raising topic
Problems during MySQL uninstallation
Building Intel devcloud
Multi-Camera Detection of Social Distancing Reference Implementation
Networknt:: JSON schema validator source code appreciation