How to Enable VIM Syntax Highlighting on MAC OSX

For some people VIM is the primary code editor and some people use it to make minor edits to their code. Whatever your use case might be, it’s always good to have some syntax highlighting. It makes the code more readable and reduces errors.

Syntax highlighting / Color coding is not turned on MAC by default. Turning it on is a very simple task.

Open your terminal, it will be in Applications/utilities folder.

Type in the following command to open up the VI editor preferences file

vi ~/.vimrc

Most probably it will be empty. Whether its empty or not, add this code at the very end.

filetype plugin indent on
syntax on 

Code to add Syntax Highlighting on MAC

Bonus tip: If you are wondering how we got the line numbers in the above screenshot

  1. Press the Esc key if you are currently in insert or append mode.
  2. Press : (the colon). The cursor should reappear at the lower left corner of the screen next to a : prompt.
  3. Enter the following command: set number.
  4. A column of sequential line numbers will then appear at the left side of the screen.

You can even add set number at the end of above two lines in ~/.vimrc to make it always show the line numbers.

vi without color coding
vi without color coding
VI with color coding and line numbers enabled
VI with color coding and line numbers enabled

How to View Hidden Folders on Mac

In your Mac or Macbook the company hides many hidden files and folders and by this post you would be able to view or show the hidden folders in mac. This is usually done to avoid some situations in which you might delete the essential files of folders that might be required for your mac to work, boot up do creating system processes and etc.  But also there are some certain situations when you need to access these hidden files anyhow to make some personalization or system changes or processes in your mac or Macbook. So if you are thinking “How to show hidden files and folders in your mac?” You’ve probably landed on the right page.So in this post I’ve figured out some of the ways to show hidden folders on mac.

Ways to Show Hidden Files and Folders in Mac:

So here are the various methods to Show Hidden files and Folders on Mac.


Revealer is a free utility that allows viewing of hidden files and folders in mac.This app solves the purpose to show hidden files and folders and as well as it shows the ~/Library Folder. The interface on the app is very easy to understand and also a bonus is that it is very light. It is only around 1 MB, so the process of showing hidden folders and files is expected to be as fast as anything. Talking of the interface, there are two dedicated tabs at the top. One reads, “Show Hidden Files” and the other says “Show ~/Library”. So this is as simple as anything, even the beginner mac users can understand the whole scenario pretty easily and quickly. This app proves to be a perfect match for the hard core or the developer users, if you usually need to show hidden folder on mac on regular intervals, as this app is just one click away from you accessing those hidden folders and files, and also it can be pinned into dock for quick access.

You could get the Revealer app to Show Hidden Files and Folders here.



Automater is another great tool for showing hidden files and folder in mac. It usually comes pre-installed on macs, but you could also download it if you don’t have one. When you run this program, a window appears. Then you need to click on “Run” which is usually located at the upper right corner by default. The the window would prompt you asking to “Show Hidden Files and Folders” ? Click on OK.And as you click, it would close and then re-launch again. And it would now display all the hidden files and folders on your mac. Also you could reverse the step, i.e., you could hide the files and folders in mac, by running the Automator program again. So each time you show or hide the hidden files or folders in your mac, the program would have to be re-launch each time. So this app automates the process to view hidden folders on mac.

Have the download link from Appducate from here.



terminal is another great way to reveal the hidden folders and files on your mac. But this method is a bit complex, as it involves writing some codes and syntax on the screen, and so you’ve got to remember them, but it is also a productive one, if you get used to the codes. So for the start simply type in the codes below, to show hidden files and folders on mac.

This code would reveal all the hidden files and folders in your mac.

defaults write AppleShowAllFiles YES

Now that you’ve entered these codes, the window needs to be restarted. To do it, use this code.

killall Finder

Now use this code to hid all the hidden files and folders in mac.

defaults write AppleShowAllFiles NO

Finder has to be restarted again, type in this code.

killall Finder

This is a easy method as i told before, but for this you need to remember the codes, but if you can’t the above two methods would do fine.

Here are some videos I found that might be relevant to you while viewing the hidden files and folders in mac and show hidden folders in finder also.

Find Hidden folders in Mac OS X 10.7 Lion and 10.8 Mountain Lion version:

The above two versions were dedicated to ay mac and would probably work with any version of mac. But this trick is simply for the 10.7 and 10.8 mountain Lion and Lion Version. And use this is you have any of the listed version as this is the shortest method and works the best. Follow these steps.

  • Open the Utilities Folder.
  • Open a terminal Window, as you did in the method listed above.
  • Type in the following code: defaults write AppleShowAllFiles YES
  • Press return
  • Now you have to hold the “alt” key located on the keyboard and then have to press Finder icon.
  • And now click o relaunch.

Have a look at this one also to make things a bit more clear.

This will display all the files and folders that are hidden by default on your mac. So these were some of the basic tricks to find and show the hidden files  and folders on mac online. So I hope this helped. Do leave your suggestions in the comments below.