Strace output can be written to a log file by using the
-o option. This output is typically verbose and I find it helpful if the editor can apply syntax highlighting on it. This gives the system call, its parameters and its output different colors and makes it easy to understand the log.
Vim has support for syntax highlighting of strace output. You can see this in the
/usr/share/vim/vim74/syntax/strace.vim file. Vim tries to detect if the file is strace output by looking for an
libc pattern in the first line. This logic can be seen in its
/usr/share/vim/vim74/scripts.vim file. I have never seen these patterns in the first line in my strace output.
Since Vim does not automatically detect my strace output file, I enable it explicitly using the command:
Another trick is to output strace to a file of particular extension, say
.strace and look for that file extension to set the
strace filetype automatically. If you want this, then add this line to your
autocmd BufRead,BufNewFile *.strace set filetype=strace
Tried with: Vim 7.4, Strace 4.8-1 and Ubuntu 14.04