hello,
i have a multi part question.
i want to use sublime text more in my terminal scenarios.
i use windows 7 (64bit) and the newest beta 1281 of sublime.
i use the official git for windows minw32 distribution.
i have made an alias that i can use on my local machine to fire up sublime to edit a file:
alias edit=‘c:/Program\ Files/sublime\ text\ 2/sublime_text.exe -w’
so when i do something like:
cd c:/repos/test/
edit test.html
sublime will open up, and when i save + close it goes back to the
command prompt like it should.
but problems arise when i ssh to a server. i tired to call my
alias, but it wasnt there. so i tired to readd it, but it’s looking
for the c:/program files/sublime text 2/ location on the server
not my local machine!
is there anyway around this?
am i doing something wrong?
second question…
i want to configure sublime to be the default view for git diff and
merge commands. i have this working now for winmerge, but it
only will diff two files, not more than two. what are the command
line arguments i need to configure this?
in my .gitconfig file i have:
[diff]
tool = windiff
[difftool "windiff"]
cmd = ~/winmerge.sh \"$LOCAL\" \"$REMOTE\"
[difftool]
prompt = false
[merge]
tool = winmerge
[mergetool "winmerge"]
cmd = ~/winmerge.sh \"$LOCAL\" \"$REMOTE\"
trustExitCode = false
and the ~/winmerge.sh file is:
#!/bin/sh
# using winmerge with git
# replaces unix style null files with a newly created empty windows temp files
file1=$1
if "$file1" == '/dev/null' ] || "$file1" == '\\.\nul' ] || ! -e "$file1" ]
then
file1="/tmp/gitnull"
`echo "">$file1`
fi
file2=$2
if "$file2" == '/dev/null' ] || "$file2" == '\\.\nul' ] || ! -e "$file2" ]
then
file2="/tmp/gitnull"
`echo "">$file2`
fi
echo diff : $1 -- $2
"C:\Program files (x86)\WinMerge\WinMergeU.exe" -e -ub -dl "Base" -dr "Mine" "$file1" "$file2"
where $file1 and $file2 are variables in my shell script.
any help will be greatly appreciated!