0

How can I make vi in Cygwin highlight the syntax when I open a file by default? I know that I can type in the command "syntax on" but I would prefer to not do this all the time.

2 Answers 2

4

Put the line syntax on in your ~/.vimrc (assuming you're talking about vim), same as on any other installation of vim.

0

As Gilles says that add syntax on in your ~/.vimrc. You can also add other such as set nu (the number of line), set bacpspace=2 and so on. The ~/.vimrc file is a configuration file, you can configure it the same way as on Linux.

2
  • I'm sorry, the file(.vimrc) is used to set vi editor as in Linux.
    – binghenzq
    Aug 15, 2013 at 9:09
  • Ah ok Mat fixed it. I will delete the command. Aug 15, 2013 at 10:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .