Merge https://github.com/vim/vim into android-16
Change-Id: I7e07f30cb27013e2d03b3b07c267fea6cc2785f2
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..8b13062
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,221 @@
+vim_src := $(call my-dir)
+
+# ========================================================
+# etc/vimrc
+# ========================================================
+
+LOCAL_PATH := $(vim_src)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := vimrc
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := vimrc.android
+LOCAL_MODULE_PATH := $(TARGET_OUT_SYSTEM_EXT_ETC)
+
+include $(BUILD_PREBUILT)
+
+# ========================================================
+# vim
+# ========================================================
+
+LOCAL_PATH := $(vim_src)/src
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+ auto/pathdef.c \
+ autocmd.c \
+ blob.c \
+ blowfish.c \
+ buffer.c \
+ change.c \
+ channel.c \
+ charset.c \
+ debugger.c \
+ dict.c \
+ diff.c \
+ digraph.c \
+ edit.c \
+ eval.c \
+ evalfunc.c \
+ ex_cmds.c \
+ ex_cmds2.c \
+ ex_docmd.c \
+ ex_eval.c \
+ ex_getln.c \
+ fileio.c \
+ findfile.c \
+ fold.c \
+ getchar.c \
+ hardcopy.c \
+ hashtab.c \
+ if_cscope.c \
+ if_xcmdsrv.c \
+ indent.c \
+ json.c \
+ list.c \
+ main.c \
+ mark.c \
+ mbyte.c \
+ memfile.c \
+ memline.c \
+ menu.c \
+ message.c \
+ misc1.c \
+ misc2.c \
+ move.c \
+ normal.c \
+ ops.c \
+ option.c \
+ os_unix.c \
+ popupmnu.c \
+ popupwin.c \
+ pty.c \
+ quickfix.c \
+ regexp.c \
+ screen.c \
+ search.c \
+ sha256.c \
+ spell.c \
+ syntax.c \
+ tag.c \
+ term.c \
+ textprop.c \
+ ui.c \
+ undo.c \
+ usercmd.c \
+ userfunc.c \
+ version.c \
+ window.c
+
+LOCAL_C_INCLUDES += \
+ external/libselinux/include \
+ external/libncurses/include \
+ $(LOCAL_PATH)/proto \
+ $(LOCAL_PATH)/auto
+
+LOCAL_SHARED_LIBRARIES += \
+ libselinux \
+ libncurses \
+ libm \
+ libdl
+
+VIM_RC_FILE := $(TARGET_OUT_SYSTEM_EXT_ETC)/vimrc
+
+# DONT REPLACE system_ext here - path is used during runtime
+LOCAL_CFLAGS += \
+ -DHAVE_CONFIG_H \
+ -DSYS_VIMRC_FILE=\"/system_ext/etc/vimrc\"
+
+# vim variants: TINY SMALL CM NORMAL BIG HUGE
+#
+# NORMAL, BIG and HUGE are almost the same (1.1M)
+# TINY and SMALL are similar to busybox vi (460K)
+#
+# our profile is between SMALL and NORMAL (780K)
+# with syntax and utf8 (mbyte) support
+#
+# to reduce vim size, manually define wanted features
+LOCAL_CFLAGS += \
+ -DFEAT_SMALL=1 \
+ -DFEAT_MBYTE=1 \
+ -DFEAT_SYN_HL=1 \
+ -DFEAT_CINDENT=1 \
+ -DFEAT_COMMENTS=1 \
+ -DFEAT_EVAL=1 \
+ -DFEAT_AUTOCMD=1 \
+ -DFEAT_USR_CMDS=1 \
+ -DFEAT_EX_EXTRA=1 \
+ -DFEAT_CMDL_COMPL=1 \
+ -DFEAT_LISTCMDS=1 \
+ -DFEAT_CMDL_INFO=1 \
+ -DFEAT_SEARCH_EXTRA=1
+
+LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-parameter -Wno-deprecated-declarations
+
+LOCAL_MODULE := vim
+LOCAL_MODULE_PATH := $(TARGET_OUT_SYSTEM_EXT_EXECUTABLES)
+LOCAL_REQUIRED_MODULES := vimrc
+include $(BUILD_EXECUTABLE)
+
+# Create vi symlink
+$(shell mkdir -p $(TARGET_OUT_SYSTEM_EXT_EXECUTABLES))
+$(shell pushd $(TARGET_OUT_SYSTEM_EXT_EXECUTABLES) > /dev/null && ln -sf vim vi && popd > /dev/null)
+
+# ========================================================
+# vim runtime files
+# ========================================================
+ifeq (vim,$(filter vim, $(ALL_MODULES)))
+
+vim_runtime_path := $(vim_src)/runtime
+
+vim_runtime_files := \
+ scripts.vim \
+ indent.vim \
+ indoff.vim \
+ filetype.vim \
+ ftoff.vim
+
+vim_doc_files := \
+ help.txt intro.txt tags \
+ motion.txt editing.txt scroll.txt \
+ options.txt term.txt
+
+vim_colors_files := \
+ default.vim \
+ desert.vim
+
+vim_syntax_files := \
+ logcat.vim \
+ awk.vim \
+ config.vim \
+ conf.vim \
+ cpp.vim \
+ c.vim \
+ css.vim \
+ diff.vim \
+ doxygen.vim \
+ html.vim vb.vim \
+ xml.vim dtd.vim \
+ context.vim \
+ gitcommit.vim \
+ help.vim \
+ javascript.vim \
+ java.vim \
+ lua.vim \
+ manual.vim \
+ markdown.vim \
+ pod.vim \
+ sh.vim \
+ syncolor.vim \
+ synload.vim \
+ syntax.vim \
+ vim.vim
+
+vim_plugin_files := \
+ matchparen.vim \
+
+vim_autoload_files := \
+ dist/ft.vim \
+ spacehi.vim
+
+VIM_SHARED := $(TARGET_OUT_SYSTEM_EXT)/usr/share/vim
+
+RUNTIME_FILES := \
+ $(vim_runtime_files) \
+ $(addprefix doc/, $(vim_doc_files)) \
+ $(addprefix colors/, $(vim_colors_files)) \
+ $(addprefix syntax/, $(vim_syntax_files)) \
+ $(addprefix plugin/, $(vim_plugin_files)) \
+ $(addprefix autoload/, $(vim_autoload_files)) \
+
+$(VIM_SHARED): $(ACP)
+ @echo "Install vim runtime files"
+ @mkdir -p $@
+ @$(foreach RUNTIME_FILE,$(RUNTIME_FILES), \
+ mkdir -p $@/$(dir $(RUNTIME_FILE)); \
+ $(ACP) $(vim_runtime_path)/$(RUNTIME_FILE) $@/$(RUNTIME_FILE); \
+ )
+
+ALL_DEFAULT_INSTALLED_MODULES += $(VIM_SHARED)
+
+endif
diff --git a/runtime/autoload/spacehi.vim b/runtime/autoload/spacehi.vim
new file mode 100644
index 0000000..31a72de
--- /dev/null
+++ b/runtime/autoload/spacehi.vim
@@ -0,0 +1,117 @@
+" vim600: set foldmethod=marker:
+"
+" Version: 1.4
+" Description: Per buffer, togglable syntax highlighting of tabs and trailing
+" spaces.
+" Author: Adam Lazur <adam@lazur.org>, extended by Jonathan Palardy
+" URL: https://github.com/jpalardy/spacehi.vim
+" License: Redistribution and use of this file, with or without
+" modification, are permitted without restriction.
+"
+" Section: Documentation {{{1
+"
+" This plugin will highlight tabs, nbsps and trailing spaces on a line, with the
+" ability to toggle the highlighting on and off. Using highlighting to
+" illuminate these characters is preferrable to using listchars and set list
+" because it allows you to copy from the vim window without getting shrapnel
+" in your buffer.
+"
+" NOTE: "set list" will override SpaceHi's highlighting.
+"
+" Highlighting can be turned on and off with the functions SpaceHi() and
+" NoSpaceHi() respectively. You can also toggle the highlighting state by
+" using ToggleSpaceHi(). By default, ToggleSpaceHi is bound to the key F3.
+"
+" You can customize the colors by setting the following variables to a string
+" of key=val that would normally follow "highlight group" command:
+"
+" g:spacehi_spacecolor
+" g:spacehi_tabcolor
+" g:spacehi_nbspcolor
+"
+" The defaults can be found in the "Default Global Vars" section below.
+"
+" You can give a list of filetypes to exclude
+"
+" If you want to highlight tabs and trailing spaces by default for every file
+" that is syntax highlighted, you can add the following to your vimrc:
+"
+" autocmd syntax * SpaceHi
+"
+" The author currently uses the following (a little overboard) in his vimrc:
+"
+" autocmd BufNewFile,BufReadPost,FilterReadPost,FileReadPost,Syntax * SpaceHi
+" au FileType help NoSpaceHi
+
+" Section: Plugin header {{{1
+" If we have already loaded this file, don't load it again.
+if exists("loaded_spacehi")
+ finish
+endif
+let loaded_spacehi=1
+
+" Section: Default Global Vars {{{1
+if !exists("g:spacehi_tabcolor")
+ " highlight tabs with red underline
+ let g:spacehi_tabcolor="ctermfg=White ctermbg=Red guifg=White guibg=Red"
+endif
+if !exists("g:spacehi_spacecolor")
+ " highlight trailing spaces in blue underline
+ let g:spacehi_spacecolor="ctermfg=Black ctermbg=Yellow guifg=Blue guibg=Yellow"
+endif
+if !exists("g:spacehi_nbspcolor")
+ " highlight nbsps with red underline
+ let g:spacehi_nbspcolor="ctermfg=White ctermbg=Red guifg=White guibg=Red"
+endif
+
+" Section: Functions {{{1
+" Function: s:SpaceHi() {{{2
+" Turn on highlighting of spaces and tabs
+function! s:SpaceHi()
+ " highlight tabs
+ syntax match spacehiTab /\t/ containedin=ALL
+ execute("highlight spacehiTab " . g:spacehi_tabcolor)
+
+ " highlight trailing spaces
+ syntax match spacehiTrailingSpace /\s\+$/ containedin=ALL
+ execute("highlight spacehiTrailingSpace " . g:spacehi_spacecolor)
+
+ " highlight nbsps
+ syntax match spacehiNbsp /\%d160/ containedin=ALL
+ execute("highlight spacehiNbsp " . g:spacehi_nbspcolor)
+
+ let b:spacehi = 1
+endfunction
+
+" Function: s:NoSpaceHi() {{{2
+" Turn off highlighting of spaces and tabs
+function! s:NoSpaceHi()
+ syntax clear spacehiTab
+ syntax clear spacehiTrailingSpace
+ syntax clear spacehiNbsp
+ let b:spacehi = 0
+endfunction
+
+" Function: s:ToggleSpaceHi() {{{2
+" Toggle highlighting of spaces and tabs
+function! s:ToggleSpaceHi()
+ if exists("b:spacehi") && b:spacehi
+ call s:NoSpaceHi()
+ echo "spacehi off"
+ else
+ call s:SpaceHi()
+ echo "spacehi on"
+ endif
+endfunction
+
+" Section: Commands {{{1
+com! SpaceHi call s:SpaceHi()
+com! NoSpaceHi call s:NoSpaceHi()
+com! ToggleSpaceHi call s:ToggleSpaceHi()
+
+" Section: Default mappings {{{1
+" Only insert a map to ToggleSpaceHi if they don't already have a map to
+" the function and don't have something bound to F3
+if !hasmapto('ToggleSpaceHi') && maparg("<F3>") == ""
+ map <silent> <unique> <F3> :ToggleSpaceHi<CR>
+endif
diff --git a/runtime/syntax/logcat.vim b/runtime/syntax/logcat.vim
new file mode 100644
index 0000000..595d0a2
--- /dev/null
+++ b/runtime/syntax/logcat.vim
@@ -0,0 +1,31 @@
+" Vim syntax file
+" Language: logcat
+" Maintainer: Naseer Ahmed <naseer.ahmed@gmail.com>
+" Latest Revision: 2014-07-06 <tpruvot@github>
+
+if exists("b:current_syntax")
+ finish
+endif
+
+" Define colors
+hi def LogF_color ctermfg=white guifg=white ctermbg=red guibg=red
+hi def LogE_color ctermfg=red guifg=red
+hi def LogW_color ctermfg=brown guifg=brown
+hi def LogI_color ctermfg=darkgreen guifg=darkgreen
+hi def LogD_color ctermfg=blue guifg=blue
+hi def LogV_color ctermfg=gray guifg=gray
+
+syn match LogF 'F/.*'
+syn match LogE 'E/.*'
+syn match LogW 'W/.*'
+syn match LogI 'I/.*'
+syn match LogD 'D/.*'
+syn match LogV 'V/.*'
+
+hi def link LogF LogF_color
+hi def link LogE LogE_color
+hi def link LogW LogW_color
+hi def link LogI LogI_color
+hi def link LogD LogD_color
+hi def link LogV LogV_color
+
diff --git a/runtime/syntax/xml.vim b/runtime/syntax/xml.vim
index d99f8b4..8791979 100644
--- a/runtime/syntax/xml.vim
+++ b/runtime/syntax/xml.vim
@@ -298,9 +298,11 @@
syn keyword xmlDocTypeKeyword contained DOCTYPE PUBLIC SYSTEM
syn region xmlInlineDTD contained matchgroup=xmlDocTypeDecl start="\[" end="]" contains=@xmlDTD
-syn include @xmlDTD <sfile>:p:h/dtd.vim
-unlet b:current_syntax
+if exists('g:xml_syntax_folding')
+ syn include @xmlDTD <sfile>:p:h/dtd.vim
+ unlet b:current_syntax
+endif
" synchronizing
diff --git a/src/auto/config.h b/src/auto/config.h
new file mode 100644
index 0000000..b94890c
--- /dev/null
+++ b/src/auto/config.h
@@ -0,0 +1,492 @@
+/* auto/config.h. Generated from config.h.in by configure. */
+/*
+ * config.h.in. Originally generated automatically from configure.ac by
+ * autoheader and manually changed after that.
+ */
+
+/* Define if we have EBCDIC code */
+/* #undef EBCDIC */
+
+/* Define unless no X support found */
+/* #undef HAVE_X11 */
+
+/* Define when terminfo support found */
+#define TERMINFO 1
+
+/* Define when termcap.h contains ospeed */
+#define HAVE_OSPEED 1
+
+/* Define when ospeed can be extern */
+/* #undef OSPEED_EXTERN */
+
+/* Define when termcap.h contains UP, BC and PC */
+#define HAVE_UP_BC_PC 1
+
+/* Define when UP, BC and PC can be extern */
+/* #undef UP_BC_PC_EXTERN */
+
+/* Define when termcap.h defines outfuntype */
+/* #undef HAVE_OUTFUNTYPE */
+
+/* Define when __DATE__ " " __TIME__ can be used */
+/* #undef HAVE_DATE_TIME */
+
+/* Define when __attribute__((unused)) can be used */
+#define HAVE_ATTRIBUTE_UNUSED 1
+
+/* defined always when using configure */
+#define UNIX 1
+
+/* Defined to the size of an int */
+#define VIM_SIZEOF_INT 4
+
+/* Defined to the size of a long */
+#define VIM_SIZEOF_LONG 8
+
+/* Defined to the size of off_t */
+#define SIZEOF_OFF_T 8
+
+/* Defined to the size of time_t */
+#define SIZEOF_TIME_T 8
+
+/* Define when wchar_t is only 2 bytes. */
+/* #undef SMALL_WCHAR_T */
+
+/*
+ * If we cannot trust one of the following from the libraries, we use our
+ * own safe but probably slower vim_memmove().
+ */
+/* #undef USEBCOPY */
+#define USEMEMMOVE 1
+/* #undef USEMEMCPY */
+
+/* Define when "man -s 2" is to be used */
+#define USEMAN_S 1
+
+/* Define to empty if the keyword does not work. */
+/* #undef const */
+
+/* Define to empty if the keyword does not work. */
+/* #undef volatile */
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+/* #undef mode_t */
+
+/* Define to `long' if <sys/types.h> doesn't define. */
+/* #undef off_t */
+
+/* Define to `long' if <sys/types.h> doesn't define. */
+/* #undef pid_t */
+
+/* Define to `unsigned' if <sys/types.h> doesn't define. */
+/* #undef size_t */
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+/* #undef uid_t */
+
+/* Define to `unsigned int' or other type that is 32 bit. */
+/* #undef uint32_t */
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+/* #undef gid_t */
+
+/* Define to `long' if <sys/types.h> doesn't define. */
+/* #undef ino_t */
+
+/* Define to `unsigned' if <sys/types.h> doesn't define. */
+/* #undef dev_t */
+
+/* Define on big-endian machines */
+/* #undef WORDS_BIGENDIAN */
+
+/* Define to `unsigned long' if <sys/types.h> doesn't define. */
+/* #undef rlim_t */
+
+/* Define to `struct sigaltstack' if <signal.h> doesn't define. */
+/* #undef stack_t */
+
+/* Define if stack_t has the ss_base field. */
+/* #undef HAVE_SS_BASE */
+
+/* Define if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* Define if you can safely include both <sys/time.h> and <sys/select.h>. */
+#define SYS_SELECT_WITH_SYS_TIME 1
+
+/* Define to a typecast for select() arguments 2, 3 and 4. */
+#define SELECT_TYPE_ARG234 (fd_set *)
+
+/* Define if you have /dev/ptc */
+/* #undef HAVE_DEV_PTC */
+
+/* Define if you have Sys4 ptys */
+#define HAVE_SVR4_PTYS 1
+
+/* Define to range of pty names to try */
+/* #undef PTYRANGE0 */
+/* #undef PTYRANGE1 */
+
+/* Define mode for pty */
+/* #undef PTYMODE */
+
+/* Define group for pty */
+/* #undef PTYGROUP */
+
+/* Define as the return type of signal handlers (int or void). */
+#define RETSIGTYPE void
+
+/* Define as the command at the end of signal handlers ("" or "return 0;"). */
+#define SIGRETURN return
+
+/* Define if struct sigcontext is present */
+#define HAVE_SIGCONTEXT 1
+
+/* Define if touuper/tolower only work on lower/upercase characters */
+/* #undef BROKEN_TOUPPER */
+
+/* Define if stat() ignores a trailing slash */
+/* #undef STAT_IGNORES_SLASH */
+
+/* Define if tgetstr() has a second argument that is (char *) */
+/* #undef TGETSTR_CHAR_P */
+
+/* Define if tgetent() returns zero for an error */
+#define TGETENT_ZERO_ERR 0
+
+/* Define if the getcwd() function should not be used. */
+/* #undef BAD_GETCWD */
+
+/* Define if you the function: */
+#define HAVE_FCHDIR 1
+#define HAVE_FCHOWN 1
+#define HAVE_FCHMOD 1
+#define HAVE_FLOAT_FUNCS 1
+#define HAVE_FSEEKO 1
+#define HAVE_FSYNC 1
+#define HAVE_FTRUNCATE 1
+#define HAVE_GETCWD 1
+#define HAVE_GETPGID 1
+/* #undef HAVE_GETPSEUDOTTY */
+#define HAVE_GETPWENT 1
+#define HAVE_GETPWNAM 1
+#define HAVE_GETPWUID 1
+#define HAVE_GETRLIMIT 1
+#define HAVE_GETTIMEOFDAY 1
+/* #undef HAVE_GETWD */
+#define HAVE_ICONV 1
+#define HAVE_LOCALTIME_R 1
+#define HAVE_LSTAT 1
+#define HAVE_MEMSET 1
+#define HAVE_MKDTEMP 1
+#define HAVE_NANOSLEEP 1
+#define HAVE_NL_LANGINFO_CODESET 1
+#define HAVE_OPENDIR 1
+#define HAVE_POSIX_OPENPT 1
+#define HAVE_PUTENV 1
+#define HAVE_QSORT 1
+#define HAVE_READLINK 1
+#define HAVE_RENAME 1
+#define HAVE_SELECT 1
+#define HAVE_SELINUX 1
+#define HAVE_SETENV 1
+#define HAVE_SETPGID 1
+#define HAVE_SETSID 1
+#define HAVE_SIGACTION 1
+#define HAVE_SIGALTSTACK 1
+/* #undef HAVE_SIGSET */
+/* #undef HAVE_SIGSETJMP */
+#define HAVE_SIGSTACK 1
+#define HAVE_SIGPROCMASK 1
+/* #undef HAVE_SIGVEC */
+/* #undef HAVE_SMACK */
+#define HAVE_STRCASECMP 1
+#define HAVE_STRERROR 1
+#define HAVE_STRFTIME 1
+/* #undef HAVE_STRICMP */
+#define HAVE_STRNCASECMP 1
+/* #undef HAVE_STRNICMP */
+#define HAVE_STRPBRK 1
+#define HAVE_STRTOL 1
+#define HAVE_CANBERRA 1
+#define HAVE_ST_BLKSIZE 1
+#define HAVE_SYSCONF 1
+/* #undef HAVE_SYSCTL */
+#define HAVE_SYSINFO 1
+#define HAVE_SYSINFO_MEM_UNIT 1
+#define HAVE_TGETENT 1
+#define HAVE_TOWLOWER 1
+#define HAVE_TOWUPPER 1
+#define HAVE_ISWUPPER 1
+#define HAVE_UNSETENV 1
+#define HAVE_USLEEP 1
+#define HAVE_UTIME 1
+#define HAVE_BIND_TEXTDOMAIN_CODESET 1
+#define HAVE_MBLEN 1
+
+/* Define, if needed, for accessing large files. */
+/* #undef _LARGE_FILES */
+/* #undef _FILE_OFFSET_BITS */
+/* #undef _LARGEFILE_SOURCE */
+
+/* Define if you do not have utime(), but do have the utimes() function. */
+#define HAVE_UTIMES 1
+
+/* Define if you have the header file: */
+#define HAVE_DIRENT_H 1
+#define HAVE_ERRNO_H 1
+#define HAVE_FCNTL_H 1
+/* #undef HAVE_FRAME_H */
+#define HAVE_ICONV_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_LANGINFO_H 1
+/* #undef HAVE_LIBC_H */
+#define HAVE_LIBGEN_H 1
+#define HAVE_LIBINTL_H 1
+#define HAVE_LOCALE_H 1
+#define HAVE_MATH_H 1
+/* #undef HAVE_NDIR_H */
+#define HAVE_POLL_H 1
+/* #undef HAVE_PTHREAD_NP_H */
+#define HAVE_PWD_H 1
+#define HAVE_SETJMP_H 1
+#define HAVE_SGTTY_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_STRINGS_H 1
+/* #undef HAVE_STROPTS_H */
+/* #undef HAVE_SYS_ACCESS_H */
+/* #undef HAVE_SYS_ACL_H */
+/* #undef HAVE_SYS_DIR_H */
+#define HAVE_SYS_IOCTL_H 1
+/* #undef HAVE_SYS_NDIR_H */
+#define HAVE_SYS_PARAM_H 1
+#define HAVE_SYS_POLL_H 1
+/* #undef HAVE_SYS_PTEM_H */
+/* #undef HAVE_SYS_PTMS_H */
+#define HAVE_SYS_RESOURCE_H 1
+#define HAVE_SYS_SELECT_H 1
+#define HAVE_SYS_STATFS_H 1
+/* #undef HAVE_SYS_STREAM_H */
+#define HAVE_SYS_SYSCTL_H 1
+#define HAVE_SYS_SYSINFO_H 1
+/* #undef HAVE_SYS_SYSTEMINFO_H */
+#define HAVE_SYS_TIME_H 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_UTSNAME_H 1
+#define HAVE_TERMCAP_H 1
+#define HAVE_TERMIOS_H 1
+#define HAVE_TERMIO_H 1
+#define HAVE_WCHAR_H 1
+#define HAVE_WCTYPE_H 1
+#define HAVE_UNISTD_H 1
+/* #undef HAVE_UTIL_DEBUG_H */
+/* #undef HAVE_UTIL_MSGI18N_H */
+#define HAVE_UTIME_H 1
+/* #undef HAVE_X11_SUNKEYSYM_H */
+/* #undef HAVE_XM_XM_H */
+/* #undef HAVE_XM_XPMP_H */
+/* #undef HAVE_XM_TRAITP_H */
+/* #undef HAVE_XM_MANAGER_H */
+/* #undef HAVE_XM_UNHIGHLIGHTT_H */
+/* #undef HAVE_XM_JOINSIDET_H */
+/* #undef HAVE_XM_NOTEBOOK_H */
+/* #undef HAVE_X11_XPM_H */
+/* #undef HAVE_X11_XMU_EDITRES_H */
+/* #undef HAVE_X11_SM_SMLIB_H */
+
+/* Define to the type of the XpmAttributes type. */
+/* #undef XPMATTRIBUTES_TYPE */
+
+/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
+#define HAVE_SYS_WAIT_H 1
+
+/* Define if you have a <sys/wait.h> that is not POSIX.1 compatible. */
+/* #undef HAVE_UNION_WAIT */
+
+/* This is currently unused in vim: */
+/* Define if you have the ANSI C header files. */
+/* #undef STDC_HEADERS */
+
+/* instead, we check a few STDC things ourselves */
+#define HAVE_STDLIB_H 1
+#define HAVE_STRING_H 1
+
+/* Define if strings.h cannot be included when strings.h already is */
+/* #undef NO_STRINGS_WITH_STRING_H */
+
+/* Define if you want tiny features. */
+/* #undef FEAT_TINY */
+
+/* Define if you want small features. */
+/* #undef FEAT_SMALL */
+
+/* Define if you want normal features. */
+/* #undef FEAT_NORMAL */
+
+/* Define if you want big features. */
+/* #undef FEAT_BIG */
+
+/* Define if you want huge features. */
+/* #undef FEAT_HUGE */
+
+/* Define if you want to include the Lua interpreter. */
+/* #undef FEAT_LUA */
+
+/* Define for linking via dlopen() or LoadLibrary() */
+/* #undef DYNAMIC_LUA */
+
+/* Define if you want to include the MzScheme interpreter. */
+/* #undef FEAT_MZSCHEME */
+
+/* Define if you want to include the Perl interpreter. */
+/* #undef FEAT_PERL */
+
+/* Define for linking via dlopen() or LoadLibrary() */
+/* #undef DYNAMIC_PERL */
+
+/* Define if you want to include the Python interpreter. */
+/* #undef FEAT_PYTHON */
+
+/* Define if you want to include the Python3 interpreter. */
+/* #undef FEAT_PYTHON3 */
+
+/* Define for linking via dlopen() or LoadLibrary() */
+/* #undef DYNAMIC_PYTHON */
+
+/* Define for linking via dlopen() or LoadLibrary() */
+/* #undef DYNAMIC_PYTHON3 */
+
+/* Define if dynamic python does not require RTLD_GLOBAL */
+/* #undef PY_NO_RTLD_GLOBAL */
+
+/* Define if dynamic python3 does not require RTLD_GLOBAL */
+/* #undef PY3_NO_RTLD_GLOBAL */
+
+/* Define if you want to include the Ruby interpreter. */
+/* #undef FEAT_RUBY */
+
+/* Define for linking via dlopen() or LoadLibrary() */
+/* #undef DYNAMIC_RUBY */
+
+/* Define if you want to include the Tcl interpreter. */
+/* #undef FEAT_TCL */
+
+/* Define for linking via dlopen() or LoadLibrary() */
+/* #undef DYNAMIC_TCL */
+
+/* Define if you want to add support for ACL */
+/* #undef HAVE_POSIX_ACL */
+/* #undef HAVE_SOLARIS_ZFS_ACL */
+/* #undef HAVE_SOLARIS_ACL */
+/* #undef HAVE_AIX_ACL */
+
+/* Define if pango_shape_full() is available. */
+#define HAVE_PANGO_SHAPE_FULL 1
+
+/* Define if you want to add support of GPM (Linux console mouse daemon) */
+/* #undef HAVE_GPM */
+
+/* Define if you want to add support of sysmouse (*BSD console mouse) */
+/* #undef HAVE_SYSMOUSE */
+
+/* Define if you want to include the Cscope interface. */
+/* #undef FEAT_CSCOPE */
+
+/* Define if you don't want to include right-left support. */
+/* #undef DISABLE_RIGHTLEFT */
+
+/* Define if you don't want to include Arabic support. */
+/* #undef DISABLE_ARABIC */
+
+/* Define if you want to always define a server name at vim startup. */
+/* #undef FEAT_AUTOSERVERNAME */
+
+/* Define if you want to include fontset support. */
+/* #undef FEAT_XFONTSET */
+
+/* Define if you want to include XIM support. */
+/* #undef FEAT_XIM */
+
+/* Define if you want to include Hangul input support. */
+/* #undef FEAT_HANGULIN */
+
+/* Define if you use GTK and want GNOME support. */
+/* #undef FEAT_GUI_GNOME */
+
+/* Define if you use KDE and want KDE Toolbar support. */
+/* #undef FEAT_KDETOOLBAR */
+
+/* Define if your X has own locale library */
+/* #undef X_LOCALE */
+
+/* Define if we have dlfcn.h. */
+#define HAVE_DLFCN_H 1
+
+/* Define if there is a working gettext(). */
+#define HAVE_GETTEXT 1
+
+/* Define if _nl_msg_cat_cntr is present. */
+/* #undef HAVE_NL_MSG_CAT_CNTR */
+
+/* Define if we have dlopen() */
+#define HAVE_DLOPEN 1
+
+/* Define if we have dlsym() */
+#define HAVE_DLSYM 1
+
+/* Define if we have dl.h. */
+/* #undef HAVE_DL_H */
+
+/* Define if we have shl_load() */
+/* #undef HAVE_SHL_LOAD */
+
+/* Define if you want to include NetBeans integration. */
+/* #undef FEAT_NETBEANS_INTG */
+
+/* Define if you want to include process communication. */
+#define FEAT_JOB_CHANNEL 1
+
+/* Define if you want to include terminal emulator support. */
+/* #undef FEAT_TERMINAL */
+
+// Define default global runtime path.
+/* #undef RUNTIME_GLOBAL */
+
+// Define default global runtime after path.
+/* #undef RUNTIME_GLOBAL_AFTER */
+
+/* Define name of who modified a released Vim */
+/* #undef MODIFIED_BY */
+
+/* Define if you want XSMP interaction as well as vanilla swapfile safety */
+#define USE_XSMP_INTERACT 1
+
+/* Define if fcntl()'s F_SETFD command knows about FD_CLOEXEC */
+#define HAVE_FD_CLOEXEC 1
+
+/* Define if /proc/self/exe or similar can be read */
+#define PROC_EXE_LINK "/proc/self/exe"
+
+/* Define if you want Cygwin to use the WIN32 clipboard, not compatible with X11*/
+/* #undef FEAT_CYGWIN_WIN32_CLIPBOARD */
+
+/* Define if we have AvailabilityMacros.h on Mac OS X */
+/* #undef HAVE_AVAILABILITYMACROS_H */
+
+/* Define if Xutf8SetWMProperties() is in an X library. */
+/* #undef HAVE_XUTF8SETWMPROPERTIES */
+
+/* Define if GResource is used to load icons */
+/* #undef USE_GRESOURCE */
+
+/* Define if GTK+ GUI is to be linked against GTK+ 3 */
+/* #undef USE_GTK3 */
+
+/* Define if we have isinf() */
+#define HAVE_ISINF 1
+
+/* Define if we have isnan() */
+#define HAVE_ISNAN 1
+
+/* Define to inline symbol or empty */
+/* #undef inline */
diff --git a/src/auto/config.mk b/src/auto/config.mk
new file mode 100644
index 0000000..32652fd
--- /dev/null
+++ b/src/auto/config.mk
@@ -0,0 +1,179 @@
+#
+# config.mk.in -- autoconf template for Vim on Unix vim:ts=8:sw=8:
+#
+# DO NOT EDIT config.mk!! It will be overwritten by configure.
+# Edit Makefile and run "make" or run ./configure with other arguments.
+#
+# Configure does not edit the makefile directly. This method is not the
+# standard use of GNU autoconf, but it has two advantages:
+# a) The user can override every choice made by configure.
+# b) Modifications to the makefile are not lost when configure is run.
+#
+# I hope this is worth being nonstandard. jw.
+
+
+
+VIMNAME = vim
+EXNAME = ex
+VIEWNAME = view
+
+CC = gcc
+DEFS = -DHAVE_CONFIG_H
+CFLAGS = -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
+CPPFLAGS =
+srcdir = .
+
+LDFLAGS = -L/usr/local/lib -Wl,--as-needed
+LIBS = -lm -lncurses -lelf -lnsl -lacl -lattr -lgpm -ldl
+TAGPRG = ctags -I INIT+ --fields=+S
+
+CPP = gcc -E
+CPP_MM = M
+DEPEND_CFLAGS_FILTER = | sed 's+-I */+-isystem /+g'
+LINK_AS_NEEDED = yes
+X_CFLAGS =
+X_LIBS_DIR =
+X_PRE_LIBS =
+X_EXTRA_LIBS =
+X_LIBS =
+
+LUA_LIBS =
+LUA_SRC =
+LUA_OBJ =
+LUA_CFLAGS =
+LUA_PRO =
+
+MZSCHEME_LIBS =
+MZSCHEME_SRC =
+MZSCHEME_OBJ =
+MZSCHEME_CFLAGS =
+MZSCHEME_PRO =
+MZSCHEME_EXTRA =
+MZSCHEME_MZC =
+
+PERL =
+PERLLIB =
+PERL_XSUBPP =
+PERL_LIBS =
+SHRPENV =
+PERL_SRC =
+PERL_OBJ =
+PERL_PRO =
+PERL_CFLAGS =
+
+PYTHON_SRC =
+PYTHON_OBJ =
+PYTHON_CFLAGS =
+PYTHON_LIBS =
+PYTHON_CONFDIR =
+PYTHON_GETPATH_CFLAGS =
+
+PYTHON3_SRC =
+PYTHON3_OBJ =
+PYTHON3_CFLAGS =
+PYTHON3_LIBS =
+PYTHON3_CONFDIR =
+
+TCL =
+TCL_SRC =
+TCL_OBJ =
+TCL_PRO =
+TCL_CFLAGS =
+TCL_LIBS =
+
+HANGULIN_SRC =
+HANGULIN_OBJ =
+
+WORKSHOP_SRC =
+WORKSHOP_OBJ =
+
+NETBEANS_SRC = netbeans.c
+NETBEANS_OBJ = objects/netbeans.o
+CHANNEL_SRC = channel.c
+CHANNEL_OBJ = objects/channel.o
+
+RUBY =
+RUBY_SRC =
+RUBY_OBJ =
+RUBY_PRO =
+RUBY_CFLAGS =
+RUBY_LIBS =
+
+AWK = gawk
+
+STRIP = strip
+
+EXEEXT =
+CROSS_COMPILING =
+
+COMPILEDBY =
+
+INSTALLVIMDIFF = installvimdiff
+INSTALLGVIMDIFF = installgvimdiff
+INSTALL_LANGS = install-languages
+INSTALL_TOOL_LANGS = install-tool-languages
+
+### sed command to fix quotes while creating pathdef.c
+QUOTESED = sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$$/";/'
+
+### Line break character as octal number for "tr"
+NL = "\\012"
+
+### Top directory for everything
+prefix = /usr/local
+
+### Top directory for the binary
+exec_prefix = ${prefix}
+
+### Prefix for location of data files
+BINDIR = ${exec_prefix}/bin
+
+### For autoconf 2.60 and later (avoid a warning)
+datarootdir = ${prefix}/share
+
+### Prefix for location of data files
+DATADIR = ${datarootdir}
+
+### Prefix for location of man pages
+MANDIR = ${datarootdir}/man
+
+### Do we have a GUI
+GUI_INC_LOC =
+GUI_LIB_LOC =
+GUI_SRC = $(NONE_SRC)
+GUI_OBJ = $(NONE_OBJ)
+GUI_DEFS = $(NONE_DEFS)
+GUI_IPATH = $(NONE_IPATH)
+GUI_LIBS_DIR = $(NONE_LIBS_DIR)
+GUI_LIBS1 = $(NONE_LIBS1)
+GUI_LIBS2 = $(NONE_LIBS2)
+GUI_INSTALL = $(NONE_INSTALL)
+GUI_TARGETS = $(NONE_TARGETS)
+GUI_MAN_TARGETS = $(NONE_MAN_TARGETS)
+GUI_TESTTARGET = $(NONE_TESTTARGET)
+GUI_TESTARG = $(NONE_TESTARG)
+GUI_BUNDLE = $(NONE_BUNDLE)
+NARROW_PROTO =
+GUI_X_LIBS =
+MOTIF_LIBNAME =
+GTK_LIBNAME =
+
+GLIB_COMPILE_RESOURCES =
+GRESOURCE_SRC =
+GRESOURCE_OBJ =
+
+GTK_UPDATE_ICON_CACHE =
+UPDATE_DESKTOP_DATABASE =
+
+### Any OS dependent extra source and object file
+OS_EXTRA_SRC =
+OS_EXTRA_OBJ =
+
+### If the *.po files are to be translated to *.mo files.
+MAKEMO = yes
+
+MSGFMT = msgfmt
+
+# Make sure that "make first" will run "make all" once configure has done its
+# work. This is needed when using the Makefile in the top directory.
+first: all
diff --git a/src/auto/osdef.h b/src/auto/osdef.h
new file mode 100644
index 0000000..0d21011
--- /dev/null
+++ b/src/auto/osdef.h
@@ -0,0 +1,136 @@
+/*
+ * osdef.h is automagically created from osdef?.h.in by osdef.sh -- DO NOT EDIT
+ */
+/* autoconf cannot fiddle out declarations. Use our homebrewn tools. (jw) */
+/*
+ * Declarations that may cause conflicts belong here so that osdef.sh
+ * can clean out the forest. Everything else belongs in os_unix.h
+ *
+ * How this works:
+ * - This file contains all unix prototypes that Vim might need.
+ * - The shell script osdef.sh is executed at compile time to remove all the
+ * prototypes that are in an include file. This results in osdef.h.
+ * - osdef.h is included in vim.h.
+ *
+ * sed cannot always handle so many commands, this is file 1 of 2
+ */
+
+#ifndef fopen /* could be redefined to fopen64() */
+#endif
+#ifdef HAVE_FSEEKO
+#endif
+#ifdef HAVE_FSEEKO
+#endif
+#ifndef ferror /* let me say it again: "macros should never have prototypes" */
+#endif
+#if defined(sun) || defined(_SEQUENT_)
+/* used inside of stdio macros getc(), puts(), putchar()... */
+extern int _flsbuf(int, FILE *);
+extern int _filbuf(FILE *);
+#endif
+
+#if !defined(HAVE_SELECT)
+struct pollfd; /* for poll() */
+extern int poll(struct pollfd *, long, int);
+#endif
+
+#ifdef HAVE_MEMSET
+#endif
+#ifdef HAVE_BCMP
+#endif
+#ifdef HAVE_MEMCMP
+#endif
+#ifdef HAVE_STRPBRK
+#endif
+#ifdef USEBCOPY
+#else
+# ifdef USEMEMCPY
+# else
+# ifdef USEMEMMOVE
+# endif
+# endif
+#endif
+/* used inside of FD_ZERO macro: */
+#ifdef HAVE_SETSID
+#endif
+#ifdef HAVE_SETPGID
+#endif
+#ifdef HAVE_STRTOL
+#endif
+#ifdef HAVE_STRFTIME
+#endif
+#ifdef HAVE_STRCASECMP
+#endif
+#ifdef HAVE_STRNCASECMP
+#endif
+#ifndef strdup
+#endif
+
+#ifndef USE_SYSTEM
+# ifndef __TANDEM
+# endif
+#endif
+
+
+#ifdef HAVE_SIGSET
+extern RETSIGTYPE (*sigset(int, RETSIGTYPE (*func) SIGPROTOARG)) SIGPROTOARG;
+#endif
+
+#if defined(HAVE_SETJMP_H)
+# ifdef HAVE_SIGSETJMP
+extern int sigsetjmp(sigjmp_buf, int);
+# else
+# endif
+#endif
+
+
+#ifndef __TANDEM
+#endif
+#if defined(HAVE_GETCWD) && !defined(sun) && !defined(__TANDEM)
+#else
+#endif
+#ifndef __alpha /* suggested by Campbell */
+#endif
+/*
+ * osdef2.h.in - See osdef1.h.in for a description.
+ */
+
+
+#ifndef __TANDEM
+#endif
+
+#ifndef __TANDEM
+#endif
+#ifndef __TANDEM
+#endif
+#ifndef stat /* could be redefined to stat64() */
+#endif
+#ifndef lstat /* could be redefined to lstat64() */
+#endif
+#ifndef __TANDEM
+#endif
+
+
+
+#ifdef HAVE_TERMIOS_H
+#endif
+
+#ifdef HAVE_SYS_STATFS_H
+#endif
+
+#ifdef HAVE_GETTIMEOFDAY
+#endif
+
+#ifdef HAVE_GETPWNAM
+#endif
+
+#ifdef USE_TMPNAM
+#else
+#endif
+
+#ifdef ISC
+extern int _Xmblen(char const *, size_t);
+#else
+ /* This is different from the header but matches mblen() */
+extern int _Xmblen(char *, size_t);
+#endif
diff --git a/src/auto/pathdef.c b/src/auto/pathdef.c
new file mode 100644
index 0000000..2057237
--- /dev/null
+++ b/src/auto/pathdef.c
@@ -0,0 +1,10 @@
+/* pathdef.c */
+/* This file is automatically created by Makefile
+ * DO NOT EDIT! Change Makefile only. */
+#include "vim.h"
+char_u *default_vim_dir = (char_u *)"/system_ext/usr/share/vim";
+char_u *default_vimruntime_dir = (char_u *)"/system_ext/usr/share/vim";
+char_u *all_cflags = (char_u *)"gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 ";
+char_u *all_lflags = (char_u *)"gcc -L/system/lib -o vim -lm -lselinux ";
+char_u *compiled_user = (char_u *)"android";
+char_u *compiled_sys = (char_u *)"android";
diff --git a/vimrc.android b/vimrc.android
new file mode 100644
index 0000000..9589475
--- /dev/null
+++ b/vimrc.android
@@ -0,0 +1,114 @@
+" vimrc default android config file
+"
+" Adapted for Android by tpruvot@github
+" Last change: 2014 Jul 22 (UTF-8)
+
+" When started as "evim", evim.vim will already have done these settings.
+if v:progname =~? "evim"
+ finish
+endif
+
+" Use Vim settings, rather than Vi settings (much better!).
+" This must be first, because it changes other options as a side effect.
+set nocompatible
+
+" allow backspacing over everything in insert mode
+set backspace=indent,eol,start
+
+" Disable modeline parsing for security reasons
+set nomodeline
+
+" swap directories
+set directory=.,/data/local/tmp,/tmp
+
+if has("vms")
+ set nobackup " do not keep a backup file, use versions instead
+else
+" set backup " keep a backup file (restore to previous version)
+ set undofile " keep an undo file (undo changes after closing)
+endif
+set history=50 " keep 50 lines of command line history
+set ruler " show the cursor position all the time
+set showcmd " display incomplete commands
+set incsearch " do incremental searching
+
+set viminfo="NONE"
+
+" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
+" let &guioptions = substitute(&guioptions, "t", "", "g")
+
+" Don't use Ex mode, use Q for formatting
+map Q gq
+
+" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo,
+" so that you can undo CTRL-U after inserting a line break.
+inoremap <C-U> <C-G>u<C-U>
+
+" In many terminal emulators the mouse works just fine, thus enable it.
+if has('mouse')
+ set mouse=a
+endif
+
+" Switch syntax highlighting on, when the terminal has colors
+" Also switch on highlighting the last used search pattern.
+if &t_Co > 2 || has("gui_running")
+ syntax on
+ set hlsearch
+endif
+
+" Only do this part when compiled with support for autocommands.
+if has("autocmd")
+
+ " Enable file type detection.
+ " Use the default filetype settings, so that mail gets 'tw' set to 72,
+ " 'cindent' is on in C files, etc.
+ " Also load indent files, to automatically do language-dependent indenting.
+ filetype plugin indent on
+
+ " Put these in an autocmd group, so that we can delete them easily.
+ augroup vimrcEx
+ au!
+
+ " For all text files set 'textwidth' to 78 characters.
+ autocmd FileType text setlocal textwidth=78
+
+ " When editing a file, always jump to the last known cursor position.
+ " Don't do it when the position is invalid or when inside an event handler
+ " (happens when dropping a file on gvim).
+ " Also don't do it when the mark is in the first line, that is the default
+ " position when opening a file.
+ autocmd BufReadPost *
+ \ if line("'\"") > 1 && line("'\"") <= line("$") |
+ \ exe "normal! g`\"" |
+ \ endif
+
+ augroup END
+
+else
+
+ set autoindent " always set autoindenting on
+
+endif " has("autocmd")
+
+" UTF-8 support
+if has("multi_byte")
+ if &termencoding == ""
+ let &termencoding = "utf-8"
+ endif
+ set encoding=utf-8
+ setglobal fileencoding=utf-8
+ " setglobal bomb " Do not force BOM headers
+ set fileencodings=ucs-bom,utf-8,latin1
+endif
+
+if has("syntax")
+ source /system_ext/usr/share/vim/autoload/spacehi.vim
+endif
+
+" Convenient command to see the difference between the current buffer and the
+" file it was loaded from, thus the changes you made.
+" Only define it when not defined already.
+if !exists(":DiffOrig")
+ command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
+ \ | wincmd p | diffthis
+endif