Questions tagged [ex-command]

ex is an advanced version of the standard Unix editor ed. It is the direct predecessor of vi.

Ex is the root of a family of editors: edit, ex and vi. The original ex was an advanced version of the standard Unix editor ed.

Read more:

32 questions
9
votes
1 answer

How to go back to beginning of the line in (ex) command mode?

The standard CTRL-E works to go to the end of the line but CTRL-A doesn't seem to work to go to the beginnig. It would obviously be useful to quickly go to the beginning of line for example if one wanted to replace w /path/to/file in with w!…
Yanevski
  • 193
  • 3
5
votes
2 answers

How to use "-c" command line option?

Fully realizing the heritage of vi, I know that its predecessor (ex) could be, and was, used for command line processing of files ("sed-style", if you like). The manpage says: -c {command} {command} will be executed after the first file has been…
DevSolar
  • 789
  • 1
  • 7
  • 15
2
votes
1 answer

argdo command hanging

I am interested in editing multiple files. Using this answer: How to edit files non-interactively (e.g. in pipeline)? I came up with my own test case: seq 10 14 | tee pa.txt > qu.txt ex -sc 'argdo %s/1/Z/ge|x' *.txt However when I run the Ex…
Zombo
  • 1
  • 5
  • 18
2
votes
1 answer

What is the meaning of "#" in ":g/pattern/z#.5"

Like the title, What is the meaning of # in :g/pattern/z#.5. :g/pattern/z#.5 and :g/pattern/z.5return the same output for me. In addition, If I want to help description of # with :h command, how to find it? :h # seems to show another description…
SangminKim
  • 135
  • 4
1
vote
0 answers

using ex with perl support

I've just learnt how to run perl commands within vi, but I had to install vim.gtk in order to have perl support. But I want to incorporate these perl commands into bash scripts that call ex. Is there a version of ex that has perl…
Leo Simon
  • 715
  • 1
  • 5
  • 11