mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-08-05 16:48:38 +00:00
[answerback] add suppot to vim/term for putty
This commit is contained in:
parent
16e96b6e19
commit
09a20db1f1
3 changed files with 18 additions and 4 deletions
|
@ -66,8 +66,15 @@ if command -v infocmp >/dev/null 2>&1 ; then
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ "${COLORTERM}" = "gnome-terminal" ]; then
|
if [ -n "${COLORTERM}" -o -n "${XTERM_VERSION}" -o -n "${TERM_PROGRAM}" ]; then
|
||||||
TERM="xterm-256color"
|
if [ "${COLORTERM}" = "gnome-terminal" ] ; then
|
||||||
|
TERM="xterm-256color"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if command -v answerback >/dev/null 2>&1 ; then
|
||||||
|
ANSWERBACK=`answerback`
|
||||||
|
export ANSWERBACK
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TERM=`fix_term $TERM`
|
TERM=`fix_term $TERM`
|
||||||
|
|
|
@ -84,6 +84,8 @@ my %links = (
|
||||||
'git-info' => 'bin/git-info',
|
'git-info' => 'bin/git-info',
|
||||||
'git-untrack-ignored' => 'bin/git-untracked-ignored',
|
'git-untrack-ignored' => 'bin/git-untracked-ignored',
|
||||||
|
|
||||||
|
answerback => 'bin/answerback',
|
||||||
|
|
||||||
gdbinit => '.gdbinit',
|
gdbinit => '.gdbinit',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -94,6 +96,9 @@ if ($contained) {
|
||||||
($prefix) = $prefix =~ m{^\/? (.+) [^/]+ $}x;
|
($prefix) = $prefix =~ m{^\/? (.+) [^/]+ $}x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
`make answerback`;
|
||||||
|
warn "Could not compile answerback.\n" if ($? != 0);
|
||||||
|
|
||||||
my $i = 0; # Keep track of how many links we added
|
my $i = 0; # Keep track of how many links we added
|
||||||
for my $file (keys %links) {
|
for my $file (keys %links) {
|
||||||
# See if this file resides in a directory, and create it if needed.
|
# See if this file resides in a directory, and create it if needed.
|
||||||
|
|
6
vimrc
6
vimrc
|
@ -7,8 +7,10 @@ if has('multi_byte') " Make sure we have unicode support
|
||||||
scriptencoding utf-8 " This file is in UTF-8
|
scriptencoding utf-8 " This file is in UTF-8
|
||||||
|
|
||||||
" ---- Terminal Setup ----
|
" ---- Terminal Setup ----
|
||||||
if (&termencoding == "" && (&term =~ "xterm" || &term =~ "putty")) || (&term =~ "rxvt-unicode") || (&term =~ "screen")
|
if ($ANSWERBACK !=# "PuTTY")
|
||||||
set termencoding=utf-8
|
if (&termencoding == "" && (&term =~ "xterm" || &term =~ "putty")) || (&term =~ "rxvt-unicode") || (&term =~ "screen")
|
||||||
|
set termencoding=utf-8
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
set encoding=utf-8 " Default encoding should always be UTF-8
|
set encoding=utf-8 " Default encoding should always be UTF-8
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue