Commits

esaurito  committed 156f6b0

Minor changes

  • Participants
  • Parent commits 7ba92bb

Comments (0)

Files changed (347)

File bundle/Conque-Shell/.git/FETCH_HEAD

-61274355db591a4c836c1a9e45627cefd23631b3		branch 'master' of https://github.com/vim-scripts/Conque-Shell

File bundle/Conque-Shell/.git/HEAD

-ref: refs/heads/master

File bundle/Conque-Shell/.git/ORIG_HEAD

-61274355db591a4c836c1a9e45627cefd23631b3

File bundle/Conque-Shell/.git/config

-[core]
-	repositoryformatversion = 0
-	filemode = true
-	bare = false
-	logallrefupdates = true
-[remote "origin"]
-	fetch = +refs/heads/*:refs/remotes/origin/*
-	url = https://github.com/vim-scripts/Conque-Shell.git
-[branch "master"]
-	remote = origin
-	merge = refs/heads/master

File bundle/Conque-Shell/.git/description

-Unnamed repository; edit this file 'description' to name the repository.

File bundle/Conque-Shell/.git/hooks/applypatch-msg.sample

-#!/bin/sh
-#
-# An example hook script to check the commit log message taken by
-# applypatch from an e-mail message.
-#
-# The hook should exit with non-zero status after issuing an
-# appropriate message if it wants to stop the commit.  The hook is
-# allowed to edit the commit message file.
-#
-# To enable this hook, rename this file to "applypatch-msg".
-
-. git-sh-setup
-test -x "$GIT_DIR/hooks/commit-msg" &&
-	exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"}
-:

File bundle/Conque-Shell/.git/hooks/commit-msg.sample

-#!/bin/sh
-#
-# An example hook script to check the commit log message.
-# Called by "git commit" with one argument, the name of the file
-# that has the commit message.  The hook should exit with non-zero
-# status after issuing an appropriate message if it wants to stop the
-# commit.  The hook is allowed to edit the commit message file.
-#
-# To enable this hook, rename this file to "commit-msg".
-
-# Uncomment the below to add a Signed-off-by line to the message.
-# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
-# hook is more suited to it.
-#
-# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
-# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
-
-# This example catches duplicate Signed-off-by lines.
-
-test "" = "$(grep '^Signed-off-by: ' "$1" |
-	 sort | uniq -c | sed -e '/^[ 	]*1[ 	]/d')" || {
-	echo >&2 Duplicate Signed-off-by lines.
-	exit 1
-}

File bundle/Conque-Shell/.git/hooks/post-commit.sample

-#!/bin/sh
-#
-# An example hook script that is called after a successful
-# commit is made.
-#
-# To enable this hook, rename this file to "post-commit".
-
-: Nothing

File bundle/Conque-Shell/.git/hooks/post-receive.sample

-#!/bin/sh
-#
-# An example hook script for the "post-receive" event.
-#
-# The "post-receive" script is run after receive-pack has accepted a pack
-# and the repository has been updated.  It is passed arguments in through
-# stdin in the form
-#  <oldrev> <newrev> <refname>
-# For example:
-#  aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master
-#
-# see contrib/hooks/ for a sample, or uncomment the next line and
-# rename the file to "post-receive".
-
-#. /usr/share/doc/git-core/contrib/hooks/post-receive-email

File bundle/Conque-Shell/.git/hooks/post-update.sample

-#!/bin/sh
-#
-# An example hook script to prepare a packed repository for use over
-# dumb transports.
-#
-# To enable this hook, rename this file to "post-update".
-
-exec git update-server-info

File bundle/Conque-Shell/.git/hooks/pre-applypatch.sample

-#!/bin/sh
-#
-# An example hook script to verify what is about to be committed
-# by applypatch from an e-mail message.
-#
-# The hook should exit with non-zero status after issuing an
-# appropriate message if it wants to stop the commit.
-#
-# To enable this hook, rename this file to "pre-applypatch".
-
-. git-sh-setup
-test -x "$GIT_DIR/hooks/pre-commit" &&
-	exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"}
-:

File bundle/Conque-Shell/.git/hooks/pre-commit.sample

-#!/bin/sh
-#
-# An example hook script to verify what is about to be committed.
-# Called by "git commit" with no arguments.  The hook should
-# exit with non-zero status after issuing an appropriate message if
-# it wants to stop the commit.
-#
-# To enable this hook, rename this file to "pre-commit".
-
-if git rev-parse --verify HEAD >/dev/null 2>&1
-then
-	against=HEAD
-else
-	# Initial commit: diff against an empty tree object
-	against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
-fi
-
-# If you want to allow non-ascii filenames set this variable to true.
-allownonascii=$(git config hooks.allownonascii)
-
-# Cross platform projects tend to avoid non-ascii filenames; prevent
-# them from being added to the repository. We exploit the fact that the
-# printable range starts at the space character and ends with tilde.
-if [ "$allownonascii" != "true" ] &&
-	# Note that the use of brackets around a tr range is ok here, (it's
-	# even required, for portability to Solaris 10's /usr/bin/tr), since
-	# the square bracket bytes happen to fall in the designated range.
-	test "$(git diff --cached --name-only --diff-filter=A -z $against |
-	  LC_ALL=C tr -d '[ -~]\0')"
-then
-	echo "Error: Attempt to add a non-ascii file name."
-	echo
-	echo "This can cause problems if you want to work"
-	echo "with people on other platforms."
-	echo
-	echo "To be portable it is advisable to rename the file ..."
-	echo
-	echo "If you know what you are doing you can disable this"
-	echo "check using:"
-	echo
-	echo "  git config hooks.allownonascii true"
-	echo
-	exit 1
-fi
-
-exec git diff-index --check --cached $against --

File bundle/Conque-Shell/.git/hooks/pre-rebase.sample

-#!/bin/sh
-#
-# Copyright (c) 2006, 2008 Junio C Hamano
-#
-# The "pre-rebase" hook is run just before "git rebase" starts doing
-# its job, and can prevent the command from running by exiting with
-# non-zero status.
-#
-# The hook is called with the following parameters:
-#
-# $1 -- the upstream the series was forked from.
-# $2 -- the branch being rebased (or empty when rebasing the current branch).
-#
-# This sample shows how to prevent topic branches that are already
-# merged to 'next' branch from getting rebased, because allowing it
-# would result in rebasing already published history.
-
-publish=next
-basebranch="$1"
-if test "$#" = 2
-then
-	topic="refs/heads/$2"
-else
-	topic=`git symbolic-ref HEAD` ||
-	exit 0 ;# we do not interrupt rebasing detached HEAD
-fi
-
-case "$topic" in
-refs/heads/??/*)
-	;;
-*)
-	exit 0 ;# we do not interrupt others.
-	;;
-esac
-
-# Now we are dealing with a topic branch being rebased
-# on top of master.  Is it OK to rebase it?
-
-# Does the topic really exist?
-git show-ref -q "$topic" || {
-	echo >&2 "No such branch $topic"
-	exit 1
-}
-
-# Is topic fully merged to master?
-not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
-if test -z "$not_in_master"
-then
-	echo >&2 "$topic is fully merged to master; better remove it."
-	exit 1 ;# we could allow it, but there is no point.
-fi
-
-# Is topic ever merged to next?  If so you should not be rebasing it.
-only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
-only_next_2=`git rev-list ^master           ${publish} | sort`
-if test "$only_next_1" = "$only_next_2"
-then
-	not_in_topic=`git rev-list "^$topic" master`
-	if test -z "$not_in_topic"
-	then
-		echo >&2 "$topic is already up-to-date with master"
-		exit 1 ;# we could allow it, but there is no point.
-	else
-		exit 0
-	fi
-else
-	not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
-	/usr/bin/perl -e '
-		my $topic = $ARGV[0];
-		my $msg = "* $topic has commits already merged to public branch:\n";
-		my (%not_in_next) = map {
-			/^([0-9a-f]+) /;
-			($1 => 1);
-		} split(/\n/, $ARGV[1]);
-		for my $elem (map {
-				/^([0-9a-f]+) (.*)$/;
-				[$1 => $2];
-			} split(/\n/, $ARGV[2])) {
-			if (!exists $not_in_next{$elem->[0]}) {
-				if ($msg) {
-					print STDERR $msg;
-					undef $msg;
-				}
-				print STDERR " $elem->[1]\n";
-			}
-		}
-	' "$topic" "$not_in_next" "$not_in_master"
-	exit 1
-fi
-
-exit 0
-
-<<\DOC_END
-################################################################
-
-This sample hook safeguards topic branches that have been
-published from being rewound.
-
-The workflow assumed here is:
-
- * Once a topic branch forks from "master", "master" is never
-   merged into it again (either directly or indirectly).
-
- * Once a topic branch is fully cooked and merged into "master",
-   it is deleted.  If you need to build on top of it to correct
-   earlier mistakes, a new topic branch is created by forking at
-   the tip of the "master".  This is not strictly necessary, but
-   it makes it easier to keep your history simple.
-
- * Whenever you need to test or publish your changes to topic
-   branches, merge them into "next" branch.
-
-The script, being an example, hardcodes the publish branch name
-to be "next", but it is trivial to make it configurable via
-$GIT_DIR/config mechanism.
-
-With this workflow, you would want to know:
-
-(1) ... if a topic branch has ever been merged to "next".  Young
-    topic branches can have stupid mistakes you would rather
-    clean up before publishing, and things that have not been
-    merged into other branches can be easily rebased without
-    affecting other people.  But once it is published, you would
-    not want to rewind it.
-
-(2) ... if a topic branch has been fully merged to "master".
-    Then you can delete it.  More importantly, you should not
-    build on top of it -- other people may already want to
-    change things related to the topic as patches against your
-    "master", so if you need further changes, it is better to
-    fork the topic (perhaps with the same name) afresh from the
-    tip of "master".
-
-Let's look at this example:
-
-		   o---o---o---o---o---o---o---o---o---o "next"
-		  /       /           /           /
-		 /   a---a---b A     /           /
-		/   /               /           /
-	       /   /   c---c---c---c B         /
-	      /   /   /             \         /
-	     /   /   /   b---b C     \       /
-	    /   /   /   /             \     /
-    ---o---o---o---o---o---o---o---o---o---o---o "master"
-
-
-A, B and C are topic branches.
-
- * A has one fix since it was merged up to "next".
-
- * B has finished.  It has been fully merged up to "master" and "next",
-   and is ready to be deleted.
-
- * C has not merged to "next" at all.
-
-We would want to allow C to be rebased, refuse A, and encourage
-B to be deleted.
-
-To compute (1):
-
-	git rev-list ^master ^topic next
-	git rev-list ^master        next
-
-	if these match, topic has not merged in next at all.
-
-To compute (2):
-
-	git rev-list master..topic
-
-	if this is empty, it is fully merged to "master".
-
-DOC_END

File bundle/Conque-Shell/.git/hooks/prepare-commit-msg.sample

-#!/bin/sh
-#
-# An example hook script to prepare the commit log message.
-# Called by "git commit" with the name of the file that has the
-# commit message, followed by the description of the commit
-# message's source.  The hook's purpose is to edit the commit
-# message file.  If the hook fails with a non-zero status,
-# the commit is aborted.
-#
-# To enable this hook, rename this file to "prepare-commit-msg".
-
-# This hook includes three examples.  The first comments out the
-# "Conflicts:" part of a merge commit.
-#
-# The second includes the output of "git diff --name-status -r"
-# into the message, just before the "git status" output.  It is
-# commented because it doesn't cope with --amend or with squashed
-# commits.
-#
-# The third example adds a Signed-off-by line to the message, that can
-# still be edited.  This is rarely a good idea.
-
-case "$2,$3" in
-  merge,)
-    /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;;
-
-# ,|template,)
-#   /usr/bin/perl -i.bak -pe '
-#      print "\n" . `git diff --cached --name-status -r`
-#	 if /^#/ && $first++ == 0' "$1" ;;
-
-  *) ;;
-esac
-
-# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
-# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"

File bundle/Conque-Shell/.git/hooks/update.sample

-#!/bin/sh
-#
-# An example hook script to blocks unannotated tags from entering.
-# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
-#
-# To enable this hook, rename this file to "update".
-#
-# Config
-# ------
-# hooks.allowunannotated
-#   This boolean sets whether unannotated tags will be allowed into the
-#   repository.  By default they won't be.
-# hooks.allowdeletetag
-#   This boolean sets whether deleting tags will be allowed in the
-#   repository.  By default they won't be.
-# hooks.allowmodifytag
-#   This boolean sets whether a tag may be modified after creation. By default
-#   it won't be.
-# hooks.allowdeletebranch
-#   This boolean sets whether deleting branches will be allowed in the
-#   repository.  By default they won't be.
-# hooks.denycreatebranch
-#   This boolean sets whether remotely creating branches will be denied
-#   in the repository.  By default this is allowed.
-#
-
-# --- Command line
-refname="$1"
-oldrev="$2"
-newrev="$3"
-
-# --- Safety check
-if [ -z "$GIT_DIR" ]; then
-	echo "Don't run this script from the command line." >&2
-	echo " (if you want, you could supply GIT_DIR then run" >&2
-	echo "  $0 <ref> <oldrev> <newrev>)" >&2
-	exit 1
-fi
-
-if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
-	echo "Usage: $0 <ref> <oldrev> <newrev>" >&2
-	exit 1
-fi
-
-# --- Config
-allowunannotated=$(git config --bool hooks.allowunannotated)
-allowdeletebranch=$(git config --bool hooks.allowdeletebranch)
-denycreatebranch=$(git config --bool hooks.denycreatebranch)
-allowdeletetag=$(git config --bool hooks.allowdeletetag)
-allowmodifytag=$(git config --bool hooks.allowmodifytag)
-
-# check for no description
-projectdesc=$(sed -e '1q' "$GIT_DIR/description")
-case "$projectdesc" in
-"Unnamed repository"* | "")
-	echo "*** Project description file hasn't been set" >&2
-	exit 1
-	;;
-esac
-
-# --- Check types
-# if $newrev is 0000...0000, it's a commit to delete a ref.
-zero="0000000000000000000000000000000000000000"
-if [ "$newrev" = "$zero" ]; then
-	newrev_type=delete
-else
-	newrev_type=$(git cat-file -t $newrev)
-fi
-
-case "$refname","$newrev_type" in
-	refs/tags/*,commit)
-		# un-annotated tag
-		short_refname=${refname##refs/tags/}
-		if [ "$allowunannotated" != "true" ]; then
-			echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
-			echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
-			exit 1
-		fi
-		;;
-	refs/tags/*,delete)
-		# delete tag
-		if [ "$allowdeletetag" != "true" ]; then
-			echo "*** Deleting a tag is not allowed in this repository" >&2
-			exit 1
-		fi
-		;;
-	refs/tags/*,tag)
-		# annotated tag
-		if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
-		then
-			echo "*** Tag '$refname' already exists." >&2
-			echo "*** Modifying a tag is not allowed in this repository." >&2
-			exit 1
-		fi
-		;;
-	refs/heads/*,commit)
-		# branch
-		if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
-			echo "*** Creating a branch is not allowed in this repository" >&2
-			exit 1
-		fi
-		;;
-	refs/heads/*,delete)
-		# delete branch
-		if [ "$allowdeletebranch" != "true" ]; then
-			echo "*** Deleting a branch is not allowed in this repository" >&2
-			exit 1
-		fi
-		;;
-	refs/remotes/*,commit)
-		# tracking branch
-		;;
-	refs/remotes/*,delete)
-		# delete tracking branch
-		if [ "$allowdeletebranch" != "true" ]; then
-			echo "*** Deleting a tracking branch is not allowed in this repository" >&2
-			exit 1
-		fi
-		;;
-	*)
-		# Anything else (is there anything else?)
-		echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
-		exit 1
-		;;
-esac
-
-# --- Finished
-exit 0

File bundle/Conque-Shell/.git/index

Binary file removed.

File bundle/Conque-Shell/.git/info/exclude

-# git ls-files --others --exclude-from=.git/info/exclude
-# Lines that start with '#' are comments.
-# For a project mostly in C, the following would be a good set of
-# exclude patterns (uncomment them if you want to use them):
-# *.[oa]
-# *~

File bundle/Conque-Shell/.git/logs/HEAD

-0000000000000000000000000000000000000000 61274355db591a4c836c1a9e45627cefd23631b3 Alessandro Martin <metallourlante@gmail.com> 1306691723 +0200	clone: from https://github.com/vim-scripts/Conque-Shell.git

File bundle/Conque-Shell/.git/logs/refs/heads/master

-0000000000000000000000000000000000000000 61274355db591a4c836c1a9e45627cefd23631b3 Alessandro Martin <metallourlante@gmail.com> 1306691723 +0200	clone: from https://github.com/vim-scripts/Conque-Shell.git

File bundle/Conque-Shell/.git/objects/pack/pack-3887265db8c8afc4bf10a6bab47b9cf5f361f313.idx

Binary file removed.

File bundle/Conque-Shell/.git/objects/pack/pack-3887265db8c8afc4bf10a6bab47b9cf5f361f313.pack

Binary file removed.

File bundle/Conque-Shell/.git/packed-refs

-# pack-refs with: peeled 
-63c775120217c141d08febe476d1cef7b566b1fd refs/tags/2.1@2
-^61274355db591a4c836c1a9e45627cefd23631b3
-a99deaa9ea12df17b6247cc1dde6171312f0d4ae refs/tags/2.1@1
-^eff4c62ab82ccd11ed01d6b7523fade204ba9b1d
-89d6d398b3bdd289495ecf90df324bb47f53a7c3 refs/tags/2.1
-^eae70b697d717be1fc12dd496595fdfd60b13457
-a1f378050065c37fe60eaeade032748bf38a6472 refs/tags/2.0@2
-^0fcdf37738ad60ddc2ebbd36323f636a184b1493
-2ee0201533fc9500f7cdce7bd2a8d3ba12c2d30d refs/tags/2.0@1
-^bddb76a751f51f72463d9ebf14ee56e8e80f0080
-c341d042473be872d1c51f1f2e7208346efb2d20 refs/tags/2.0
-^4466aaf40cce5d6e35ebcce221c2134101e5805e
-7b5e3100a2b72c37268f64294ba672f63dfc6774 refs/tags/1.2@1
-^e6c6eb0b589037e6fb5c625dcc86d4fee8d9face
-17af97703fc7cfa19bb4a4a3cd7b043f37ccd463 refs/tags/1.2
-^b8141367fb830e224529be73e818638e2d98d6d3
-686a6487db3b1d0ab16e388b9f4471bba17f2a07 refs/tags/1.1@1
-^c087809b357adcca752c6881144014f06fc37e23
-38270a5b931fe01fc62840cc8ac6c7468bb1f950 refs/tags/1.1
-^13fe3577c2a7caa02a72042521725bc06724c2c1
-d609b690eaffb10f9af1d9dfab7da6b3055cf42b refs/tags/1.0@1
-^a484df94cf36031b0c9d870f23633c7ad6f0a08e
-1a02ccec0221f26c6083f07c7a3db0183d94763a refs/tags/1.0
-^97f6fc5dab8e42651f94f36c535ed108753ce60c
-24f97494b6b71c41b0cfb6781e63efb8c5f0f61a refs/tags/0.6
-^ceda4517d840440e5aade733cfddf913e057c145
-177c2c743e924e95060acc6366aeabc289d0ff6c refs/tags/0.5
-^dcb05513f65a28aec52a5a7c4b6851fc3c5356cc
-2fcab5395679243bd6283f2615f5e8138ee8ab95 refs/tags/0.4
-^04ab2a3078bb934dc64d6996202d7934c5ef9a65
-9f52d46dc55d43179f2998a47a8d08e6f2982721 refs/tags/0.3
-^5ff75fa902f765c275ba0615c7474b58433040fe
-af6493047713f90922abd6080e0e3ac966d3ee81 refs/tags/0.2
-^426189d6360006fc11d340f9baecd05cec9327fe
-9425fb61aad8cb3cbe6af50285caf5f4437e8cd5 refs/tags/0.1
-^4a2bc45cbc081d11de830b72c0d91236bb7b8c7d
-61274355db591a4c836c1a9e45627cefd23631b3 refs/remotes/origin/master

File bundle/Conque-Shell/.git/refs/heads/master

-61274355db591a4c836c1a9e45627cefd23631b3

File bundle/Conque-Shell/.git/refs/remotes/origin/HEAD

-ref: refs/remotes/origin/master

File bundle/Conque-Shell/README

-This is a mirror of http://www.vim.org/scripts/script.php?script_id=2771
-
-Conque is a Vim plugin which allows you to run interactive programs, such as bash on linux or powershell.exe on Windows, inside a Vim buffer. In other words it is a terminal emulator which uses a Vim buffer to display the program output. 
-
-== WEBSITE ==
-
-For more information http://code.google.com/p/conque/
-
-== SCREENSHOTS ==
-
-http://Conque.googlecode.com/svn/wiki/screenshot/unix.jpg
-http://Conque.googlecode.com/svn/wiki/screenshot/windows.jpg
-
-== USAGE ==
-
-Type :ConqueTerm <command> to run your command in vim, for example:
-
-:ConqueTerm bash
-:ConqueTerm mysql -h localhost -u joe -p sock_collection
-:ConqueTerm Powershell.exe
-:ConqueTerm C:\Python27\python.exe
-
-To open ConqueTerm in a new horizontal or vertical buffer use:
-
-:ConqueTermSplit <command>
-:ConqueTermVSplit <command>
-:ConqueTermTab <command>
-
-All text typed in insert mode will be sent to your shell. Use the <F9> key to send a visual selection from any buffer to the shell.
-
-For more help type :help ConqueTerm
-

File bundle/Conque-Shell/autoload/conque_term.vim

-" FILE:     autoload/conque_term.vim {{{
-" AUTHOR:   Nico Raffo <nicoraffo@gmail.com>
-" WEBSITE:  http://conque.googlecode.com
-" MODIFIED: 2011-04-04
-" VERSION:  2.1, for Vim 7.0
-" LICENSE:
-" Conque - Vim terminal/console emulator
-" Copyright (C) 2009-2011 Nico Raffo 
-"
-" MIT License
-" 
-" Permission is hereby granted, free of charge, to any person obtaining a copy
-" of this software and associated documentation files (the "Software"), to deal
-" in the Software without restriction, including without limitation the rights
-" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-" copies of the Software, and to permit persons to whom the Software is
-" furnished to do so, subject to the following conditions:
-" 
-" The above copyright notice and this permission notice shall be included in
-" all copies or substantial portions of the Software.
-" 
-" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-" THE SOFTWARE.
-" }}}
-
-" **********************************************************************************************************
-" **** GLOBAL INITIALIZATION *******************************************************************************
-" **********************************************************************************************************
-
-" {{{
-
-" load plugin file if it hasn't already been loaded (e.g. conque_term#foo() is used in .vimrc)
-if !exists('g:ConqueTerm_Loaded')
-    runtime! plugin/conque_term.vim
-endif
-
-" path to conque install directories
-let s:scriptdir = expand("<sfile>:h") . '/'
-let s:scriptdirpy = expand("<sfile>:h") . '/conque_term/'
-
-" global list of terminal instances
-let s:term_obj = {'idx': 1, 'var': '', 'is_buffer': 1, 'active': 1, 'buffer_name': '', 'command': ''}
-let g:ConqueTerm_Terminals = {}
-
-" global lists of registered functions
-let s:hooks = { 'after_startup': [], 'buffer_enter': [], 'buffer_leave': [], 'after_keymap': [] }
-
-" required for session support
-if g:ConqueTerm_SessionSupport == 1
-    set sessionoptions+=globals
-    try
-        sil! let s:saved_terminals = eval(g:ConqueTerm_TerminalsString)
-    catch
-        let s:saved_terminals = {}
-    endtry
-endif
-
-" more session support
-let g:ConqueTerm_TerminalsString = ''
-
-" init terminal counter
-let g:ConqueTerm_Idx = 0
-
-" we clobber this value later
-let s:save_updatetime = &updatetime
-
-" have we called the init() function yet?
-let s:initialized = 0
-
-
-" }}}
-
-" **********************************************************************************************************
-" **** SYSTEM DETECTION ************************************************************************************
-" **********************************************************************************************************
-
-" {{{
-
-" Display various error messages
-function! conque_term#fail(feature) " {{{
-
-    " create a new buffer
-    new
-    setlocal buftype=nofile
-    setlocal nonumber
-    setlocal foldcolumn=0
-    setlocal wrap
-    setlocal noswapfile
-
-    " missing vim features
-    if a:feature == 'python'
-
-        call append('$', 'Conque ERROR: Python interface cannot be loaded')
-        call append('$', '')
-
-        if !executable("python")
-            call append('$', 'Your version of Vim appears to be installed without the Python interface. In ')
-            call append('$', 'addition, you may need to install Python.')
-        else
-            call append('$', 'Your version of Vim appears to be installed without the Python interface.')
-        endif
-
-        call append('$', '')
-
-        if has('unix') == 1
-            call append('$', "You are using a Unix-like operating system. Most, if not all, of the popular ")
-            call append('$', "Linux package managers have Python-enabled Vim available. For example ")
-            call append('$', "vim-gnome or vim-gtk on Ubuntu will get you everything you need.")
-            call append('$', "")
-            call append('$', "If you are compiling Vim from source, make sure you use the --enable-pythoninterp ")
-            call append('$', "configure option. You will also need to install Python and the Python headers.")
-            call append('$', "")
-            call append('$', "If you are using OS X, MacVim will give you Python support by default.")
-        else
-            call append('$', "You appear to be using Windows. The official Vim 7.3 installer available at ")
-            call append('$', "http://www.vim.org comes with the required Python interfaces. You will also ")
-            call append('$', "need to install Python 2.7 and/or Python 3.1, both available at http://www.python.org")
-        endif
-
-    elseif a:feature == 'python_exe'
-
-        call append('$', "Conque ERROR: Can't find Python executable")
-        call append('$', "")
-        call append('$', "Conque needs to know the full path to python.exe on Windows systems. By default, ")
-        call append('$', "Conque will check your system path as well as the most common installation path ")
-        call append('$', "C:\\PythonXX\\python.exe. To fix this error either:")
-        call append('$', "")
-        call append('$', "Set the g:ConqueTerm_PyExe option in your .vimrc. E.g.")
-        call append('$', "        let g:ConqueTerm_PyExe = 'C:\Program Files\Python27\python.exe'")
-        call append('$', "")
-        call append('$', "Add the directory where you installed python to your system path. This isn't a bad ")
-        call append('$', "idea in general.")
-
-    elseif a:feature == 'ctypes'
-
-        call append('$', 'Conque ERROR: Python cannot load the ctypes module')
-        call append('$', "")
-        call append('$', "Conque requires the 'ctypes' python module. This has been a standard module since Python 2.5.")
-        call append('$', "")
-        call append('$', "The recommended fix is to make sure you're using the latest official GVim version 7.3, ")
-        call append('$', "and have at least one of the two compatible versions of Python installed, ")
-        call append('$', "2.7 or 3.1. You can download the GVim 7.3 installer from http://www.vim.org. You ")
-        call append('$', "can download the Python 2.7 or 3.1 installer from http://www.python.org")
-
-    endif
-
-endfunction " }}}
-
-" Go through various system checks before attempting to launch conque
-function! conque_term#dependency_check() " {{{
-
-    " don't recheck the second time 'round
-    if s:initialized == 1
-        return 1
-    endif
-
-    " choose a python version
-    let s:py = ''
-    if g:ConqueTerm_PyVersion == 3
-        let pytest = 'python3'
-    else
-        let pytest = 'python'
-        let g:ConqueTerm_PyVersion = 2
-    endif
-
-    " first test the requested version
-    if has(pytest)
-        if pytest == 'python3'
-            let s:py = 'py3'
-        else
-            let s:py = 'py'
-        endif
-
-    " otherwise use the other version
-    else
-        let py_alternate = 5 - g:ConqueTerm_PyVersion
-        if py_alternate == 3
-            let pytest = 'python3'
-        else
-            let pytest = 'python'
-        endif
-        if has(pytest)
-            echohl WarningMsg | echomsg "Python " . g:ConqueTerm_PyVersion . " interface is not installed, using Python " . py_alternate . " instead" | echohl None
-            let g:ConqueTerm_PyVersion = py_alternate
-            if pytest == 'python3'
-                let s:py = 'py3'
-            else
-                let s:py = 'py'
-            endif
-        endif
-    endif
-
-    " test if we actually found a python version
-    if s:py == ''
-        call conque_term#fail('python')
-        return 0
-    endif
-
-    " quick and dirty platform declaration
-    if has('unix') == 1
-        let s:platform = 'unix'
-        sil exe s:py . " CONQUE_PLATFORM = 'unix'"
-    else
-        let s:platform = 'windows'
-        sil exe s:py . " CONQUE_PLATFORM = 'windows'"
-    endif
-
-    " if we're using Windows, make sure ctypes is available
-    if s:platform == 'windows'
-        try
-            sil exe s:py . " import ctypes"
-        catch
-            call conque_term#fail('ctypes')
-            return 0
-        endtry
-    endif
-
-    " if we're using Windows, make sure we can finde python executable
-    if s:platform == 'windows' && conque_term#find_python_exe() == ''
-        call conque_term#fail('python_exe')
-        return 0
-    endif
-
-    " check for global cursorhold/cursormove events
-    let o = ''
-    silent redir => o
-    silent autocmd CursorHoldI,CursorMovedI
-    redir END
-    for line in split(o, "\n")
-        if line =~ '^ ' || line =~ '^--' || line =~ 'matchparen'
-            continue
-        endif
-        echohl WarningMsg | echomsg "Warning: Global CursorHoldI and CursorMovedI autocommands may cause ConqueTerm to run slowly." | echohl None
-    endfor
-
-    " check for compatible mode
-    if &compatible == 1
-        echohl WarningMsg | echomsg "Warning: Conque may not function normally in 'compatible' mode." | echohl None
-    endif
-
-    " check for fast mode
-    if g:ConqueTerm_FastMode
-        sil exe s:py . " CONQUE_FAST_MODE = True"
-    else
-        sil exe s:py . " CONQUE_FAST_MODE = False"
-    endif
-
-    " if we're all good, load python files
-    call conque_term#load_python()
-
-    return 1
-
-endfunction " }}}
-
-" }}}
-
-" **********************************************************************************************************
-" **** STARTUP MESSAGES ************************************************************************************
-" **********************************************************************************************************
-
-" {{{
-if g:ConqueTerm_StartMessages
-    let msg_file = s:scriptdirpy . 'version.vim'
-    let msg_show = 1
-    let msg_ct = 1
-
-    " we can write to conque_term directory
-    if filewritable(s:scriptdirpy) == 2
-
-        if filewritable(msg_file)
-
-            " read current message file
-            try
-                silent execute "source " . msg_file
-                if exists('g:ConqueTerm_MsgCt') && exists('g:ConqueTerm_MsgVer')
-                    if g:ConqueTerm_MsgVer == g:ConqueTerm_Version && g:ConqueTerm_MsgCt > 2
-                        let msg_show = 0
-                    else
-                        let msg_ct = g:ConqueTerm_MsgCt + 1
-                    endif
-                endif
-            catch
-            endtry
-        endif
-
-        " update message file
-        if msg_show
-            let file_contents = ['let g:ConqueTerm_MsgCt = ' . msg_ct, 'let g:ConqueTerm_MsgVer = ' . g:ConqueTerm_Version]
-            call writefile(file_contents, msg_file)
-        endif
-    endif
-
-    " save our final decision
-    let g:ConqueTerm_StartMessages = msg_show
-endif
-" }}}
-
-" **********************************************************************************************************
-" **** WINDOWS VK CODES ************************************************************************************
-" **********************************************************************************************************
-
-" Windows Virtual Key Codes  {{{
-let s:windows_vk = {
-\    'VK_ADD' : 107,
-\    'VK_APPS' : 93,
-\    'VK_ATTN' : 246,
-\    'VK_BACK' : 8,
-\    'VK_BROWSER_BACK' : 166,
-\    'VK_BROWSER_FORWARD' : 167,
-\    'VK_CANCEL' : 3,
-\    'VK_CAPITAL' : 20,
-\    'VK_CLEAR' : 12,
-\    'VK_CONTROL' : 17,
-\    'VK_CONVERT' : 28,
-\    'VK_CRSEL' : 247,
-\    'VK_DECIMAL' : 110,
-\    'VK_DELETE' : 46,
-\    'VK_DIVIDE' : 111,
-\    'VK_DOWN' : 40,
-\    'VK_DOWN_CTL' : '40;1024',
-\    'VK_END' : 35,
-\    'VK_EREOF' : 249,
-\    'VK_ESCAPE' : 27,
-\    'VK_EXECUTE' : 43,
-\    'VK_EXSEL' : 248,
-\    'VK_F1' : 112,
-\    'VK_F10' : 121,
-\    'VK_F11' : 122,
-\    'VK_F12' : 123,
-\    'VK_F13' : 124,
-\    'VK_F14' : 125,
-\    'VK_F15' : 126,
-\    'VK_F16' : 127,
-\    'VK_F17' : 128,
-\    'VK_F18' : 129,
-\    'VK_F19' : 130,
-\    'VK_F2' : 113,
-\    'VK_F20' : 131,
-\    'VK_F21' : 132,
-\    'VK_F22' : 133,
-\    'VK_F23' : 134,
-\    'VK_F24' : 135,
-\    'VK_F3' : 114,
-\    'VK_F4' : 115,
-\    'VK_F5' : 116,
-\    'VK_F6' : 117,
-\    'VK_F7' : 118,
-\    'VK_F8' : 119,
-\    'VK_F9' : 120,
-\    'VK_FINAL' : 24,
-\    'VK_HANGEUL' : 21,
-\    'VK_HANGUL' : 21,
-\    'VK_HANJA' : 25,
-\    'VK_HELP' : 47,
-\    'VK_HOME' : 36,
-\    'VK_INSERT' : 45,
-\    'VK_JUNJA' : 23,
-\    'VK_KANA' : 21,
-\    'VK_KANJI' : 25,
-\    'VK_LBUTTON' : 1,
-\    'VK_LCONTROL' : 162,
-\    'VK_LEFT' : 37,
-\    'VK_LEFT_CTL' : '37;1024',
-\    'VK_LMENU' : 164,
-\    'VK_LSHIFT' : 160,
-\    'VK_LWIN' : 91,
-\    'VK_MBUTTON' : 4,
-\    'VK_MEDIA_NEXT_TRACK' : 176,
-\    'VK_MEDIA_PLAY_PAUSE' : 179,
-\    'VK_MEDIA_PREV_TRACK' : 177,
-\    'VK_MENU' : 18,
-\    'VK_MODECHANGE' : 31,
-\    'VK_MULTIPLY' : 106,
-\    'VK_NEXT' : 34,
-\    'VK_NONAME' : 252,
-\    'VK_NONCONVERT' : 29,
-\    'VK_NUMLOCK' : 144,
-\    'VK_NUMPAD0' : 96,
-\    'VK_NUMPAD1' : 97,
-\    'VK_NUMPAD2' : 98,
-\    'VK_NUMPAD3' : 99,
-\    'VK_NUMPAD4' : 100,
-\    'VK_NUMPAD5' : 101,
-\    'VK_NUMPAD6' : 102,
-\    'VK_NUMPAD7' : 103,
-\    'VK_NUMPAD8' : 104,
-\    'VK_NUMPAD9' : 105,
-\    'VK_OEM_CLEAR' : 254,
-\    'VK_PA1' : 253,
-\    'VK_PAUSE' : 19,
-\    'VK_PLAY' : 250,
-\    'VK_PRINT' : 42,
-\    'VK_PRIOR' : 33,
-\    'VK_PROCESSKEY' : 229,
-\    'VK_RBUTTON' : 2,
-\    'VK_RCONTROL' : 163,
-\    'VK_RETURN' : 13,
-\    'VK_RIGHT' : 39,
-\    'VK_RIGHT_CTL' : '39;1024',
-\    'VK_RMENU' : 165,
-\    'VK_RSHIFT' : 161,
-\    'VK_RWIN' : 92,
-\    'VK_SCROLL' : 145,
-\    'VK_SELECT' : 41,
-\    'VK_SEPARATOR' : 108,
-\    'VK_SHIFT' : 16,
-\    'VK_SNAPSHOT' : 44,
-\    'VK_SPACE' : 32,
-\    'VK_SUBTRACT' : 109,
-\    'VK_TAB' : 9,
-\    'VK_UP' : 38,
-\    'VK_UP_CTL' : '38;1024',
-\    'VK_VOLUME_DOWN' : 174,
-\    'VK_VOLUME_MUTE' : 173,
-\    'VK_VOLUME_UP' : 175,
-\    'VK_XBUTTON1' : 5,
-\    'VK_XBUTTON2' : 6,
-\    'VK_ZOOM' : 251
-\   }
-" }}}
-
-" **********************************************************************************************************
-" **** ACTUAL CONQUE FUNCTIONS!  ***************************************************************************
-" **********************************************************************************************************
-
-" {{{
-
-" launch conque
-function! conque_term#open(...) "{{{
-    let command = get(a:000, 0, '')
-    let vim_startup_commands = get(a:000, 1, [])
-    let return_to_current  = get(a:000, 2, 0)
-    let is_buffer  = get(a:000, 3, 1)
-
-    " dependency check
-    if !conque_term#dependency_check()
-        return 0
-    endif
-
-    " switch to buffer if needed
-    if is_buffer && return_to_current
-      let save_sb = &switchbuf
-      sil set switchbuf=usetab
-      let current_buffer = bufname("%")
-    endif
-
-    " bare minimum validation
-    if s:py == ''
-        echohl WarningMsg | echomsg "Conque requires the Python interface to be installed. See :help ConqueTerm for more information." | echohl None
-        return 0
-    endif
-    if empty(command)
-        echohl WarningMsg | echomsg "Invalid usage: no program path given. Use :ConqueTerm YOUR PROGRAM, e.g. :ConqueTerm ipython" | echohl None
-        return 0
-    else
-        let cmd_args = split(command, '[^\\]\@<=\s')
-        let cmd_args[0] = substitute(cmd_args[0], '\\ ', ' ', 'g')
-        if !executable(cmd_args[0])
-            echohl WarningMsg | echomsg "Not an executable: " . cmd_args[0] | echohl None
-            return 0
-        endif
-    endif
-
-    " initialize global identifiers
-    let g:ConqueTerm_Idx += 1
-    let g:ConqueTerm_Var = 'ConqueTerm_' . g:ConqueTerm_Idx
-    let g:ConqueTerm_BufName = substitute(command, ' ', '\\ ', 'g') . "\\ -\\ " . g:ConqueTerm_Idx
-
-    " initialize global mappings if needed
-    call conque_term#init()
-
-    " set Vim buffer window options
-    if is_buffer
-        call conque_term#set_buffer_settings(command, vim_startup_commands)
-
-        let b:ConqueTerm_Idx = g:ConqueTerm_Idx
-        let b:ConqueTerm_Var = g:ConqueTerm_Var
-    endif
-
-    " save terminal instance
-    let t_obj = conque_term#create_terminal_object(g:ConqueTerm_Idx, is_buffer, g:ConqueTerm_BufName, command)
-    let g:ConqueTerm_Terminals[g:ConqueTerm_Idx] = t_obj
-
-    " required for session support
-    let g:ConqueTerm_TerminalsString = string(g:ConqueTerm_Terminals)
-
-    " open command
-    try
-        let options = {}
-        let options["TERM"] = g:ConqueTerm_TERM
-        let options["CODE_PAGE"] = g:ConqueTerm_CodePage
-        let options["color"] = g:ConqueTerm_Color
-        let options["offset"] = g:ConqueTerm_StartMessages * 10
-
-        if s:platform == 'unix'
-            execute s:py . ' ' . g:ConqueTerm_Var . ' = Conque()'
-            execute s:py . ' ' . g:ConqueTerm_Var . ".open()"
-        else
-            " find python.exe and communicator
-            let py_exe = conque_term#find_python_exe()
-            let py_vim = s:scriptdirpy . 'conque_sole_communicator.py'
-            execute s:py . ' ' . g:ConqueTerm_Var . ' = ConqueSole()'
-            execute s:py . ' ' . g:ConqueTerm_Var . ".open()"
-
-            if g:ConqueTerm_ColorMode == 'conceal'
-                call conque_term#init_conceal_color()
-            endif
-        endif
-    catch
-        echohl WarningMsg | echomsg "An error occurred: " . command | echohl None
-        return 0
-    endtry
-
-    " set key mappings and auto commands 
-    if is_buffer
-        call conque_term#set_mappings('start')
-    endif
-
-    " call user defined functions
-    call conque_term#call_hooks('after_startup', t_obj)
-
-    " switch to buffer if needed
-    if is_buffer && return_to_current
-        sil exe ":sb " . current_buffer
-        sil exe ":set switchbuf=" . save_sb
-    elseif is_buffer
-        startinsert!
-    endif
-
-    return t_obj
-
-endfunction "}}}
-
-" open(), but no buffer
-function! conque_term#subprocess(command) " {{{
-    
-    let t_obj = conque_term#open(a:command, [], 0, 0)
-    if !exists('b:ConqueTerm_Var')
-        call conque_term#on_blur()
-        sil exe s:py . ' ' . g:ConqueTerm_Var . '.idle()'
-    endif
-    return t_obj
-
-endfunction " }}}
-
-" set buffer options
-function! conque_term#set_buffer_settings(command, vim_startup_commands) "{{{
-
-    " optional hooks to execute, e.g. 'split'
-    for h in a:vim_startup_commands
-        sil exe h
-    endfor
-    sil exe 'edit ++enc=utf-8 ' . g:ConqueTerm_BufName
-
-    " buffer settings 
-    setlocal fileencoding=utf-8 " file encoding, even tho there's no file
-    setlocal nopaste           " conque won't work in paste mode
-    setlocal buftype=nofile    " this buffer is not a file, you can't save it
-    setlocal nonumber          " hide line numbers
-    if v:version >= 703
-        setlocal norelativenumber " hide relative line numbers (VIM >= 7.3)
-    endif
-    setlocal foldcolumn=0      " reasonable left margin
-    setlocal nowrap            " default to no wrap (esp with MySQL)
-    setlocal noswapfile        " don't bother creating a .swp file
-    setlocal scrolloff=0       " don't use buffer lines. it makes the 'clear' command not work as expected
-    setlocal sidescrolloff=0   " don't use buffer lines. it makes the 'clear' command not work as expected
-    setlocal sidescroll=1      " don't use buffer lines. it makes the 'clear' command not work as expected
-    setlocal foldmethod=manual " don't fold on {{{}}} and stuff
-    setlocal bufhidden=hide    " when buffer is no longer displayed, don't wipe it out
-    setlocal noreadonly        " this is not actually a readonly buffer
-    if v:version >= 703
-        setlocal conceallevel=3
-        setlocal concealcursor=nic
-    endif
-    setfiletype conque_term    " useful
-    sil exe "setlocal syntax=" . g:ConqueTerm_Syntax
-
-    " temporary global settings go in here
-    call conque_term#on_focus(1)
-
-endfunction " }}}
-
-" send normal character key press to terminal
-function! conque_term#key_press() "{{{
-    sil exe s:py . ' ' . b:ConqueTerm_Var . ".write_ord(" . char2nr(v:char) . ")"
-    sil let v:char = ''
-endfunction " }}}
-
-" set key mappings and auto commands
-function! conque_term#set_mappings(action) "{{{
-
-    " set action {{{
-    if a:action == 'toggle'
-        if exists('b:conque_on') && b:conque_on == 1
-            let l:action = 'stop'
-            echohl WarningMsg | echomsg "Terminal is paused" | echohl None
-        else
-            let l:action = 'start'
-            echohl WarningMsg | echomsg "Terminal is resumed" | echohl None
-        endif
-    else
-        let l:action = a:action
-    endif
-
-    " if mappings are being removed, add 'un'
-    let map_modifier = 'nore'
-    if l:action == 'stop'
-        let map_modifier = 'un'
-    endif
-    " }}}
-
-    " auto commands {{{
-    if l:action == 'stop'
-        sil exe 'autocmd! ' . b:ConqueTerm_Var
-
-    else
-        sil exe 'augroup ' . b:ConqueTerm_Var
-
-        " handle unexpected closing of shell, passes HUP to parent and all child processes
-        sil exe 'autocmd ' . b:ConqueTerm_Var . ' BufUnload <buffer> ' . s:py . ' ' . b:ConqueTerm_Var . '.close()'
-
-        " check for resized/scrolled buffer when entering buffer
-        sil exe 'autocmd ' . b:ConqueTerm_Var . ' BufEnter <buffer> ' . s:py . ' ' . b:ConqueTerm_Var . '.update_window_size()'
-        sil exe 'autocmd ' . b:ConqueTerm_Var . ' VimResized ' . s:py . ' ' . b:ConqueTerm_Var . '.update_window_size()'
-
-        " set/reset updatetime on entering/exiting buffer
-        sil exe 'autocmd ' . b:ConqueTerm_Var . ' BufEnter <buffer> call conque_term#on_focus()'
-        sil exe 'autocmd ' . b:ConqueTerm_Var . ' BufLeave <buffer> call conque_term#on_blur()'
-
-        " reposition cursor when going into insert mode
-        sil exe 'autocmd ' . b:ConqueTerm_Var . ' InsertEnter <buffer> ' . s:py . ' ' . b:ConqueTerm_Var . '.insert_enter()'
-
-        " poll for more output
-        sil exe 'autocmd ' . b:ConqueTerm_Var . ' CursorHoldI <buffer> ' . s:py . ' ' .  b:ConqueTerm_Var . '.auto_read()'
-    endif
-    " }}}
-
-    " map ASCII 1-31 {{{
-    for c in range(1, 31)
-        " <Esc>
-        if c == 27 || c == 3
-            continue
-        endif
-        if l:action == 'start'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <C-' . nr2char(64 + c) . '> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_ord(' . c . ')<CR>'
-        else
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <C-' . nr2char(64 + c) . '>'
-        endif
-    endfor
-    " bonus mapping: send <C-c> in normal mode to terminal as well for panic interrupts
-    if l:action == 'start'
-        sil exe 'i' . map_modifier . 'map <silent> <buffer> <C-c> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_ord(3)<CR>'
-        sil exe 'n' . map_modifier . 'map <silent> <buffer> <C-c> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_ord(3)<CR>'
-    else
-        sil exe 'i' . map_modifier . 'map <silent> <buffer> <C-c>'
-        sil exe 'n' . map_modifier . 'map <silent> <buffer> <C-c>'
-    endif
-
-    " leave insert mode
-    if !exists('g:ConqueTerm_EscKey') || g:ConqueTerm_EscKey == '<Esc>'
-        " use <Esc><Esc> to send <Esc> to terminal
-        if l:action == 'start'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <Esc><Esc> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_ord(27)<CR>'
-        else
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <Esc><Esc>'
-        endif
-    else
-        " use <Esc> to send <Esc> to terminal
-        if l:action == 'start'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> ' . g:ConqueTerm_EscKey . ' <Esc>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <Esc> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_ord(27)<CR>'
-        else
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> ' . g:ConqueTerm_EscKey
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <Esc>'
-        endif
-    endif
-
-    " Map <C-w> in insert mode
-    if exists('g:ConqueTerm_CWInsert') && g:ConqueTerm_CWInsert == 1
-        inoremap <silent> <buffer> <C-w>j <Esc><C-w>j
-        inoremap <silent> <buffer> <C-w>k <Esc><C-w>k
-        inoremap <silent> <buffer> <C-w>h <Esc><C-w>h
-        inoremap <silent> <buffer> <C-w>l <Esc><C-w>l
-        inoremap <silent> <buffer> <C-w><Up> <Esc><C-w><Up>
-        inoremap <silent> <buffer> <C-w><Down> <Esc><C-w><Down>
-        inoremap <silent> <buffer> <C-w><Right> <Esc><C-w><Right>
-        inoremap <silent> <buffer> <C-w><Left> <Esc><C-w><Left>
-        inoremap <silent> <buffer> <C-w><C-w> <Esc><C-w><C-w>
-        inoremap <silent> <buffer> <C-w>w <Esc><C-w>w
-    endif
-    " }}}
-
-    " map 33 and beyond {{{
-    if exists('##InsertCharPre')
-        if l:action == 'start'
-            autocmd InsertCharPre <buffer> call conque_term#key_press()
-        else
-            autocmd! InsertCharPre <buffer>
-        endif
-    else
-        for i in range(33, 127)
-            " <Bar>
-            if i == 124
-                if l:action == 'start'
-                    sil exe "i" . map_modifier . "map <silent> <buffer> <Bar> <C-o>:" . s:py . ' ' . b:ConqueTerm_Var . ".write_ord(124)<CR>"
-                else
-                    sil exe "i" . map_modifier . "map <silent> <buffer> <Bar>"
-                endif
-                continue
-            endif
-            if l:action == 'start'
-                sil exe "i" . map_modifier . "map <silent> <buffer> " . nr2char(i) . " <C-o>:" . s:py . ' ' . b:ConqueTerm_Var . ".write_ord(" . i . ")<CR>"
-            else
-                sil exe "i" . map_modifier . "map <silent> <buffer> " . nr2char(i)
-            endif
-        endfor
-    endif
-    " }}}
-
-    " Special keys {{{
-    if l:action == 'start'
-        if s:platform == 'unix'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <BS> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u("\x08"))<CR>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <Space> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u(" "))<CR>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <Up> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u("\x1b[A"))<CR>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <Down> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u("\x1b[B"))<CR>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <Right> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u("\x1b[C"))<CR>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <Left> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u("\x1b[D"))<CR>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <Home> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u("\x1bOH"))<CR>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <End> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u("\x1bOF"))<CR>'
-        else
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <BS> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u("\x08"))<CR>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <Space> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u(" "))<CR>'
-
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <Up> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_UP . ')<CR>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <Down> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_DOWN . ')<CR>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <Right> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_RIGHT . ')<CR>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <Left> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_LEFT . ')<CR>'
-
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <C-Up> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk("' . s:windows_vk.VK_UP_CTL . '")<CR>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <C-Down> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk("' . s:windows_vk.VK_DOWN_CTL . '")<CR>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <C-Right> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk("' . s:windows_vk.VK_RIGHT_CTL . '")<CR>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <C-Left> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk("' . s:windows_vk.VK_LEFT_CTL . '")<CR>'
-
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <Del> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_DELETE . ')<CR>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <Home> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_HOME . ')<CR>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <End> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_END . ')<CR>'
-        endif
-    else
-        sil exe 'i' . map_modifier . 'map <silent> <buffer> <BS>'
-        sil exe 'i' . map_modifier . 'map <silent> <buffer> <Space>'
-        sil exe 'i' . map_modifier . 'map <silent> <buffer> <Up>'
-        sil exe 'i' . map_modifier . 'map <silent> <buffer> <Down>'
-        sil exe 'i' . map_modifier . 'map <silent> <buffer> <Right>'
-        sil exe 'i' . map_modifier . 'map <silent> <buffer> <Left>'
-        sil exe 'i' . map_modifier . 'map <silent> <buffer> <Home>'
-        sil exe 'i' . map_modifier . 'map <silent> <buffer> <End>'
-    endif
-    " }}}
-
-    " <F-> keys {{{
-    if g:ConqueTerm_SendFunctionKeys
-        if l:action == 'start'
-            if s:platform == 'unix'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F1>  <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u("\x1b[11~"))<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F2>  <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u("\x1b[12~"))<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F3>  <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u("1b[13~"))<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F4>  <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u("\x1b[14~"))<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F5>  <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u("\x1b[15~"))<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F6>  <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u("\x1b[17~"))<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F7>  <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u("\x1b[18~"))<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F8>  <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u("\x1b[19~"))<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F9>  <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u("\x1b[20~"))<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F10> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u("\x1b[21~"))<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F11> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u("\x1b[23~"))<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F12> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write(u("\x1b[24~"))<CR>'
-            else
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F1> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F1 . ')<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F2> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F2 . ')<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F3> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F3 . ')<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F4> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F4 . ')<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F5> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F5 . ')<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F6> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F6 . ')<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F7> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F7 . ')<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F8> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F8 . ')<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F9> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F9 . ')<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F10> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F10 . ')<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F11> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F11 . ')<CR>'
-                sil exe 'i' . map_modifier . 'map <silent> <buffer> <F12> <C-o>:' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F12 . ')<CR>'
-            endif
-        else
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <F1>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <F2>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <F3>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <F4>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <F5>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <F6>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <F7>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <F8>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <F9>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <F10>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <F11>'
-            sil exe 'i' . map_modifier . 'map <silent> <buffer> <F12>'
-        endif
-    endif
-    " }}}
-
-    " various global mappings {{{
-    " don't overwrite existing mappings
-    if l:action == 'start'
-        if maparg(g:ConqueTerm_SendVisKey, 'v') == ''
-          sil exe 'v' . map_modifier . 'map <silent> ' . g:ConqueTerm_SendVisKey . ' :<C-u>call conque_term#send_selected(visualmode())<CR>'
-        endif
-        if maparg(g:ConqueTerm_SendFileKey, 'n') == ''
-          sil exe 'n' . map_modifier . 'map <silent> ' . g:ConqueTerm_SendFileKey . ' :<C-u>call conque_term#send_file()<CR>'