I'm using this command below to remove the first column of a document:
%s/^[^\t]*\zs\t[^\t]*\ze//g
but it says command not found. Any idea?
I'm using this command below to remove the first column of a document:
%s/^[^\t]*\zs\t[^\t]*\ze//g
but it says command not found. Any idea?
Here's the quickest way to remove the first column:
I like the block selection solution of @Peter, but if you want to use substitution you need this command:
:%s/^.//
Let's analyze why this works:
:%s
exec a substitution on all the document/^./
select the first character after the start of the line/
and replace it with... nothing.If I understand you correctly, this should do the job:
:%s/^[^\t]//
The command removes all leading characters that are not a tabulator.
Alternatively, if you're editing a tabulator separated values document and want to remove all "columns" before the first tabulator, then this should do it for you:
%s/^[^\t]*\t//