I'm trying to automate the creation of .vimrc using this command:printf \n# Funcionar como vim y no como vi\nset nocompatible\n\n# Colorear sintaxis\nsyntax on\ncolorscheme sienna\n\n# Otros seteos\n# Ms info, desde vim poner: :help '<comando>'\nset backspace=2\nset wrapmargin=8\nset ruler\nset number\n > ~/.vimrcBut I get this error: E488 in lines 2, 5 9 and 10.The .vimrc file after the execution is:# Funcionar como vim y no como viset nocompatible# Colorear sintaxissyntax oncolorscheme sienna# Otros seteos# Ms info, desde vim poner: :help '<comando>'set backspace=2set wrapmargin=8set rulerset numberThank you for your help.
Why do I get an E488 error when printf .vimrc?
vimrc;error
# is not a comment character,  is. So it should read: Funcionar como vim y no como viset nocompatible Colorear sintaxissyntax oncolorscheme sienna Otros seteos Ms info, desde vim poner: :help '<comando>'set backspace=2set wrapmargin=8set rulerset numberYeah, it's a strange choice, but it is what it is.The easiest way to fix this in your shell command is to switch the shell quotes to ':printf '\n Funcionar como [...]'Learn Vimscript the Hard Way is a good resource to start learning Vim. 