0

i've used OS X and when i edit codes in terminal or iterm2, the codes(java, c++, etc) are always colored so that it can very helpful to code with them.

However, i don't know when exactly it happens, but the codes are just all black in terminal and white in iterm2, only one color. How can I fix this problem?

M.Yoon
  • 1
  • 2
  • Which editor are you using, and are we talking about what things look like in the editor? – tripleee Feb 24 '15 at 07:56
  • does it need any specific editor? its just 'Open with default app' in iterm2-preferences-profiles-advanced-semantic history – M.Yoon Feb 24 '15 at 08:26
  • Whatever the "default app" is for this type of file is probably responsible for the coloring. I'm guessing it's `vim` but it could be pretty much anything. If you don't know, a screen shot might help enlighten us. – tripleee Feb 24 '15 at 08:28
  • oh right, it was vim, and i solved it with editing vimrc. thank you. Here's one more question when i check the 'open with editors'-'sublime text3' in advanced tab in iterm2, but it always open with vim. how can i solve it – M.Yoon Feb 24 '15 at 08:53
  • Post a new question, it doesn't seem related to this problem. Also, please post your solution as an answer (and maybe accept it when you can) so that this no longer comes up as unresolved. Thanks. – tripleee Feb 24 '15 at 08:54

1 Answers1

0

solved by editing the vimdc.

cd /usr/share/vim

then,

sudo vi vimrc

if you just write

vi vimrc

its read only file so that you cannot overwrite the file.

anyway then, write

sytanx on

in vimrc.

M.Yoon
  • 1
  • 2