Skip to content

Latest commit

 

History

History
362 lines (265 loc) · 15.3 KB

README.md

File metadata and controls

362 lines (265 loc) · 15.3 KB

Table of Contents

Development Environment on Windows

After installing a fresh copy of Windows 10, do following steps.

Change Computer Name

Open Advanced System Settings using rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,1.

  1. Click on Change button
  2. Rename

Set Time

Open time and date settings using control timedate.cpl.

  1. Set time zone
  2. Use 24 hour time format

Disable Automatic Updates

Windows 10 automatic updates mess up with drivers, rendering my machine unstable. I had to reinstall Windows 10 at least 10 times before learning my lesson to never to trust Windows 10 automatic updates.

  1. Open services.msc. Stop and disable Windows Update Service
  2. Open driver update setting. Run rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,2. Click on Device Installation Settings and disable drivers updates.
  3. Open gpedit.msc. Computer Configuration -> Administrative Templates -> Windows Components -> Windows Update -> Configure Automatic Updates
    1. Enable it
    2. Choose Notify to download and notify to install

Update Windows Defender manually. Later use Windows Update MiniTool for installing selective updates.

Also download this tool from Microsoft support website. It hasn't been of any use at the time of writing but just keep it in case it may prove useful.

Install Applications

  1. Install Windows Update MiniTool
  2. Install SyncTazor
    1. Sync with other computers
  3. Install 1Password
  4. Install Firefox Developer Edition
    1. Enable Firefox sync
    2. Login to RescueTime plugin
    3. Configure Pray Times plugin
    4. Install 1Password extension
  5. Install RescueTime
  6. Install ConEmu Windows Terminal
    1. Open Settings -> Integration. Click on Register to add ConEmu to context menu
  7. Install Clink.
  8. Install Revo Uninstaller Freeware
  9. Install SharpKeys
  10. Install Git for Windows
  11. Setup Qt
    1. Install Latest Qt Creator
    2. Install Qt 5.5.1 for Windows 32bit (VS 2013)
  12. Install CDB debugger for Qt
    1. Download Windows 10 SDK online installer. Offline installer is not available
    2. Either install it directly or choose to download only
    3. Installer will present a menu of features. Select Debugging Tools for Windows (~100MB)
    4. Install it manually from download folder, if you had opted for download option
  13. Install Visual Studio 2013
  14. Install Win32 OpenSSL 1.0.1 Light into Windows System folders
  15. Install Zeal Documentation Explorer
    1. Download Qt5 documentation
    2. Download C++ documentation
  16. Install AutoHotKey
  17. Install 7-Zip
  18. Install Slack
  19. Install Chocolatey Packages
    1. Install Chocolatey
    2. Install Ag - The Silver Searcher
  20. Install Python2 and Python3
  21. Install Ruby
  22. Visual Studio Code
    1. Install Visual Studio Code Settings Sync
    2. Download Visual Studio Code settings
  23. Install Inconsolata fonts
  24. Install Evernote
  25. Install CopyQ Clipboard Manager
  26. Install Don't Sleep Utility
    1. Alternate is Caffeinated but it requires .Net 3.5
    2. Another alternate is Caffeine but it keeps inserting <F15> in Vim
    3. Set options in Don't Sleep to Start Minimized and Start with Windows
  27. Install Franz
    1. Clone fork of plugins repository
    2. Paste plugins
      1. Google Calendar
      2. Google Spreadsheets
      3. Facebook
    3. Setup
      1. Inbox for personal email
      2. Inbox for office email
      3. Personal Google Calendar
      4. Google Spreadsheets
      5. WhatsApp
      6. Telegram
      7. IRC Cloud

Download Applications

Create a folder bin in %HOMEPATH%, using mkdir %HOMEPATH%\bin command. This folder is referred to as bin, henceforth.

Download following apps and extract them in bin folder, and add their path to %PATH% variable.

To edit %PATH% variable, open Environment Variables using rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,3.

  1. Vim
  2. Lua
    1. Navigate and download from Windows Libraries/Dynamic folder

You can check path of each command using where command. For example,

> where gvim
C:\Users\talha\bin\complete-x64\gvim.exe

You can use it to test each downloaded program is available from %PATH%.

Configure

Map Keys

Use SharpKeys to,

  1. Map Caps Lock to Left Ctrl key
  2. Map Left Ctrl to Left Win key
  3. Map Left Win to Right Ctrl key

Track Pad

To invert the direction of scrolling (natural scrolling on macOS), run following command in PowerShell with administrative privileges.

Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0 | ForEach-Object { Set-ItemProperty $_.PSPath FlipFlopWheel 1 }
Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopHScroll  -EA 0 | ForEach-Object { Set-ItemProperty $_.PSPath FlipFlopHScroll 1 }

See SuperUser answer for details.

Natural direction of scrolling is how you scroll on iPhone, Android and other touch devices. Content scrolls in the direction of your fingers.

Mouse Properties

Open mouse properties using control main.cpl.

  1. In Buttons tab, turn on ClickLock
    1. In Settings, set duration to the shortest possible
  2. In Pointer Options tab, enable Show Location of Pointer
  3. In Wheel tab, change scroll speed to 1

Dotfiles

Create a Repos directory in %HOMEPATH%. Clone dotfiles repository.

Git

Start a cmd tab with administrative privilege in ConEmu. Create symbolic links thusly,

mklink %HOMEPATH%\.gitconfig %HOMEPATH%\Repos\dotfiles\git\gitconfig
mklink %HOMEPATH%\.githelper %HOMEPATH%\Repos\dotfiles\git\githelper
mklink %HOMEPATH%\bin\diff-highlight %HOMEPATH%\Repos\dotfiles\bin\diff-highlight

Vim

Open Vim and check you have Python2, Python3, Ruby, and Lua working, using following commands,

:echo has('python3')
:echo has('python')
:echo has('ruby')
:echo has('lua')

Link to Vim Configuration

Start cmd with administrative privilege in ConEmu. Create symbolic links thusly,

mklink %HOMEPATH%\.vimrc %HOMEPATH%\Repos\dotfiles\vim\vimrc
mklink /d %HOMEPATH%\.vim\ %HOMEPATH%\Repos\dotfiles\vim\vim\

Install Vim-Plug

Open Powershell and type these commands

md ~\.vim\autoload
$uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
(New-Object Net.WebClient).DownloadFile($uri, $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath("~\.vim\autoload\plug.vim"))

Install Plugins

Open Vim, ignore errors and issue :PlugInstall! to install all plugins and themes.

Restart Vim. This time there should be no errors.

Diff

It is possible that diff or Gdiff (in Vim Fugitive) will not work. Tuxproject Vim does not include a diff.exe.

Check output of

:!where diff

If the result is empty or Gdiff is not working then add diff.exe from Git installation to your %PATH%.

Open your Environment Variables, edit %PATH% to add C:\Program Files\Git\usr\bin.

See this Github issue for details.

Add gVim to Context Menu

I am using portable version of Vim from Tuxproject which does not come with an installer. It does not get added to the Windows context automatically.

To add gVim to context menu, open registry regedit.

  1. Navigate to HKEY_CLASSES_ROOT\*\shell.
  2. Add new key under it gVim.
  3. Change value of Default to Open with gVim
  4. Add a new string value, named Icon. Set it's value to gVim executable, in this case "C:\Users\talha\bin\complete-x64\gvim.exe"
  5. Add a new sub key under gVim. Name it command
  6. Set command's default value to gVim executable, in this case "C:\Users\talha\bin\complete-x64\gvim.exe" "%1"

See this link for details.

AutoHotKey

To auto start the AutoHotKey script every time windows starts. Start cmd with administrative privilege in ConEmu. Create symbolic links thusly,

mklink "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\init.ahk" %HOMEPATH%\Repos\dotfiles\autohotkey\init.ahk

Install AutoJump

You must have Clink installed before you install AutoJump

  1. Clone AutoJump
  2. Add patch
  3. Open cmd
  4. Make sure Clink is working in cmd
  5. Switch to AutoJump directory
  6. Install AutoJump using python install.py
  7. Successful installation will output a path, add this path your %PATH%.

Clink

You can view Clink settings and configuration directory using clink set command.

Color Codes

To have Gruvbox dark theme like background in cmd or Git shell, use following color codes:

Color Values Red Green Blue
Screen Background 44 44 44
Screen Text 218 198 144

Urdu Support

  1. Add Urdu language support to Windows 10
  2. Install Phonetic Keyboard
  3. Install fonts
    1. DecoType Naskh Regular
    2. Diwani Letter Regular
    3. Khat-e-Sulas Regular
    4. Khat-e-Sulas Shipped Regular
    5. Old Antic Bold Regular
    6. NooreHuda
    7. Jameel Noori Nastaleeq Regular
    8. FS Diwani

Outdated Content

I need to review and update following portion of this file.

Overview of my dotfiles

These configuration files do not work out of the box. These are specific to my Mac OSX system.

Following are my not so comprehensive and perhaps out of date notes.

Git

  1. David DeSandro blog entry is a good start point.
  2. Cheat sheets has more comprehensive entry.

Vim

  1. Vrome is a Google Chrome extension.

Auto Close

  1. SO thread has got some good comments.
  2. I decided to use Thiago Alves/Townk's plugin.
  3. Townk's plugin tutorial.

Vim Markdown

  1. tpope/vim-markdown is mostly used. But it does not conceal text markers in Markdown file.
  2. xolox/vim-markdown does the concealing. See this image for example.
  3. But you have to switch to xolox/vim-markdown conceal branch to get his code. Use git checkout -b conceal remotes/origin/conceal to checkout the branch.

Fuzzy File Finder

  1. I tried command-t but I could not make it work. It requires that your copy of Vim should be compiled with the same version of ruby with which you compiled command-t, which effectively means you have to compile Vim yourself.
  2. I took the easier way, use CtrlP. It is basically the same as Command-T but written in pure Vimscript. This means it neither requires Ruby support enabled in Vim nor does it require the compilation of some Ruby extension implemented in C.
  3. Other extensions are either not what I wanted, for example, LustyJuggler, or not actively maintained any more like FuzzyFinder and fuzzy file finder.

Bash

  1. Bash completion depends on bash_completion package. MacPorts users can do sudo port install git-core +bash_completion.
  2. Git Utilities You Can't Live Without blog entry has an entry for Git aware PS1.