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 Receive Files via Bluetooth on Mac From Android and Other Phones


If you are able to send files from your Mac to other devices and unable to receive the files from them even after pairing, the most likely reason is your bluetooth sharing isn’t turned on.

Turn on bluetooth sharing on MAC OSX?

Turning bluetooth sharing is very simple.

Open preferences panel and select sharing and then select enable bluetooth sharing.  You will now be able to receive files via bluetooth on mac.

You can find the screenshots for the process below.

Note: Either  turn off bluetooth sharing when you don’t need it or make sure you have “Ask What to Do” selected for both receiving files and when other bluetooth devices try to browse your Mac. If you are not careful, people can use this to install spyware or other malicious software or get access to your personal files.

Be sure to pay attention to options marked with red arrows.
Be sure to pay attention to options marked with red arrows.