Download:
child 120:b8da199312e2
parent 118:308ea44de288
119:d54e285942f3
Anton Shestakov <av6@dwimlabs.net>, Sat, 09 Jul 2016 01:45:49 +0800
.hgeditor: it's vim-only, stop pretending

1 файлов изменено, 2 вставок(+), 16 удалений(-) [+]
.hgeditor file | annotate | diff | comparison | revisions
--- a/.hgeditor Sun May 15 11:25:03 2016 +0800
+++ b/.hgeditor Sat Jul 09 01:45:49 2016 +0800
@@ -3,20 +3,6 @@
# This is an example of using HGEDITOR to create of diff to review the
# changes while commiting.
-# If you want to pass your favourite editor some other parameters
-# only for Mercurial, modify this:
-case "${EDITOR}" in
- "")
- EDITOR="sensible-editor"
- ;;
- emacs)
- EDITOR="$EDITOR -nw"
- ;;
- gvim|vim)
- EDITOR="$EDITOR -f -o"
- ;;
-esac
-
HGTMP=""
cleanup_exit() {
@@ -45,9 +31,9 @@
MD5=$(which md5 2>/dev/null)
[ -x "${MD5}" ] && CHECKSUM=`${MD5} "$HGTMP/msg"`
if [ -s "$HGTMP/diff" ]; then
- vim "+e $HGTMP/diff" '+set buftype=help filetype=diff' "+vsplit $HGTMP/msg" || exit $?
+ vim -f "+e $HGTMP/diff" '+set buftype=help filetype=diff' "+vsplit $HGTMP/msg" || exit $?
else
- $EDITOR "$HGTMP/msg" || exit $?
+ vim -f "$HGTMP/msg" || exit $?
fi
[ -x "${MD5}" ] && (echo "$CHECKSUM" | ${MD5} -c >/dev/null 2>&1 && exit 13)