From: Andrew DeFaria Date: Thu, 18 Sep 2014 16:57:34 +0000 (-0700) Subject: Merge branch 'master' of defaria.com:/opt/git/clearscm X-Git-Url: https://defaria.com/gitweb/?a=commitdiff_plain;h=759ea804468fe887d150c9b2b01fb9607c4d5ea4;hp=eb380a25ccfdfae09ea928339ce2713a64ae0963;p=clearscm.git Merge branch 'master' of defaria.com:/opt/git/clearscm --- diff --git a/etc/EmacsEverywhere.txt b/etc/EmacsEverywhere.txt new file mode 100644 index 0000000..906f046 --- /dev/null +++ b/etc/EmacsEverywhere.txt @@ -0,0 +1,132 @@ +; +; AutoHotkey Version: 1.x +; Language: English +; Platform: Win9x/NT +; Author: David +; Modified: Andrew DeFaria +; +; Script Function: +; Provides an Emacs-like keybinding emulation mode that can be toggled on and off using +; the ScrollLoke key. + +;========================== +;Initialise +;========================== +#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. +SendMode Input ; Recommended for new scripts due to its superior speed and reliability. +SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. +SetTitleMatchMode, RegEx + +enabledIcon := "emacs_everywhere_16.ico" +disabledIcon := "emacs_everywhere_disabled_16.ico" +IsInEmacsMode := false +SetEmacsMode(false) + +;========================== +;Functions +;========================== +SetEmacsMode(toActive) { + local iconFile := toActive ? enabledIcon : disabledIcon + local state := toActive ? "ON" : "OFF" + + IsInEmacsMode := toActive + TrayTip, Emacs Everywhere, Emacs mode is %state%, 10, 1 + Menu, Tray, Icon, %iconFile%, + Menu, Tray, Tip, Emacs Everywhere`nEmacs mode is %state% + + Send {Shift Up} +} + +SendCommand(emacsKey, translationToWindowsKeystrokes, secondWindowsKeystroke="") { + global IsInEmacsMode + if (IsInEmacsMode) { + Send, %translationToWindowsKeystrokes% + if (secondWindowsKeystroke<>"") { + Send, %secondWindowsKeystroke% + } + } else { + Send, %emacsKey% ;passthrough original keystroke + } + return +} + +;========================== +;Emacs mode toggle +;========================== +ScrollLock:: + SetEmacsMode(!IsInEmacsMode) +return + +;========================== +;Character navigation +;========================== + +#IfWinActive ahk_class Chrome_WidgetWin_1 +$^f::SendCommand("^f","{Right}") +$^s::SendCommand("^s","^g") +#IfWinActive + +$^p::SendCommand("^p","{Up}") +$^n::SendCommand("^n","{Down}") +$^b::SendCommand("^b","{Left}") +$^f::SendCommand("^f","{Right}") + +;========================== +;Word Navigation +;========================== + +$!p::SendCommand("!p","^{Up}") +$!n::SendCommand("!n","^{Down}") +$!f::SendCommand("!f","^{Right}") + +$!b::SendCommand("!b","^{Left}") + +;========================== +;Line Navigation +;========================== +$^a::SendCommand("^a","{Home}") +$^e::SendCommand("^e","{End}") + +;========================== +;Page Navigation +;========================== + +;Ctrl-V disabled. Too reliant on that for pasting :$ +$^v::SendCommand("^v","{PgDn}") +$!v::SendCommand("!v","{PgUp}") +$!<::SendCommand("!<","^{Home}") +$!>::SendCommand("!>","^{End}") + +;========================== +;Undo +;========================== + +;========================== +;=== + + + +#IfWinNotActive ahk_class SWT_Window0 +$^/::SendCommand("^_","^z") +#IfWinNotActive + +;========================== +;Killing and Deleting +;========================== +#IfWinNotActive ahk_class mintty +$^d::SendCommand("^d","{Delete}") + +$!d::SendCommand("!d","^+{Right}","{Delete}") +$^h::SendCommand("^h","{Backspace}") + +$!Delete::SendCommand("!{Del}","^+{Left}","{Del}") + +#IfWinNotActive ahk_class (mintty|SWT_Window0) +$^k::SendCommand("^k","+{End}","+{Delete}") ;cut region +#IfWinNotActive + +$^w::SendCommand("^w","+{Delete}","{Shift Up}") ;cut region + +$!w::SendCommand("!w","^{Insert}","{Shift Up}") ;copy region + +$^y::SendCommand("^y","+{Insert}") ;paste \ No newline at end of file diff --git a/etc/doskey.autorun.reg b/etc/doskey.autorun.reg new file mode 100644 index 0000000..cbd77bd Binary files /dev/null and b/etc/doskey.autorun.reg differ diff --git a/etc/doskey.mac b/etc/doskey.mac index 4f9dec6..9885fc6 100644 --- a/etc/doskey.mac +++ b/etc/doskey.mac @@ -1,59 +1,60 @@ -;= rem doskey macros to make cmd more Linux like -ls=dir /w $* -ll=dir /n /-c /q /ta $* -ct=cleartool $* -grep=findstr $* -rm=del $* -cp=copy $* -cat=type $* -history=doskey /history -asperl=C:\Perl\bin\perl $* -lsvob=cleartool lsvob $* -llvob=cleartool lsvob -long $* -lsview=cleartool lsview $* -llview=cleartool lsview -long $* -lsregion=cleartool lsregion $* -register=cleartool register $* -unregister=cleartool unregister $* -mktag=cleartool mktag $* -rmtag=cleartool rmtag $* -setview=cleartool setview $* -setcs=cleartool setcs $* -edcs=cleartool edcs $* -catcs=cleartool catcs $* -pwv=cleartool pwv $* -startview=cleartool startview $* -endview=cleartool endview $* -killview=cleartool endview -server $* -rmtag=cleartool rmtag $* -mktag=cleartool mktag $* -mkview=cleartool mkview $* -rmview=cleartool rmview $* -lsregion=cleartool lsregion $* -describe=cleartool describe $* -vtree=cleartool lsvtree $* -unco=cleartool unco -rm $* -cdiff=cleartool diff $* -space=cleartool space $* -register=cleartool register $* -unregister=cleartool unregister $* -lslic=clearlicense -product ClearCase -rellic=clearlicense -release -product ClearCase $* -lstype=cleartool lstype $* -lltype=cleartool lstype -long $* -lsbranch=cleartoollstype brtype:$1 -llbranch=cleartool lstype -long brtype:$1 -lslabel=cleartool lstype lbtype:$1 -lllabel=cleartool lstype -long lbtype:$1 -lstrigger=cleartool lstype trtype:$1 -lltrigger=cleartool lstype -long trtype:$1 -lslock=cleartool lslock $* -mt=multitool $* -lspacket=multitool lspacket $* -llpacket=multitool lspacket -long $* -lsreplica=multitool lsreplica -vob $* -llreplica=multitool lsreplica -long -vob $* -lsepoch=multitool lsepoch -vob $* -llepoch=multitool lsepoch -long -vob $* -chepoch=multitool chepoch -vob $* +;= rem doskey macros to make cmd more Linux like +ls=dir /w $* +ll=dir /n /-c /q /ta $* +ct=cleartool $* +grep=findstr $* +rm=del $* +cp=copy $* +mv=copy $* +cat=type $* +history=doskey /history +asperl=C:\Perl\bin\perl $* +lsvob=cleartool lsvob $* +llvob=cleartool lsvob -long $* +lsview=cleartool lsview $* +llview=cleartool lsview -long $* +lsregion=cleartool lsregion $* +register=cleartool register $* +unregister=cleartool unregister $* +mktag=cleartool mktag $* +rmtag=cleartool rmtag $* +setview=cleartool setview $* +setcs=cleartool setcs $* +edcs=cleartool edcs $* +catcs=cleartool catcs $* +pwv=cleartool pwv $* +startview=cleartool startview $* +endview=cleartool endview $* +killview=cleartool endview -server $* +rmtag=cleartool rmtag $* +mktag=cleartool mktag $* +mkview=cleartool mkview $* +rmview=cleartool rmview $* +lsregion=cleartool lsregion $* +describe=cleartool describe $* +vtree=cleartool lsvtree $* +unco=cleartool unco -rm $* +cdiff=cleartool diff $* +space=cleartool space $* +register=cleartool register $* +unregister=cleartool unregister $* +lslic=clearlicense -product ClearCase +rellic=clearlicense -release -product ClearCase $* +lstype=cleartool lstype $* +lltype=cleartool lstype -long $* +lsbranch=cleartoollstype brtype:$1 +llbranch=cleartool lstype -long brtype:$1 +lslabel=cleartool lstype lbtype:$1 +lllabel=cleartool lstype -long lbtype:$1 +lstrigger=cleartool lstype trtype:$1 +lltrigger=cleartool lstype -long trtype:$1 +lslock=cleartool lslock $* +mt=multitool $* +lspacket=multitool lspacket $* +llpacket=multitool lspacket -long $* +lsreplica=multitool lsreplica -vob $* +llreplica=multitool lsreplica -long -vob $* +lsepoch=multitool lsepoch -vob $* +llepoch=multitool lsepoch -long -vob $* +chepoch=multitool chepoch -vob $* syncreplica=multitool syncreplica $* \ No newline at end of file diff --git a/etc/startup.cmd b/etc/startup.cmd new file mode 100644 index 0000000..e3f5ed8 --- /dev/null +++ b/etc/startup.cmd @@ -0,0 +1,2 @@ +@echo off +doskey /macrofile=C:\Cygwin\opt\clearscm\etc\doskey.mac \ No newline at end of file diff --git a/rc/bash_login b/rc/bash_login index 89ae5a8..79d1c60 100644 --- a/rc/bash_login +++ b/rc/bash_login @@ -129,6 +129,11 @@ set -o emacs set -o monitor set +u +# Shell options +shopt -s autocd +shopt -s cdspell +shopt -s dirspell +shopt -s histappend shopt -s lithist # Aliases: diff --git a/rc/client_scripts/Audience b/rc/client_scripts/Audience new file mode 100644 index 0000000..071261e --- /dev/null +++ b/rc/client_scripts/Audience @@ -0,0 +1,24 @@ +#!/bin/bash +################################################################################ +# +# File: $RCSfile: Audience,v $ +# Revision: $Revision: 1.0 $ +# Description: Client specific start up for Audience +# Author: Andrew@ClearSCM.com +# Created: Fri Nov 8 13:50:01 PST 2013 +# Modified: $Date: $ +# Language: bash +# +# (c) Copyright 2013, ClearSCM, Inc., all rights reserved. +# +################################################################################ +export SMTPHOST=cas.audience.local +export SMTPFROM=cm@audience.com +export CLEARADM_SERVER=adefaria-lt +export P4CONFIG=.p4config + +append_to_path /cygdrive/c/Program\ Files/Perforce +append_to_path /cygdrive/c/Program\ Files\ \(x86\)/MATLAB/R2013a/bin +append_to_path /mnt/fs-ReleaseEng/Dev/bin + +export CDPATH=~/p4/prod/AudEngr/Import/VSS/ReleaseEng