I've the following dummy file created via:

echo -e "a a\tb b\tc c" > file

Is there any literal for space which I can use for motion argument?

For example this works (which removes the 1st a a column):

ex +'%norm df ' -sc'%p|q!' file

but only when the whitespace was typed manually by Ctrl+V-Ctrl+Tab.

I've tried already: \t, <Tab>, <c-v><Tab>, etc., but without success.

1 Answer 1


This should work:

vim -c':exe ":%norm df\<Tab>"' -c ':wq' file

(not sure, why you are using -sc '%p' thing)

The :exe "norm <key>" is documented at :h expr-quote

  • The -sc'%p|q!' is to print to the standard output and quit (without saving in-place), just an alternative way for input parsing like sed/awk.
    – kenorb
    Commented Oct 16, 2015 at 14:49
  • Why :exe is required?
    – kenorb
    Commented Oct 16, 2015 at 14:50
  • to parse the "\<key>" string Commented Oct 16, 2015 at 14:58
  • Linked to your example from here: Deleting first column with vim. Basically I wanted to find simple ex cmd removing first column.
    – kenorb
    Commented Oct 16, 2015 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.