Skip to content

Instantly share code, notes, and snippets.

@g0ld3lux
Last active January 8, 2024 01:45
Show Gist options
  • Save g0ld3lux/db5c2aa472d7815728a6990abc599df2 to your computer and use it in GitHub Desktop.
Save g0ld3lux/db5c2aa472d7815728a6990abc599df2 to your computer and use it in GitHub Desktop.
WSL Laravel Dev Machine
Font=DejaVuSansMonoForPowerline NF
BoldAsFont=no
FontHeight=12
FontWeight=400
FontSmoothing=full
Locale=C
Charset=UTF-8
Term=xterm-256color
ForegroundColour=248,248,242
BackgroundColour=40,42,54
CursorColour=211,84,0
BoldBlack=52,73,94
Black=44,62,80
BoldRed=231,76,60
Red=192,57,43
BoldGreen=46,204,113
Green=39,174,96
BoldYellow=241,196,15
Yellow=243,156,18
BoldBlue=52,152,219
Blue=41,128,185
BoldMagenta=155,89,182
Magenta=142,68,173
BoldCyan=26,188,156
Cyan=122,160,133
BoldWhite=236,240,241
White=189,195,199
Transparency=off
BoldAsColour=no
CursorType=underscore
AllowBlinking=no
Scrollbar=none
BellType=0
OpaqueWhenFocused=no
BellFlash=no
BellTaskbar=no
ConfirmExit=no
FontIsBold=no

Setting Up Laravel Dev Machine With WSL

  1. Windows 10 Insiders Build windows 10 build 14971

  2. Enable WSL Enable WSL Commands

  3. Mintty WSL Latest build Mintty WSL

  4. Enable Hyper V Enable Hyper V

  5. Install Docker For Windows Stable

  6. Setting Up User For Our Terminal

    1. Create a Zsh User This User Will be Using Zsh Command to Allow Us to Beautify Our Terminal and Vim
      sudo adduser ${username}
      
    2. Set Root as the default User It is Important That When We Run Bash in WSL the Default User is Root and not Our ZSH User Allows Us To Use functions in Our .bash_profile dotfiles using Command bash -ic
      lxrun /setdefaultuser root
      
    3. Update WSL
      lxrun /update
      
  7. Creating Neccessary Directories in Windows

    %USERPROFILE%\bin
    %USERPROFILE%\.dotfiles
    %USERPROFILE%\sites
    
    1. Bin folder will hold our Windows Batch Files

      alias.bat ,allows us to CRUD cmd alias from user-aliases.cmd cdx.bat allows us to easily navigate in cmd by saving directories

    2. .Dotfiles folder will hold our cmd and oh-my-zsh config folder

      1. cmd folder

        • cmdrc.cmd (Requires to Be added in our regedit, Holds Our Core Aliases to Avoid Being Deleted or Override)
        • user-aliases.cmd (Holds All our Laravel Aliases and Other Aliases Added At Run Time)
      2. oh-my-zsh

        • theme/materialshellelectro.zsh.theme (Make Our Zsh Terminal To Look Better)
    3. Sites Folder Will Hold Our Laravel Projects

  8. Adding All Necessary Config Files

    Gists

    • minttyrc(mintty)
    %LOCALAPPDATA%\wsltty\home\%USERNAME%\.minttyrc
    
    • bashrc(root user)
    ~/.bashrc
    
    • bashrc(zsh user) , important here is that we tell bash to use zsh as our default shell
    ~/.bashrc
    
    • bashprofile(all user)
    %USERPROFILE%\.dotfiles\.bash_profile
    
    • zshrc(zsh user)
    ~/.zshrc
    
    • vimrc (zsh user)
    ~/.vimrc
    
    • plugins.vim (zsh user)
    ~/.vim/plugins.vim
    
    • .ackrc (zsh user)
    ~/.ackrc
    
    • alias.bat (cmd)
    %USERPROFILE%\bin\alias.bat
    
    • cdx.bat (cmd)
    %USERPROFILE%\bin\cdx.bat
    
    • cmdrc.cmd (cmd)
    %USERPROFILE%\.dotfiles\cmd\cmdrc.cmd
    
  9. Installing Beautiful Font to Our Terminal

    Download Dejavu Sans Mono For Powerline Nerd Font Complete Mono Windows Compatible

  10. Installing Vim Vundle for Managing Vim Plugins

    git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
    
  11. Adding Our Custom Themes of Oh-My-Zsh

    Folder structure

    ohmyzsh
    -lib.zsh (optional)
    -plugins 
    -themes  (materialshellelectro.zsh.theme) 
    

    Download Material Shell Electro

    Save it On

    %USERPROFILE%\.dotfiles\oh-my-zsh\theme\materialshellelectro.zsh.theme
    
  12. Generate SSH Key

    Just Google How to Generate Your SSH Key :)

    Save it On

    %USERPROFILE%\.ssh
    
  13. Installing Laravel Dev Dependencies

  • Install PHP 7

    always update and upgrade before installing new Packages

    apt-get install php7.0 # Needed by Laravel
    apt-get install php7.0-mbstring # Needed by Laravel 
    apt-get install php7.0-mysql # Needed for Mysql
    apt-get install php7.0-xml # Needed for phpunit
    apt-get install php7.0-zip # Needed by Composer
    
  • PHP Modules Optional

    apt-get install php-redis
    apt-get install php-xdebug
    

    To Check if You Have The Following Modules : php -m

  • Install Composer as root

    apt-get install unzip
    cd ~
    curl -sS https://getcomposer.org/installer -o composer-setup.php
    

    Replace the String for Installer Signature (SHA-384) at this pubkeys

    php -r "if (hash_file('SHA384', 'composer-setup.php') === 'aa96f26c2b67226a324c27919f1eb05f21c248b987e6195cad9690d5c1ff713d53020a02ac8c217dbf90a7eacc9d141d') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
    php composer-setup.php --install-dir=/usr/local/bin --filename=composer
    

    Change User to you Zsh user then invoke composer command to create a .composer folder and change ownership of .composer folder

    su <username>
    composer
    sudo chown -R $USER $HOME/.composer
    

    Check the Settings of Composer if Correct

    curl -sS https://getcomposer.org/installer | php -- --check
    

    if You need to Disable/Enable xdebug

    phpdismod xdebug
    phpennmod xdebug
    

    You need to configure this for both user

    composer self-update --update-keys
    

    You need to get the Keys here pubkeys

    and paste the Value in the Terminal to Set it up

  • Install Laravel Installer

    composer global require "laravel/installer"
    

    We already have the path added in our Config So the Path is Available Already We Have alias of laravel available to our Use

    laravel new blog
    

    This will Create a New Laravel Project Much Faster Using Cache

  • Optimize Speed of Composer with Pretissimo

    Best Use if you Have High Download Speed you can set higher Concurrency default is 6

    composer global require "hirak/prestissimo:^0.3"
    

    We have alias of newapp

    newapp laravel
    

    This will Create a New Laravel Project with benchmark

  • NodeJS

    curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
    sudo apt-get install -y nodejs
    sudo apt-get install -y build-essential
    

    Check if it is Installed

    node -v
    npm -v
    
  • Gulp

    npm install --global gulp-cli
    

    Check if Installed Globally

    gulp -v
    
  • Webpack

    npm install --global webpack
    
  • Yarn

    curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
    echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
    sudo apt-get update && sudo apt-get install yarn
    

    Check if Installed

    yarn -V
    
  • Install ZSH

    apt-get update
    apt-get upgrade
    apt-get install zsh
    
  • Install Oh-My-Zsh

    su <zshuser>
    git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
    chsh -s /bin/zsh
    

    By Default if You Added our Zshrc config file It will already Use ZSH as the default Shell everytime we log in using our Zsh User

  • Installing Vim Plugins

    if You already have copied our plugins.vim config and vimrc

    vim
    ,ep
    :PluginInstall
    
  • Refining Our Search

    Install Ack and Exuberant Tag

    apt-get install exuberant-ctags
    apt-get install ack-grep
    

    We have aliases for ctags , TagsInit

    Ackrc can be defined per project or use our Global ackrc file that we added in our User ~/.ackrc

  • Install VS Code Insiders As Our Default Text Editor

    https://code.visualstudio.com/insiders
    

    We Have alias code ready to be used in both bash and cmd terminal

  • Install ConEmu to Decorate Our CMD terminal

    This will Give Us the Ability to Use Ctrl ` (backtick) to toggle Terminal Globally

    Very Useful Short Cut Key

    Set Up Settings

    • Colorscheme = Ubuntu
    • Default Term = Force ConEmu as Default Terminal for Console Applications
    • Windows Size = Maximized
    • Quake Style = 120 ms, Quake style slide down , autohide on focus lose
    • Add task for mintty , you can also make this as default task when conemu is run!
    *%LOCALAPPDATA%\wsltty\bin\mintty.exe /bin/wslbridge -t /usr/bin/ssh-agent /bin/zsh -l -new+console:d:%USERPROFILE%
    
    • Tab Bar is Auto Show (Only Show if you Have 2 or more Tabs)
    • Status Bar Removed (Make it Minimal as Possible)
    • Set Font DejaVuSansMonoForPowerline NF
@echo off
if "%aliases%" == "" (
set ALIASES=%USERPROFILE%\.dotfiles\cmd\user-aliases.cmd
)
setlocal enabledelayedexpansion
if "%~1" == "" echo Use /? for help & echo. & goto :p_show
:: check command usage
rem #region parseargument
goto parseargument
:do_shift
shift
:parseargument
set currentarg=%~1
if /i "%currentarg%" equ "/f" (
set aliases=%~2
shift
goto :do_shift
) else if /i "%currentarg%" == "/reload" (
goto :p_reload
) else if "%currentarg%" equ "/?" (
goto :p_help
) else if /i "%currentarg%" equ "/d" (
if "%~2" neq "" (
if "%~3" equ "" (
:: /d flag for delete existing alias
call :p_del %~2
shift
goto :eof
)
)
) else if "%currentarg%" neq "" (
if "%~2" equ "" (
:: Show the specified alias
doskey /macros | findstr /b %currentarg%= && exit /b
echo insufficient parameters.
goto :p_help
) else (
:: handle quotes within command definition, e.g. quoted long file names
set _x=%*
)
)
rem #endregion parseargument
if "%aliases%" neq "%USERPROFILE%\.dotfiles\cmd\user-aliases.cmd" (
set _x=!_x:/f %aliases% =!
if not exist "%aliases%" (
echo ;= @echo off>"%aliases%"
echo ;= rem Call DOSKEY and use this file as the macrofile>>"%aliases%"
echo ;= %%SystemRoot%%\system32\doskey /listsize=1000 /macrofile=%%0%%>>"%aliases%"
echo ;= rem In batch mode, jump to the end of the file>>"%aliases%"
echo ;= goto:eof>>"%aliases%"
echo ;= Add aliases below here>>"%aliases%"
)
)
:: validate alias
for /f "delims== tokens=1,2 usebackq" %%G in (`echo "%_x%"`) do (
set alias_name=%%G
set alias_value=%%H
)
:: leading quotes added while validating
set alias_name=%alias_name:~1%
:: trailing quotes added while validating
set alias_value=%alias_value:~0,-1%
::remove spaces
set _temp=%alias_name: =%
if not ["%_temp%"] == ["%alias_name%"] (
echo Your alias name can not contain a space
endlocal
exit /b
)
:: replace already defined alias
findstr /b /v /i "%alias_name%=" "%ALIASES%" >> "%ALIASES%.tmp"
echo %alias_name%=%alias_value% >> "%ALIASES%.tmp" && type "%ALIASES%.tmp" > "%ALIASES%" & @del /f /q "%ALIASES%.tmp"
doskey /macrofile="%ALIASES%"
endlocal
exit /b
:p_del
set del_alias=%~1
findstr /b /v /i "%del_alias%=" "%ALIASES%" >> "%ALIASES%.tmp"
type "%ALIASES%".tmp > "%ALIASES%" & @del /f /q "%ALIASES%.tmp"
doskey %del_alias%=
doskey /macrofile=%ALIASES%
goto:eof
:p_reload
doskey /macrofile="%ALIASES%"
echo Aliases reloaded
exit /b
:p_show
doskey /macros|findstr /v /r "^;=" | sort
exit /b
:p_help
echo.Usage:
echo.
echo. alias [options] [alias=full command]
echo.
echo.Options:
echo.
echo. /d [alias] Delete an [alias].
echo. /f [macrofile] Path to the [macrofile] you want to store the new alias in.
echo. Default: %cmder_root%\config\user-aliases.cmd
echo. /reload Reload the aliases file. Can be used with /f argument.
echo. Default: %cmder_root%\config\user-aliases.cmd
echo.
echo. If alias is called with no parameters, it will display the list of existing aliases.
echo.
echo. In the command, you can use the following notations:
echo. $* allows the alias to assume all the parameters of the supplied command.
echo. $1-$9 Allows you to seperate parameter by number, much like %%1 in batch.
echo. $T is the command seperator, allowing you to string several commands together into one alias.
echo. For more information, read DOSKEY/?
exit /b
@echo off
rem ***********************************************************************
rem This file is provided under MIT License:
rem http://www.opensource.org/licenses/mit-license.phprem
rem
rem This batch file is a extended cd command.
rem This could save the history and also jump in the histories.
rem For detail help, type <filename> /?
rem
rem Author: Programus (programus@gmail.com)
rem gist url:
rem https://gist.github.com/programus/2d2738b2a746140186f7738b678bdcec
rem
rem this tool need or create 2 temporary files:
rem %TEMP%\dir-list.tmp
rem %TEMP%\dir-prev.tmp
rem ***********************************************************************
if /i [%1]==[/help] goto :printhelp
if /i [%1]==[/h] goto :printhelp
if [%1]==[/?] goto :printhelp
goto :main
:printhelp
echo %~n0 - display all saved path with leading id and name followed if any
echo %~n0 ^<path^> - save current path and jump to ^<path^>
echo %~n0 :^<n^|name^> - jump to the Nth or named path in the saved list
echo %~n0 : - jump to previous path
echo %~n0 name ^<n^>:^<name^> - name the Nth path as ^<name^>
echo %~n0 rm [:]^<n^|name^> - remove the Nth or named path from the list
echo %~n0 clear - clear the list
echo %~n0 /help - print out this help
echo %~n0 /? - same as above
goto :allover
:main
setlocal EnableDelayedExpansion
set tp=%TEMP%\dir-prev.tmp
set tf=%TEMP%\dir-list.tmp
rem extract previous path
set /p ppth=<%tp%
rem read list from file
set len=0
for /f "tokens=*" %%p in (%tf%) do (
set /a "len+=1"
set lines[!len!]=%%p
for /f "tokens=1,2 delims=;" %%a in ("%%p") do set pp=%%a&set nn=%%b
set list[!len!]=!pp!
set list[!nn!]=!pp!
set names[!len!]=!nn!
)
rem list all history
if [%1]==[] (
for /l %%i in (1,1,%len%) do (
set nm=
if not "!names[%%i]!"=="" set nm= ^<--^<^<^<^ (!names[%%i]!^)
echo [%%i] !list[%%i]!!nm!
)
goto :end
)
rem goto previous directory and store current
if [%1]==[:] (
rem get the previous path
set pth="%ppth%"
set pth=!pth:"=!
goto :savecd
)
rem clear all
if /i [%1]==[clear] (
set len=0
goto :write
)
rem name an item
if /i [%1]==[name] (
for /f "tokens=1,2 delims=:" %%a in ("%2") do set no=%%a&set name=%%b
if not "!name!"=="" (
set notNumeric=
for /f "delims=0123456789" %%x in ("!name!") do set notNumeric=%%x
if not defined notNumeric (
echo Error: name cannot be a number.
goto :allover
)
for /l %%i in (1,1,%len%) do (
set nm=!names[%%i]!
if "!nm!"=="!name!" (
echo Error: name has been existed.
goto :allover
)
)
)
set names[!no!]=!name!
goto :write
)
rem mark index should be removed
if /i [%1]==[rm] (
set rmno=%2
rem check names which is a non-numeric
set notNumeric=
for /f "delims=0123456789" %%x in ("%rmno%") do set notNumeric=%%x
if not defined notNumeric (
rem parameter is a name, find out the index
for /l %%i in (1,1,%len%) do (
set nm=!names[%%i]!
if "!nm!"=="!rmno!" (
set rmno=%%i
goto :endloopname
)
)
)
:endloopname
goto :write
)
rem other cases
rem store the argument as path
set pth=%1
rem remove all double-quotation
set pth=%pth:"=%
if [%pth:~0,1%]==[:] (
rem start with ':', mean jump to a history record
rem get the real path
set pth=!list[%pth::=%]!
)
:savecd
rem store current path into history
set /a "len+=1"
set list[!len!]=%cd%
set lines[!len!]=%cd%
:write
rem write back to file
echo off
set j=0
(for /l %%i in (1,1,%len%) do (
rem do not save rm directory
if not [%%i]==[%rmno::=%] (
set pt=!list[%%i]!
rem find out whether current directory is written already
for /l %%k in (0,1,!j!) do (
if /i "!pt!"=="!written[%%k]!" (
rem if it is written already, mark as included
set included=T
)
)
if not "!included!"=="T" (
rem only write the directory if it is not written already, not included.
echo !pt!;!names[%%i]!
rem mark the directory as written
set /a "j+=1"
set written[!j!]=!pt!
)
)
)) > %tf%
rem save current path as previous path
if /i not "%pth%"=="%cd%" (
if defined pth (
call :printcd "%tp%"
)
)
:end
endlocal && set __pth=%pth%
rem change directory
if defined __pth (
cd /d "%__pth%"
set __pth=
)
:allover
exit /b 0
:printcd
echo %cd%>%1
exit /b 0
@echo off
REM Important! Add this to Your Registry
REM regedit then go to:
REM HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
REM create new String Value => "%USERPROFILE%\.dotfiles\cmd\cmdrc.cmd"
REM Load User Aliases
DOSKEY /macrofile=%USERPROFILE%\.dotfiles\cmd\user-aliases.cmd
REM Im Using alias.bat Added in my %USERPROFILE%\bin\alias.bat
REM I can Easily Add Edit Delete Reload new Aliases
REM User CMDs ie: alias.bat
DOSKEY bin=cd %USERPROFILE%\bin
REM CD Shortcuts
DOSKEY ..=cd ..
DOSKEY ...=cd ../..
DOSKEY .3=cd ../../..
DOSKEY .4=cd ../../../..
DOSKEY .5=cd ../../../../..
REM Im Using cdx.bat Added in my %USERPROFILE%\bin\cdx.bat
REM I can Easily Save Directory and Go back and Forth With this Batch File
REM Listing Directory Shortcut in Linux
DOSKEY l=bash -c "ls -lah"
DOSKEY la=bash -c "ls -Al"
DOSKEY lc=bash -c "ls -lcr"
DOSKEY ld=bash -c "ls -ltr"
DOSKEY ll=bash -c "ls -lh"
DOSKEY lm=bash -c "ls -al | more"
DOSKEY ls=bash -c "ls -aF --color=always"
DOSKEY lt=bash -c "ls -lur"
DOSKEY lx=bash -c "ls -lXB"
DOSKEY lz=bash -c "ls -lSr"
REM File and Folder Permission in Linux
DOSKEY mx=bash -c "chmod a+x $*"
DOSKEY 000=bash -c "chmod 000 $*"
DOSKEY 644=bash -c "chmod 644 $*"
DOSKEY 755=bash -c "chmod 755 $*"
REM System Info Short Cut
DOSKEY c=cls
DOSKEY clear=cls
DOSKEY pwd=bash -c "pwd"
DOSKEY tv=tree /f
DOSKEY hs= DOSKEY /history
DOSKEY ps=bash -c "ps auxf"
DOSKEY pg=bash -c "ps aux | grep $*"
DOSKEY mountedinfo=bash -c "df -hT"
DOSKEY ping=bash -c "ping -c 10 $*"
DOSKEY du1=bash -c "du -h --max-depth=1"
DOSKEY da=bash -ic date "+%Y-%m-%d %A %T %Z"
DOSKEY touch=bash -c "touch $*"
DOSKEY rm=bash -c "rm $*"
DOSKEY mv=bash -c "mv $*"
DOSKEY cp=bash -c "cp $*"
REM Add Here All Your Text Editor
DOSKEY np=notepad $*
REM Im Using VS Code Insider so I Tweak it to use code alias
DOSKEY code=code-insiders $*
REM Browse Thru Folder
DOSKEY e=explorer $*
REM Edit System Variable
DOSKEY editenv=rundll32 sysdm.cpl,EditEnvironmentVariables
REM Edit Hosts File
DOSKEY hosts=code-insiders %SYSTEMROOT%\System32\drivers\etc\hosts
REM Edit My DOT Files and Configuration Files
DOSKEY cmdrc=code-insiders %USERPROFILE%\.dotfiles\cmd\cmdrc.cmd
DOSKEY aliases=code-insiders %USERPROFILE%\.dotfiles\cmd\user-aliases.cmd
DOSKEY aliasbat=code-insiders %USERPROFILE%\bin\alias.bat
DOSKEY cdxbat=code-insiders %USERPROFILE%\bin\cdx.bat
DOSKEY bashprofile=code-insiders %USERPROFILE%\.dotfiles\.bash_profile
DOSKEY minttyrc=code-insiders %LOCALAPPDATA%\wsltty\home\Uriah\.minttyrc
REM This is Where I Place All My Bash Alises , Zsh Aliases For SWL
DOSKEY dotfiles= cd %USERPROFILE%\.dotfiles
REM System Shortcut
DOSKEY h=cd %USERPROFILE%
DOSKEY home=cd %USERPROFILE%
DOSKEY windir=cd %SYSTEMROOT%
DOSKEY system32= cd %SYSTEMROOT%\System32
DOSKEY tmp= cd %TMP%
DOSKEY tx=cd temp$tdir/w $*
REM SET Here ALL Your Work Related Directory
DOSKEY user=cd %USERPROFILE%
DOSKEY sites=cd %USERPROFILE%\Sites
REM Your WSL Shared Folder Directory
DOSKEY wsl=cd %LOCALAPPDATA%\Lxss\rootfs
DOSKEY uriah=cd %LOCALAPPDATA%\lxss\home\uriah
DOSKEY root=cd %LOCALAPPDATA%\lxss\root
REM Bashrc Functions , Check Your Bashrc , BashProfile , BashAliases
REM Laravel Based Functions
REM Im Using Ack not Grep in Routes function so it is Required to be Installed in your WSL
DOSKEY routes=bash -ic "routes $*"
DOSKEY logs=bash -ic logs
REM Create Ctags in your Project to Easily Search Functions
DOSKEY tagsInit=bash -ic tagsInit
REM String Related Functions
DOSKEY ff=bash -ic "ff $*"
DOSKEY fstr=bash -ic "fstr $1 $2"
REM Folder Management Functions
DOSKEY mcd=md $1$tcd $1
DOSKEY envpath=bash -ic envpath
DOSKEY swap=bash -ic "swap $1 $2"
DOSKEY sanitize=bash -ic "sanitize $*"
REM Archive Functions (required neccessary package to work)
DOSKEY maketar=bash -ic "maketar $1"
DOSKEY makezip=bash -ic "makezip $1"
DOSKEY extract=bash -ic "extract $*"
REM PHP Dev Tools
DOSKEY php=bash -ic "php $*"
DOSKEY phpenmod=bash -ic "phpenmod $*"
DOSKEY phpdismod=bash -ic "phpdismod $*"
DOSKEY composer=bash -ic "composer $*"
DOSKEY git=bash -ic "git $*"
" Set options and add mapping such that Vim behaves a lot like MS-Windows
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2006 Apr 02
" bail out if this isn't wanted (mrsvim.vim uses this).
if exists("g:skip_loading_mswin") && g:skip_loading_mswin
finish
endif
" set the 'cpoptions' to its Vim default
if 1 " only do this when compiled with expression evaluation
let s:save_cpo = &cpoptions
endif
set cpo&vim
" set 'selection', 'selectmode', 'mousemodel' and 'keymodel' for MS-Windows
behave mswin
" backspace and cursor keys wrap to previous/next line
set backspace=indent,eol,start whichwrap+=<,>,[,]
" backspace in Visual mode deletes selection
vnoremap <BS> d
" CTRL-X and SHIFT-Del are Cut
vnoremap <C-X> "+x
vnoremap <S-Del> "+x
" CTRL-C and CTRL-Insert are Copy
vnoremap <C-C> "+y
vnoremap <C-Insert> "+y
" CTRL-V and SHIFT-Insert are Paste
map <C-V> "+gP
map <S-Insert> "+gP
cmap <C-V> <C-R>+
cmap <S-Insert> <C-R>+
" Pasting blockwise and linewise selections is not possible in Insert and
" Visual mode without the +virtualedit feature. They are pasted as if they
" were characterwise instead.
" Uses the paste.vim autoload script.
exe 'inoremap <script> <C-V>' paste#paste_cmd['i']
exe 'vnoremap <script> <C-V>' paste#paste_cmd['v']
imap <S-Insert> <C-V>
vmap <S-Insert> <C-V>
" Use CTRL-Q to do what CTRL-V used to do
noremap <C-Q> <C-V>
" Use CTRL-S for saving, also in Insert mode
noremap <C-S> :update<CR>
vnoremap <C-S> <C-C>:update<CR>
inoremap <C-S> <C-O>:update<CR>
" For CTRL-V to work autoselect must be off.
" On Unix we have two selections, autoselect can be used.
if !has("unix")
set guioptions-=a
endif
" CTRL-Z is Undo; not in cmdline though
noremap <C-Z> u
inoremap <C-Z> <C-O>u
" CTRL-Y is Redo (although not repeat); not in cmdline though
noremap <C-Y> <C-R>
inoremap <C-Y> <C-O><C-R>
" Alt-Space is System menu
if has("gui")
noremap <M-Space> :simalt ~<CR>
inoremap <M-Space> <C-O>:simalt ~<CR>
cnoremap <M-Space> <C-C>:simalt ~<CR>
endif
" CTRL-A is Select all
noremap <C-A> gggH<C-O>G
inoremap <C-A> <C-O>gg<C-O>gH<C-O>G
cnoremap <C-A> <C-C>gggH<C-O>G
onoremap <C-A> <C-C>gggH<C-O>G
snoremap <C-A> <C-C>gggH<C-O>G
xnoremap <C-A> <C-C>ggVG
" CTRL-Tab is Next window
noremap <C-Tab> <C-W>w
inoremap <C-Tab> <C-O><C-W>w
cnoremap <C-Tab> <C-C><C-W>w
onoremap <C-Tab> <C-C><C-W>w
" CTRL-F4 is Close window
noremap <C-F4> <C-W>c
inoremap <C-F4> <C-O><C-W>c
cnoremap <C-F4> <C-C><C-W>c
onoremap <C-F4> <C-C><C-W>c
" restore 'cpoptions'
set cpo&
if 1
let &cpoptions = s:save_cpo
unlet s:save_cpo
endif
filetype off "required"
" set the runtime path to include Vundle and initialize"
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-vinegar'
Plugin 'scrooloose/nerdtree'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'Xuyuanp/nerdtree-git-plugin'
Plugin 'flazz/vim-colorschemes'
Plugin 'tiagofumo/vim-nerdtree-syntax-highlight'
Plugin 'mileszs/ack.vim'
Plugin 'skwp/greplace.vim'
" Dont Add Plugins Below this Line"
call vundle#end() "required"
filetype plugin indent on "required"
# check if the user is Root if Yes Then Do the Following
if [[ $EUID = 0 ]]; then
alias uriah='cd /home/uriah'
fi
# All Function Aliases are applied to All Users
alias h='cd ~'
alias home='cd ~'
alias c='clear'
# Short Cut Directory
alias uriah='cd /home/uriah'
alias sites='cd /var/www/'
alias code='cd /var/www/reporthero.io'
alias laradock='cd /var/www/reporthero.io/laradock'
alias reloadsh='exec $SHELL -l'
# Listing Directory Shortcut
alias la='ls -Al' # show hidden files
alias ls='ls -aF --color=always' # add colors and file type extensions
alias lx='ls -lXB' # sort by extension
alias lz='ls -lSr' # sort by size
alias lc='ls -lcr' # sort by change time
alias lt='ls -lur' # sort by access time
alias lr='ls -lR' # recursive ls
alias ld='ls -ltr' # sort by date
alias lm='ls -al |more' # pipe through 'more'
# CD Shortcut
alias ..='cd ..'
alias ...='cd ../..'
alias ....='../../..'
alias .....='../../../..'
alias ......='../../../../..'
# File and Folder Permission
alias mx='chmod a+x'
alias 000='chmod 000'
alias 644='chmod 644'
alias 755='chmod 755'
# System Info Short Cut
alias ps='ps auxf'
alias pg='ps aux | grep $*' #requires an argument
alias mountedinfo='df -hT'
alias ping='ping -c 10'
alias du1='du -h --max-depth=1'
alias da='date "+%Y-%m-%d %A %T %Z"'
alias c='clear'
alias hs='history | grep $1'
# File Shortcut
alias bashprofile='vim ~/.bash_profile'
# Laravel Shortcut
alias newapp='composer create-project laravel/laravel $1 --no-progress --profile --prefer-dist'
alias appname='php artisan app:name'
alias artisan='php artisan'
alias dump='php artisan dump'
alias migrate='php artisan migrate'
alias optimize='php artisan optimize'
alias serve='php artisan serve'
alias seed='php artisan db:seed'
alias tinker='php artisan tinker'
alias keygen='php artisan key:generate'
# Laravel Clear Cache Commands
alias c1='php artisan cache:clear'
alias c2='php artisan view:clear'
alias c3='php artisan route:clear'
alias c4='php artisan config:clear'
# Laravel Test
alias t='vendor/bin/phpunit'
alias b='vendor/bin/behat'
alias b:init='vendor/bin/behat --init'
alias b:api='vendor/bin/behat -dl'
alias b:snip='vendor/bin/behat --append-snippets'
# Laravel Make Commands
alias mauth='php artisan make:auth'
alias mcmd='php artisan make:command'
alias mctrl='php artisan make:controller'
alias mevent='php artisan make:event'
alias mjob='php artisan make:job'
alias mlis='php artisan make:listener'
alias mmail='php artisan make:mail'
alias mmid='php artisan make:middleware'
alias mmig='php artisan make:migration'
alias mmod='php artisan make:model'
alias mnot='php artisan make:notification'
alias mpol='php artisan make:policy'
alias mpro='php artisan make:provider'
alias mreq='php artisan make:request'
alias mseed='php artisan make:seeder'
alias mtest='php artisan make:test'
# Laravel IDE Helper /PHPSTORM
alias ci_helper='composer require --dev barryvdh/laravel-ide-helper'
alias meta_helper='php artisan ide-helper:meta'
alias model_helper='php artisan ide-helper:models'
# Laravel Migrations
alias mi='php artisan migrate:install'
alias mr='php artisan migrate:refresh'
alias mrb='php artisan migrate:rollback'
alias ms='php artisan migrate:status'
# Laravel Routes
alias rc='php artisan route:cache'
alias rl='php artisan route:list'
alias rf='php artisan route:list | grep $*'
# Other Laravel Command Shortcut
alias cc='php artisan config:cache'
alias eg='php artisan event:generate'
alias sr='php artisan schedule:run'
alias sl='php artisan storage:link'
alias vp='php artisan vendor:publish'
# Laradock
alias ldock:init='git submodule add https://github.com/LaraDock/laradock.git'
# Laravel Specific Functions
# Create A Tag For Your Project
function tagsInit()
{
ctags -R --exclude=.git --exclude=node_modules --exclude=test --exclude=vendor;
echo "tags file Created! type vim tags [keyword]";
echo "shortcut inside vim tt=find tn=next tp=previous ts=list";
}
# List All Routes or Filter by Name
function routes()
{
if [ $# -eq 0 ]; then
php artisan route:list
else
php artisan route:list | ack ${1}
fi
}
# Tail Laravel Logs
function logs () {
tail -f storage/logs/laravel.log | awk '
{matched=0}
/INFO:/ {matched=1; print "\033[0;37m" $0 "\033[0m"} # WHITE
/NOTICE:/ {matched=1; print "\033[0;36m" $0 "\033[0m"} # CYAN
/WARNING:/ {matched=1; print "\033[0;34m" $0 "\033[0m"} # BLUE
/ERROR:/ {matched=1; print "\033[0;31m" $0 "\033[0m"} # RED
/ALERT:/ {matched=1; print "\033[0;35m" $0 "\033[0m"} # PURPLE
matched==0 {print "\033[0;33m" $0 "\033[0m"} # YELLOW
'
}
# File Management Section
# Pretty-print of some PATH variables:
alias envpath='echo -e ${PATH//:/\\n}'
# Find a file with a pattern in name:
function ff() { find . -type f -iname '*'"$*"'*' -ls ; }
# Find Str in a Patter
# Usage : fstr DB_HOST '.env'
function fstr()
{
OPTIND=1
local mycase=""
local usage="fstr: find string in files.
Usage: fstr [-i] \"pattern\" [\"filename pattern\"] "
while getopts :it opt
do
case "$opt" in
i) mycase="-i " ;;
*) echo "$usage"; return ;;
esac
done
shift $(( $OPTIND - 1 ))
if [ "$#" -lt 1 ]; then
echo "$usage"
return;
fi
find . -type f -name "${2:-*}" -print0 | \
xargs -0 egrep --color=always -sn ${case} "$1" 2>&- | more
}
# Handy Extract Program
function extract()
{
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xvf $1 ;;
*.tbz2) tar xvjf $1 ;;
*.tgz) tar xvzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via >extract<" ;;
esac
else
echo "'$1' is not a valid file!"
fi
}
# Make Dir and CD to it
function mcd ()
{
mkdir -p $1
cd $1
}
# Switch a File or Folder
function swap()
{
if [ ! -z "$2" ] && [ -e "$1" ] && [ -e "$2" ] && ! [ "$1" -ef "$2" ] && (([ -f "$1" ] && [ -f "$2" ]) || ([ -d "$1" ] && [ -d "$2" ])) ; then
tmp=$(mktemp -d $(dirname "$1")/XXXXXX)
mv "$1" "$tmp" && mv "$2" "$1" && mv "$tmp"/"$1" "$2"
rmdir "$tmp"
else
echo "Usage: swap file1 file2 or swap dir1 dir2"
fi
}
# Creates an archive (*.tar.gz) from given directory.
function maketar() { tar cvzf "${1%%/}.tar.gz" "${1%%/}/"; }
# Create a ZIP archive of a file or folder.
function makezip() { zip -r "${1%%/}.zip" "$1" ; }
# Make your directories and files access rights sane.
function sanitize() { chmod -R u=rwX,g=rX,o= "$@" ;}
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
export PATH=$HOME/bin:/usr/local/bin:$PATH
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="materialshellelectro"
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)
source $ZSH/oh-my-zsh.sh
source $HOME/.bash_profile
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
alias zshrc="vim ~/.zshrc"
alias ohmyzsh="vim ~/.oh-my-zsh"
export PATH="$PATH:$HOME/.composer/vendor/bin"
# Added Docker-Completion
fpath=(~/.zsh/completion $fpath)
autoload -Uz compinit && compinit -i
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
#if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
# . /etc/bash_completion
#fi
if [ -f /mnt/c/Users/uriah/.dotfiles/.bash_profile ]; then
. /mnt/c/Users/uriah/.dotfiles/.bash_profile
fi
export PATH="$PATH:/home/uriah/.composer/vendor/bin"
;= @echo off
;= rem Call DOSKEY and use this file as the macrofile
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0%
;= rem In batch mode, jump to the end of the file
;= goto:eof
;= Add aliases below here
e.=explorer .
unalias=alias /d $1
realias=alias /reload
sshkey=cat ~/.ssh/id_rsa.pub | echo 'SSH KEY Copied to clipboard.'
;= rem Laravel Shortcut
appname=bash -c "php artisan app:name"
artisan=bash -c "php artisan $*"
dump=bash -c "php artisan dump"
migrate=bash -c "php artisan migrate $*"
optimize=bash -c "php artisan optimize $*"
serve=bash -c "php artisan serve $*"
seed=bash -c "php artisan db:seed $*"
tinker=bash -c "php artisan tinker"
keygen=bash -c "php artisan key:generate"
;= rem Laravel Test Shortcut
t=bash -c "vendor/bin/phpunit"
b=bash -c "vendor/bind/behat"
b:api=bash -c "vendor/bin/behat -dl"
b:init=bash -c "vendor/bin/behat --init"
b:snip=bash -c "vendor/bin/behat --append-snippets"
;= rem Laravel Clear Cache Commands
c1=bash -c "php artisan cache:clear"
c2=bash -c "php artisan view:clear"
c3=bash -c "php artisan route:clear"
c4=bash -c "php artisan config:clear"
;= rem Laravel Make Commands
mauth=bash -c "php artisan make:auth $*"
mcmd=bash -c "php artisan make:command $*"
mctrl=bash -c "php artisan make:controller $*"
mevent=bash -c "php artisan make:event $*"
mjob=bash -c "php artisan make:job $*"
mlis=bash -c "php artisan make:listener $*"
mmail=bash -c "php artisan make:mail $*"
mmid=bash -c "php artisan make:middleware $*"
mmig=bash -c "php artisan make:migration $*"
mmod=bash -c "php artisan make:model $*"
mnot=bash -c "php artisan make:notification $*"
mpol=bash -c "php artisan make:policy $*"
mpro=bash -c "php artisan make:provider $*"
mreq=bash -c "php artisan make:request $*"
mseed=bash -c "php artisan make:seeder $*"
mtest=bash -c "php artisan make:test $*"
;= rem Laravel IDE Helper /PHPSTORM
model_helper=bash -c "php artisan ide-helper:models $*"
meta_helper=bash -c "php artisan ide-helper:meta $*"
ci_helper=bash -c "composer require --dev barryvdh/laravel-ide-helper"
;= rem Laravel Migrations
mi="bash -c php artisan migrate:install
mr=bash -c "php artisan migrate:refresh $*"
mrb=bash -c "php artisan migrate:rollback $*"
ms=bash -c "php artisan migrate:status $*"
;= rem Laravel Routes
rc=bash -c "php artisan route:cache"
rl=bash -c "php artisan route:list"
rf=bash -c "php artisan route:list | grep $*"
;= rem Other Laravel Command Shortcut
cc=bash -c "php artisan config:cache $*"
eg=bash -c "php artisan event:generate $*"
sl=bash -c "php artisan storage:link $*"
sr=bash -c "php artisan schedule:run $*"
vp=bash -c "php artisan vendor:publish $*"
;= rem LaraDock
ldock:i=bash -c "git submodule add https://github.com/LaraDock/laradock.git"
nginx:i=bash -ic cp laradock/nginx/sites/sample.conf.example laradock/nginx/${1%%/}.conf
nginx:o=code-insiders laradocks/nginx/sites/${1%%/}.conf
ldock:compose=code-insiders laradock/docker-compose.yml
up=docker-compose up $*
down=docker-compose down
--ignore-ack-defaults
# This is the default ackrc for ack version 2.14.
# There are four different ways to match
#
# is: Match the filename exactly
#
# ext: Match the extension of the filename exactly
#
# match: Match the filename against a Perl regular expression
#
# firstlinematch: Match the first 250 characters of the first line
# of text against a Perl regular expression. This is only for
# the --type-add option.
### Directories to ignore
# Git
# http://git-scm.com/
--ignore-directory=is:.git
# Node modules created by npm
--ignore-directory=is:node_modules
# Vendor workspace folder
# http://laravel.com
--ignore-directory=is:vendor
--ignore-directory=is:bootstrap
--ignore-directory=is:storage
--ignore-directory=is:build
--ignore-directory=is:laradock
--ignore-directory=is:docker
--ignore-dir=.idea
--ignore-dir=public
--ignore-dir=resources
--ignore-dir=assets
--ignore-dir=js
--ignore-dir=css
--ignore-dir=components
--ignore-dir=sass
### Files to ignore
# minified Javascript
--ignore-file=match:/[.-]min[.]js$/
--ignore-file=match:/[.]js[.]min$/
# minified CSS
--ignore-file=match:/[.]min[.]css$/
--ignore-file=match:/[.]css[.]min$/
# JS and CSS source maps
--ignore-file=match:/[.]js[.]map$/
--ignore-file=match:/[.]css[.]map$/
# PDFs, because they pass Perl's -T detection
--ignore-file=ext:pdf
--ignore-file=ext:log
# Common graphics, just as an optimization
--ignore-file=ext:gif,jpg,jpeg,png
# Mac
--ignore-file=match:/[.]DS_Store$/
--ignore-file=match:/favicon.ico$/
# Laravel ENV Dev
--ignore-file=match:/[.]env$/
--ignore-file=match:/[.]env.example$/
--ignore-file=match:/tags$/
--ignore-file=match:/yarn.lock$/
--ignore-file=match:/composer.lock$/
--ignore-file=match:/readme.md$/
--ignore-file=match:/[.]gitattributes$/
--ignore-file=match:/[.]gitignore$/
--ignore-file=match:/Dockerfile$/
--ignore-file=match:/dockerfile$/
--ignore-file=match:/docker-compose.yml$/
--ignore-file=match:/Docker-compose.yml$/
--ignore-file=match:/[.]docker-compose.yml$/
--ignore-file=match:/Vagrantfile$/
--ignore-file=match:/Homestead.yaml$/
--ignore-file=match:/[.]gitmodules$/
--ignore-file=match:/[.]htaccess$/
--ignore-file=match:/[.]_htaccess$/
--ignore-file=match:/robots.txt$/
--ignore-file=match:/server.php$/
--ignore-file=match:/web.config$/
--ignore-file=match:/[.]phpstorm.meta.php$/
# Makefiles
# http://www.gnu.org/s/make/
--type-add=make:is:makefile
--type-add=make:is:Makefile
# Dockerfile
# http://docker.io
--type-add=make:is:Dockerfile
--type-add=make:is:docker-compose.yml
# Vagrantfile
# http://vagrant.up
--type-add=make:is:Vagrantfile
--type-add=make:is:Homestead.yaml
# Batch
--type-add=batch:ext:bat,cmd
# CSS
# http://www.w3.org/Style/CSS/
--type-add=css:ext:css
# HTML
--type-add=html:ext:htm,html
# JavaScript
--type-add=js:ext:js
# JSON
# http://www.json.org/
--type-add=json:ext:json
# PHP
# http://www.php.net/
--type-add=php:ext:php,phpt,php3,php4,php5,phtml
--type-add=php:firstlinematch:/^#!.*\bphp/
# Sass
# http://sass-lang.com
--type-add=sass:ext:sass,scss
# Shell
--type-add=shell:ext:sh,bash,csh,tcsh,ksh,zsh,fish
--type-add=shell:firstlinematch:/^#!.*\b(?:ba|t?c|k|z|fi)?sh\b/
# SQL
# http://www.iso.org/iso/catalogue_detail.htm?csnumber=45498
--type-add=sql:ext:sql,ctl
# http://www.vim.org/
--type-add=vim:ext:vim
# XML
# http://www.w3.org/TR/REC-xml/
--type-add=xml:ext:xml,dtd,xsl,xslt,ent
--type-add=xml:firstlinematch:/<[?]xml/
# YAML
# http://yaml.org/
--type-add=yaml:ext:yaml,yml
# VUE
# http://vuejs.org
--type-add=vue:ext:vue
# BLADE
# https://laravel.com/docs/5.3/blade
--type-add=blade:ext:blade.php
# Application Available to Our Machine
export PATH=$PATH:/mnt/c/Windows/System32
# check if the user is Root if Yes Then Do the Following
if [[ $EUID = 0 ]]; then
alias uriah='cd /home/uriah'
fi
# All Function Aliases are applied to All Users
alias h='cd ~'
alias home='cd ~'
alias c='clear'
# Local Shared Directory
alias uriah='cd /mnt/c/Users/uriah'
alias windir='cd /mnt/c/Windows'
alias sites='cd /mnt/c/Users/uriah/sites'
alias system32='cd /mnt/c/Windows/System32'
alias codes='cd /mnt/c/Users/uriah/Code'
alias html='ls *.html'
# Listing Directory Shortcut
alias la='ls -Al' # show hidden files
alias ls='ls -aF --color=always' # add colors and file type extensions
alias lx='ls -lXB' # sort by extension
alias lz='ls -lSr' # sort by size
alias lc='ls -lcr' # sort by change time
alias lt='ls -lur' # sort by access time
alias lr='ls -lR' # recursive ls
alias ld='ls -ltr' # sort by date
alias lm='ls -al |more' # pipe through 'more'
# CD Shortcut
alias ..='cd ..'
alias ...='cd ../..'
alias ....='../../..'
alias .....='../../../..'
alias ......='../../../../..'
# File and Folder Permission
alias mx='chmod a+x'
alias 000='chmod 000'
alias 644='chmod 644'
alias 755='chmod 755'
# System Info Short Cut
alias ps='ps auxf'
alias pg='ps aux | grep $*' #requires an argument
alias mountedinfo='df -hT'
alias ping='ping -c 10'
alias du1='du -h --max-depth=1'
alias da='date "+%Y-%m-%d %A %T %Z"'
alias c='clear'
alias hs='history | grep $1'
# Text Editors
alias code='cmd.exe /c code-insiders'
alias np='cmd.exe /c notepad'
# File Shortcut
alias editenv='cmd.exe /c rundll32 sysdm.cpl,EditEnvironmentVariables'
alias hosts='vim /mnt/c/Windows/System32/drivers/etc/hosts'
alias cmdrc='vim /mnt/c/Users/uriah/.dotfiles/cmdrc.cmd'
alias bashprofile='vim /mnt/c/Users/uriah/.dotfiles/.bash_profile'
# Tooling
alias e='cmd.exe /c explorer .'
alias docker='cmd.exe /c docker'
alias docker-machine='cmd.exe /c docker-machine'
alias docker-compose='cmd.exe /c docker-compose'
# Laravel Shortcut
alias newapp='composer create-project laravel/laravel $1 --no-progress --profile --prefer-dist'
alias appname='php artisan app:name'
alias artisan='php artisan'
alias dump='php artisan dump'
alias migrate='php artisan migrate'
alias optimize='php artisan optimize'
alias serve='php artisan serve'
alias seed='php artisan db:seed'
alias tinker='php artisan tinker'
alias keygen='php artisan key:generate'
# Laravel Clear Cache Commands
alias c1='php artisan cache:clear'
alias c2='php artisan view:clear'
alias c3='php artisan route:clear'
alias c4='php artisan config:clear'
# Laravel Test
alias t='vendor/bin/phpunit'
alias b='vendor/bin/behat'
alias b:init='vendor/bin/behat --init'
alias b:api='vendor/bin/behat -dl'
alias b:snip='vendor/bin/behat --append-snippets'
# Laravel Make Commands
alias mauth='php artisan make:auth'
alias mcmd='php artisan make:command'
alias mctrl='php artisan make:controller'
alias mevent='php artisan make:event'
alias mjob='php artisan make:job'
alias mlis='php artisan make:listener'
alias mmail='php artisan make:mail'
alias mmid='php artisan make:middleware'
alias mmig='php artisan make:migration'
alias mmod='php artisan make:model'
alias mnot='php artisan make:notification'
alias mpol='php artisan make:policy'
alias mpro='php artisan make:provider'
alias mreq='php artisan make:request'
alias mseed='php artisan make:seeder'
alias mtest='php artisan make:test'
# Laravel IDE Helper /PHPSTORM
alias ci_helper='composer require --dev barryvdh/laravel-ide-helper'
alias meta_helper='php artisan ide-helper:meta'
alias model_helper='php artisan ide-helper:models'
# Laravel Migrations
alias mi='php artisan migrate:install'
alias mr='php artisan migrate:refresh'
alias mrb='php artisan migrate:rollback'
alias ms='php artisan migrate:status'
# Laravel Routes
alias rc='php artisan route:cache'
alias rl='php artisan route:list'
alias rf='php artisan route:list | grep $*'
# Other Laravel Command Shortcut
alias cc='php artisan config:cache'
alias eg='php artisan event:generate'
alias sr='php artisan schedule:run'
alias sl='php artisan storage:link'
alias vp='php artisan vendor:publish'
# Laradock
alias ldock:init='git submodule add https://github.com/LaraDock/laradock.git'
# Laravel Specific Functions
# Create A Tag For Your Project
function tagsInit()
{
ctags -R --exclude=.git --exclude=node_modules --exclude=test --exclude=vendor;
echo "tags file Created! type vim tags [keyword]";
echo "shortcut inside vim tt=find tn=next tp=previous ts=list";
}
# List All Routes or Filter by Name
function routes()
{
if [ $# -eq 0 ]; then
php artisan route:list
else
php artisan route:list | ack ${1}
fi
}
# Tail Laravel Logs
function logs () {
tail -f storage/logs/laravel.log | awk '
{matched=0}
/INFO:/ {matched=1; print "\033[0;37m" $0 "\033[0m"} # WHITE
/NOTICE:/ {matched=1; print "\033[0;36m" $0 "\033[0m"} # CYAN
/WARNING:/ {matched=1; print "\033[0;34m" $0 "\033[0m"} # BLUE
/ERROR:/ {matched=1; print "\033[0;31m" $0 "\033[0m"} # RED
/ALERT:/ {matched=1; print "\033[0;35m" $0 "\033[0m"} # PURPLE
matched==0 {print "\033[0;33m" $0 "\033[0m"} # YELLOW
'
}
# File Management Section
# Pretty-print of some PATH variables:
alias envpath='echo -e ${PATH//:/\\n}'
# Find a file with a pattern in name:
function ff() { find . -type f -iname '*'"$*"'*' -ls ; }
# Find Str in a Patter
# Usage : fstr DB_HOST '.env'
function fstr()
{
OPTIND=1
local mycase=""
local usage="fstr: find string in files.
Usage: fstr [-i] \"pattern\" [\"filename pattern\"] "
while getopts :it opt
do
case "$opt" in
i) mycase="-i " ;;
*) echo "$usage"; return ;;
esac
done
shift $(( $OPTIND - 1 ))
if [ "$#" -lt 1 ]; then
echo "$usage"
return;
fi
find . -type f -name "${2:-*}" -print0 | \
xargs -0 egrep --color=always -sn ${case} "$1" 2>&- | more
}
# Handy Extract Program
function extract()
{
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xvf $1 ;;
*.tbz2) tar xvjf $1 ;;
*.tgz) tar xvzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via >extract<" ;;
esac
else
echo "'$1' is not a valid file!"
fi
}
# Make Dir and CD to it
function mcd ()
{
mkdir -p $1
cd $1
}
# Switch a File or Folder
function swap()
{
if [ ! -z "$2" ] && [ -e "$1" ] && [ -e "$2" ] && ! [ "$1" -ef "$2" ] && (([ -f "$1" ] && [ -f "$2" ]) || ([ -d "$1" ] && [ -d "$2" ])) ; then
tmp=$(mktemp -d $(dirname "$1")/XXXXXX)
mv "$1" "$tmp" && mv "$2" "$1" && mv "$tmp"/"$1" "$2"
rmdir "$tmp"
else
echo "Usage: swap file1 file2 or swap dir1 dir2"
fi
}
# Creates an archive (*.tar.gz) from given directory.
function maketar() { tar cvzf "${1%%/}.tar.gz" "${1%%/}/"; }
# Create a ZIP archive of a file or folder.
function makezip() { zip -r "${1%%/}.zip" "$1" ; }
# Make your directories and files access rights sane.
function sanitize() { chmod -R u=rwX,g=rX,o= "$@" ;}
# Project Related Aliases
alias reporthero='ssh root@104.131.6.31'
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
if [ -t 1 ]; then
exec zsh
fi
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin directories
PATH="$HOME/bin:$HOME/.local/bin:$PATH"
set nocompatible " Disable vi-compatibility "
" -------------DEPENDENCY--------------"
so ~/.vim/plugins.vim
so ~/.vim/mswin.vim
" -------------THEME RELATED--------------"
set encoding=utf-8 " Necessary to show Unicode glyphs "
syntax enable
set background=dark
colorscheme Dev_Delight
" -------------TERMINAL RELATED--------------"
set t_Co=256
set term=xterm-256color
set title " change the terminal's title
set laststatus=0 " Hide Status line, 2 for always show"
"-------------FILE HISTORY--------------"
set history=1000 " remember more commands and search history
set undolevels=1000 " use many muchos levels of undo
"-------------Buffers--------------"
" Quickly go forward or backward to buffer "
nmap :bp :BufSurfBack<cr>
nmap :bn :BufSurfForward<cr>
set autowrite "Save on buffer switch "
"-------------GENERAL SETTINGS--------------"
set showmode " always show what mode we're currently editing in "
set nowrap " don't wrap lines "
set backspace=indent,eol,start " allow backspacing over everything in insert mode "
set visualbell " don't beep "
set noerrorbells " don't beep "
set mouse=a " Allows Your To Use Mouse "
set timeout timeoutlen=1000 ttimeoutlen=10
"-------------INDENTION--------------"
set autoindent " always set autoindenting on "
set copyindent " copy the previous indentation on autoindenting "
"-------------TABS--------------"
set smarttab
set tabstop=4 " a tab is four spaces "
set softtabstop=4 " when hitting <BS>, pretend like a tab is removed, even if spaces "
set expandtab " expand tabs by default (overloadable per file type later) "
set shiftwidth=4 " number of spaces to use for autoindenting "
set shiftround " use multiple of shiftwidth when indenting with '<' and '>' "
"-------------LINE NUMBER--------------"
set nonumber " always show line numbers "
set linespace=15
" go to line no ie.: $number <enter> "
nnoremap <CR> G
hi LineNr ctermfg=none
hi LineNr ctermbg=none
" fake custom left padding for each window "
set foldcolumn=2
hi foldcolumn ctermbg=none
"-------------Split Management--------------"
" Split Default Layout"
set splitbelow
set splitright
set fillchars+=stl:\ ,stlnc:\ "
hi VertSplit cterm=none ctermfg=red ctermbg=none
"Resizing Split"
nmap == :vertical resize +5<cr>
nmap =25 :vertical resize 40<cr>
nmap =50 <c-w>=
nmap =75 :vertical resize 120<cr>
"Switching between splits. "
nmap <C-J> <C-W><C-J>
nmap <C-K> <C-W><C-K>
nmap <C-H> <C-W><C-H>
nmap <C-L> <C-W><C-L>
" Opening splits "
nmap vsp :vsplit<cr>
nmap sp :split<cr>
"-------------SEARCH--------------"
highlight Search cterm=underline
set ignorecase " ignore case when searching "
set smartcase " ignore case if search pattern is all lowercase "
set hlsearch " Highlight all matched terms. "
set incsearch " Incrementally highlight, as we type. "
nnoremap <F3> :set hlsearch!<CR>
nmap <Leader><space> :nohlsearch<cr>
"-------------Plugins--------------"
"/
"/ Vim Vinegar
"/
" press [dash] to view NetrW "
" press Ctrl [6] to go back "
"/
"/ CtrlP
"/
map <C-p> :CtrlP<cr>
nmap <C-e> :CtrlPMRUFiles<cr>
let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git\|tags\|bootstrap\|tests\|vendor\|storage\|laradock\|docker\|npm-debug'
let g:ctrlp_match_window = 'top,order:ttb,min:1,max:30,results:30'
" I don't want to pull up these folders/files when calling CtrlP "
set wildignore+=*/vendor/**
set wildignore+=*/node_modules/**
set wildignore+=*/tags/**
"Once CtrlP is open:
"Press <F5> to purge the cache for the current directory to get new files, remove deleted files and apply new ignore options.
"Press <c-f> and <c-b> to cycle between modes.
"Press <c-d> to switch to filename only search instead of full path.
"Press <c-r> to switch to regexp mode.
"Use <c-j>, <c-k> or the arrow keys to navigate the result list.
"Use <c-t> or <c-v>, <c-x> to open the selected entry in a new tab or in a new split.
"Use <c-n>, <c-p> to select the next/previous string in the prompt's history.
"Use <c-y> to create a new file and its parent directories.
"Use <c-z> to mark/unmark multiple files and <c-o> to open them.
"Run :help ctrlp-mappings or submit ? in CtrlP for more mapping help.
"/
"/ NERD TREE
"/
nmap <C-\> :NERDTreeToggle<cr>
let g:NERDTreeDirArrowExpandable = '▸'
let g:NERDTreeDirArrowCollapsible = '▾'
let NERDTreeHijackNetrw = 0
"/
"/ NERD TREE SYNTAX HIGHLIGHT
"/
let g:NERDTreeFileExtensionHighlightFullName = 1
let g:NERDTreeExactMatchHighlightFullName = 1
let g:NERDTreePatternMatchHighlightFullName = 1
let g:NERDTreeHighlightFolders = 1
let g:NERDTreeHighlightFoldersFullName = 1
"/
"/ NerdTree Git
"/
let g:NERDTreeIndicatorMapCustom = {
\ "Modified" : "✹",
\ "Staged" : "✚",
\ "Untracked" : "✭",
\ "Renamed" : "➜",
\ "Unmerged" : "═",
\ "Deleted" : "✖",
\ "Dirty" : "✗",
\ "Clean" : "✔︎",
\ "Unknown" : "?"
\ }
"/
"/ CTags
"/
" You Need to Install exuberant ctags to use this "
set tags=tags
nmap tt :tag<space>
nmap tp :tp<cr>
nmap tn :tn<cr>
nmap ts :ts<cr>
"/
"/ ACK
"/
" You Need to Install ack-grep to use This "
cnoreabbrev Ack Ack!
" Ignore Certain File and Folder in Search "
" case insensitive for a word with php extension "
nnoremap ack :Ack! -i -w --php
\--ignore-dir={vendor,node_modules,storage,bootstrap,config,public,docker,resources}
\--ignore-file='match:/tags/'<space>
" Short Cut Keys "
" ? a quick summary of these keys, repeat to close
" o to open (same as Enter)
" O to open and close the quickfix window
" go to preview file, open but maintain focus on ack.vim results
" t to open in new tab
" T to open in new tab without moving to it
" h to open in horizontal split
" H to open in horizontal split, keeping focus on the results
" v to open in vertical split
" gv to open in vertical split, keeping focus on the results
" q to close the quickfix window
"/
"/ GReplace
"/
set grepprg=ack
let g:grep_cmd_opts = '--noheading'
"-------------BACKUP and SWAP FILES--------------"
" Swap files out of the project root "
"set backupdir=~/.vim/backup//"
set nobackup " We Are Using GIT "
"set directory=~/.vim/swap//"
set noswapfile
"-------------Mappings--------------"
let mapleader = ","
let g:mapleader = ","
" Save Us From Pressing Shift "
nnoremap ; :
" Down is really the next line "
nnoremap j gj
nnoremap k gk
"Easy escaping to normal model "
imap jj <esc>
" Disable Arrow Keys "
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
"Make it easy to edit the Vimrc file. "
nmap <silent> <leader>ev :e $MYVIMRC<CR>
nmap <leader>ep :e ~/.vim/plugins.vim<CR>
" Create/edit file in the current directory "
nmap :ed :edit %:p:h/
"Auto change directory to match current file ,cd "
nnoremap ,cd :cd %:p:h<CR>:pwd<CR>
"Pasting large amounts of text into Vim "
set pastetoggle=<F2>
" Use Q for formatting the current paragraph (or selection)
vmap Q gq
nmap Q gqap
"-------------Auto-Source--------------"
"Automatically source the Vimrc file on save. "
augroup autosourcing
autocmd!
autocmd BufWritePost .vimrc source %
augroup END
" Sudo Save "
cmap w!! w !sudo tee % >/dev/null
" Add the New Tag When File is Saved "
autocmd BufWritePost *
\ if filereadable('tags') |
\ call system('ctags -a '.expand('%')) |
\ endif
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
export PATH=$HOME/bin:/usr/local/bin:$PATH
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="materialshellelectro"
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
ZSH_CUSTOM="/mnt/c/Users/uriah/.dotfiles/oh-my-zsh"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)
source $ZSH/oh-my-zsh.sh
source "/mnt/c/Users/uriah/.dotfiles/.bash_profile"
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
alias zshconfig="vim ~/.zshrc"
alias ohmyzsh="vim ~/.oh-my-zsh"
export PATH="$PATH:$HOME/.composer/vendor/bin"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment