Maintain setup files across work environments.
Follow these steps to set up a work environment.
Store GitHub credentials in the home directory.
git config --global credential.helper store
Windowed terminal
- Install msys2 from https://www.msys2.org/.
- In msys2 install tmux:
pacman -S tmux
- Navigate to msys2 folder: C:\msys64/usr/bin.
- Copy these files to C:\Program Files\Git\usr\bin:
- msys-event-_-_-_.dll
- msys-event_core-_-_-_.dll
- tmux.exe
Establish vim settings by creating a symlink in C:/Users/$USERNAME
to the _vimrc file in this repo and initializing all plugins.
cd ~
git clone http://github.com/samussiah/setup-files.git ~/vimfiles
ln -s ~/vimfiles/_vimrc ~/_vimrc
cd ~/vimfiles
Then in vim run :PlugInstall
.
- > Control Panel
- > System
- > Advanced System Settings
- > Environment Variables
- Under User Variables > Path
- > Edit
- > New
- > Browse
- Browse to folder that contains executable.
- Open
~/_vimrc
or in vim type,ev
. - Edit the file.
- Copy the file into
~/vimfiles
. - In
~/vimfiles
run these commands from the command line: git add -A
git commit -a -m 'description of the update'
git push
- adding
- Open ~/_vimrc.
- Add a line under the " declare plugins comment like so:
Plug 'user/repo
. - Save the updated _vimrc file.
- Reload the updated _vimrc file or restart vim.
- In vim run
:PlugInstall
.
- updating
- In vim run
:PlugUpdate
.
- In vim run
- removing
- Open ~/_vimrc.
- Remove the line of the plugin to be removed.
- Reload the updated _vimrc file or restart vim.
- In vim run
:PlugClean
.
Start up a local local server.
- Install http-sever:
npm i -G http-server
. - In top-level development folder, create package.json:
touch package.json
. - Add command to package.json:
echo '{ "scripts": { "local": "http-server ." } }' > package.json
. - Start local server:
npm run local
.
Add a batch file that starts AutoHotKey, a keyboard macro program, to the Windows desktop.
cd C:/Users/$USERNAME/vimfiles
cp autoHotKey.bat ../Desktop
- Run AutoHotKey initially by double clicking the batch file on the Windows desktop.
- Edit AutoHotKey: CTRL + ALT + [
- Run AutoHotKey after editing: CTRL + ALT + ]
Be sure to commit and push changes to setup files.