当我在命令模式下使用AsEnumerable
时,vim会说,例如,“14行上有143次替换”。
然后我将var events = (from e in context.Events
join o in context.Offices on e.OfficeId equals o.Id
where e.StartDate >= DateTime.Now
select e)
.Select(x => new
{
Cost = x.Cost,
StartDate = x.StartDate,
EndDate = x.EndDate.HasValue ? (x.EndDate).Value : new DateTime(),
Address = x.Address,
Image = x.SupportingImage,
Info = x.Info,
Name = x.Name,
LocationName = x.LocationName,
OfficeName = x.Offices.Name,
OfficePhoneNumber = x.Offices.PhoneNumber,
x.City,
x.State,
x.Zip
}).ToList()
.Select(x=> new vm_Events
{
Cost = x.Cost,
StartDate = x.StartDate,
EndDate = x.EndDate,
Address = x.Address,
Image = x.SupportingImage,
Info = x.Info,
Name = x.Name,
LocationName = x.LocationName,
Office = string.Format("For more information please call the {0} office at {1}", x.OfficeName, x.OfficePhoneNumber),
StateZip = string.Format("{0}, {1}, {2}", x.City, x.State, x.Zip)
}).ToList();
放入:s
函数。
:s
当我调用此函数时,vim不会告诉我替换次数。
在命令模式下使用execute
时,如何让vim告诉我替换次数?
理想情况下,如果能够回复移动的部队人数会更好,但替换次数是可以接受的。
一个性能问题:
该函数在一个大文件上运行,大约20MB。