Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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

share|improve this answer

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.

share|improve this answer
    
I'm sorry, the file(.vimrc) is used to set vi editor as in Linux. –  binghenzq Aug 15 '13 at 9:09
    
Ah ok Mat fixed it. I will delete the command. –  Raphael Ahrens Aug 15 '13 at 10:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.