标签: regex vim replace substitution confirmation
我想使用确认标志仅使用某种模式替换行:
g/'pattern'/s/'search'/'replace'/gc
c(确认)标志告诉“:substitute”在执行每次替换之前要求确认:
Replace with 'replace-pattern' (y/n/a/q/l/^E/^Y)?
问题在于它是全局替换而q没有效果。
q
我想捕捉用户在上述问题中提供的输入。 是q这样做吗? 是n'这样做吗 等等
n
这可能吗?