Message originally posted in wrong forum... oops
Anyhoo, I'm using snipMate for vim, I'd like to edit each of the ~/.vim/snippets/*.snippets files so that the tabs are replaced with 4 spaces (without changing the universal tabstops value), but I need to leave unchanged the first hard tab on any line which follows a line starting with 'snippet', as the snipMate.vim script uses it to recognise where to start.
For example:
Code:
# main()
snippet main
<--\t-->int main(int argc, const char *argv[])
<--\t-->{
<--\t--><--\t-->${1}
<--\t--><--\t-->return 0;
<--\t-->}
should be changed to
Code:
# main()
snippet main
<--\t-->int main(int argc, const char *argv[])
{
${1}
return 0;
}
(where <--\t--> is currently a tab, naturally).
Do you know how I can do this in vim with a replace command - or better yet, using sed so I can apply it to the whole directory full of .snippet files at once?
Thanks
Col