Vim高级替换

问题描述 投票:0回答:1

我做了很多复杂的编辑,并且在过去也经常使用sed,但这是我不知道该怎么做的事情。我知道如何使用行首和结尾(^$)和通配符(.*$),甚至抛出CRs,但这是柱状的。我有以下几行:

!********************************************************************************
!                                                                               *
! Processing Overview:                                                          *
!                                                                               *
!     begin-setup                                                               *
!     begin-heading        *
!     begin-footing        *
!     begin-report        *
!          Strd-begin-Program       *
!          STRD-Print-Lis       *
!          Prompt-Parameters                                                    *
!          Feedback-Value-Update                                                *

为了统一性和可读性,我需要在所有行上将星号移至第81列。有人知道该怎么做吗?TIA,大卫

vim editing
1个回答
0
投票

一个选项可能是类似的>]

%norm $x81|p

故障

%             operate on the entire buffer
norm          following normal command
$             go to end of the line
x             delete the character
81|           goto column 81
p             paste
© www.soinside.com 2019 - 2024. All rights reserved.