/gvim_config

gVim setup for web development on Windows

Primary LanguageVim Script

My gVim for Windows config

screenshot

This repository contains my gVim configuration process for a new Windows computer, it is based on my own work flow as a web developer (in PHP, JavaScript, HTML, CSS) and it includes:

  • my gvimrc file
  • vimfiles directory containing various customization files including my own theme, snippets, syntax highlighting, etc.
  • script to add Vim Renamer to Windows Explorer context menu
  • script to remap CapsLock to Ctrl/Esc
  • script to replace the Vim icon
  • the font of my choice

Disclaimer
I created this repository for my own needs and I highly recommend that you check it thoroughly before installing it on your system. I am not responsible if something goes wrong, so use at your own risk.

INSTALLATION

Step 1 - Install prequisites

Run choco install -y ripgrep make
Add C:\Users\%username%\ctags to PATH
Add C:\Program Files (x86)\Vim\vim82 to PATH

Step 2 - Prepare $HOME directory

$ cd %USERPROFILE%  
$ mkdir .backups\.backup .backups\.swp .backups\.undo ctags gutentags
$ git clone git@github.com:antaed/gvim_config.git vimfiles
$ git clone https://github.com/k-takata/minpac.git ^ vimfiles\pack\minpac\opt\minpac
$ echo "runtime gvimrc" > _gvimrc
  • Copy contents of ctags download to \ctags
  • Install one of the font variants from $HOME\vimfiles\antaed
  • Create shortcut of $HOME\vimfiles\antaed\CapsLockCtrlEscape.ahk and move it to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
  • Run $HOME\vimfiles\pack\minpac\start\vim-renamer\doc\AddVimRenamerToContextMenu.bat
  • Set shortcut icon to $HOME\vimfiles\bitmaps\vim.ico
  • Run $HOME\vimfiles\antaed\SetVimIcon.bat as administrator

Step 3 - Install plugins

  • :call minpac#update()
  • :call coc#util#install()

Step 4 - Set gVim as git mergetool

  • Run C:\Program Files (x86)\Vim\vim82\install.exe and select n, d
$ git config --global merge.tool diffconflicts
$ git config --global mergetool.diffconflicts.cmd "gvim -c DiffConflicts \"$MERGED\" \"$BASE\" \"$LOCAL\" \"$REMOTE\""
$ git config --global mergetool.diffconflicts.trustExitCode true
$ git config --global mergetool.keepBackup false

Go to MacVim version