Existem muitas maneiras de fazer isso, aqui estão algumas delas:
-
:%s/\%>56c.//g -
:%s/\%57c.*// -
:%s/\v^.{56}\zs.*// -
:% normal 57|D(este assumevirtualedit=allouvirtualedit=onemore) -
Shift-g
57| Ctrl-v 1 Shift-g < kbd> End x (este assumevirtualedit=all)
Editar: Adicionando as regurgitações relevantes do manual, conforme solicitado:
- Para 1. e 2. (
:h /\%c):\%23cMatches in a specific column.\%<23cMatches before a specific column.\%>23cMatches after a specific column.
These three can be used to match specific columns in a buffer or string. The "23" can be any column number. The first column is 1. Actually, the column is the byte number (thus it's not exactly right for multi-byte characters). - Para 3. (
:h \zs):\zsMatches at any position, and sets the start of the match there: The next char is the first char of the whole match. -
Para 4. (
:h |,:h D,:h :normal,:h :%,:h 'virtualedit'):|To screen column [count] in the current line. exclusive motion. Ceci n'est pas une pipe["x]DDelete the characters under the cursor until the end of the line and [count]-1 more lines [into register x]; synonym for "d$".:norm[al][!] {commands}Execute Normal mode commands {commands}. This makes it possible to execute Normal mode commands typed on the command-line. {commands} are executed like they are typed.%equal to1,$(the entire file)'virtualedit'A comma separated list of these words:blockAllow virtual editing in Visual block mode.insertAllow virtual editing in Insert mode.allAllow virtual editing in all modes.onemoreAllow the cursor to move just past the end of the lineVirtual editing means that the cursor can be positioned where there is no actual character. This can be halfway into a tab or beyond the end of the line. Useful for selecting a rectangle in Visual mode and editing a table.
-
Para 5. (
:h G,:h CTRL-V,:h <End>,:h x):GGoto line [count], default last line, on the first non-blank character linewise.[count]CTRL-VStart Visual mode blockwise.$or<End>To the end of the line.["x]xDelete [count] characters under and after the cursor [into register x] (not linewise). Does the same as "dl".