ntfsclone Windows partition to smaller partition on another disk

First of all you will need some kind of bootable Linux distribution. I have used Kali linux. Please execute following commands as root.

First check which partition do you use for your Windows installation. Since I was using Windows 7, first partition was 100MB reserved space and second partition was my Windows installation. Continue reading “ntfsclone Windows partition to smaller partition on another disk”

Set syntax highlighting in Vi/Vim with dark background

I always forget how to do this and I need to write it down:

Turn on syntax highlighting with:

:syntax on

If highlighting looks to dark, then you are probably using dark background, so set it to achieve better readability:

:set background=dark

To make these two changes permanent, edit ~/.vimrc file and enter:

syntax on
  set background=dark

To turn of syntax highlighting do:

:syntax off

To go back to light background do:

:set background=light

or delete the lines from ~/.vimrc file.