2

I am sshing from iTerm2 to an Ubuntu machine. I am using ns3 through waf and redirecting my output to a log file using the below command:

mpirun -n 16 ./waf --run test > log.out 2>&1 

The log file that gets generated has output like below:

^[[32mWaf: Entering directory `/home/workspace/ns-allinone-3.25/ns-3.25/build/optimized'^[[0m
^[[32mWaf: Entering directory `/home/workspace/ns-allinone-3.25/ns-3.25/build/optimized'^[[0m

I am unable to understand why the extra characters are being added in the file. When I use less to view the contents, I see the output perfectly fine. What should I do to not see the extra in vim.

thenakulchawla
  • 5,024
  • 7
  • 30
  • 42

1 Answers1

0

If your vim echo has('conceal') return 1, try this simple solution to hide ^[[32m

syntax match Special /^[\[32m/ conceal

Note: you'd better copy ^[ from the log file for it's actually a Ctrl-[

leaf
  • 1,624
  • 11
  • 16