From 76ebf815bf55374812688f7c2fa18ad8c3ba8e34 Mon Sep 17 00:00:00 2001 From: Shayne Holmes Date: Fri, 22 Mar 2019 08:05:53 -0700 Subject: [PATCH 1/5] vim: Update sensible.vim --- packages/vim/vimrc | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/packages/vim/vimrc b/packages/vim/vimrc index 45d68a236..33fa59574 100644 --- a/packages/vim/vimrc +++ b/packages/vim/vimrc @@ -10,13 +10,22 @@ set mouse=a " sensible.vim - Defaults everyone can agree on " Maintainer: Tim Pope -" Version: 1.1 +" Version: 1.2 -set nocompatible -let g:loaded_sensible = 1 +if exists('g:loaded_sensible') || &compatible + finish +else + let g:loaded_sensible = 'yes' +endif -filetype plugin indent on -syntax enable +if has('autocmd') + filetype plugin indent on +endif +if has('syntax') && !exists('g:syntax_on') + syntax enable +endif + +" Use :help 'option' to see the documentation for the given option. set autoindent set backspace=indent,eol,start @@ -25,8 +34,10 @@ set smarttab set nrformats-=octal -set ttimeout -set ttimeoutlen=100 +if !has('nvim') && &ttimeoutlen == -1 + set ttimeout + set ttimeoutlen=100 +endif set incsearch " Use to clear the highlighting of :set hlsearch. @@ -46,7 +57,9 @@ if !&sidescrolloff endif set display+=lastline -set encoding=utf-8 +if &encoding ==# 'latin1' && has('gui_running') + set encoding=utf-8 +endif if &listchars ==# 'eol:$' set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+ @@ -60,6 +73,10 @@ if has('path_extra') setglobal tags-=./tags tags-=./tags; tags^=./tags; endif +if &shell =~# 'fish$' && (v:version < 704 || v:version == 704 && !has('patch276')) + set shell=/usr/bin/env\ bash +endif + set autoread if &history < 1000 @@ -84,3 +101,5 @@ if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# '' endif inoremap u + +" vim:set ft=vim et sw=2: From 55a96a1b4ca57c04806c216a582a9b32fafeae64 Mon Sep 17 00:00:00 2001 From: Shayne Holmes Date: Fri, 22 Mar 2019 08:13:18 -0700 Subject: [PATCH 2/5] vim: Fix scroll mappings The included `vimrc` file sets mappings for and , so that scrolling is smooth. Unfortunately, 'compatible' is set by default [0], so the `<>` notation used for those mappings isn't enabled. Instead of the key `` being mapped, the mapping is actually from the typed string "". [0]: `:help compatible-default` explains that vim will turn the 'compatible' option off when "a user vimrc is found", or under various other conditions (note that the system-wide vimrc doesn't count [1]), but even in the case where a user vimrc exists, this system-wide vimrc is executed before that happens. [1]: From `:help compatible-default`: Note that this does NOT happen when a system-wide vimrc file was found. --- packages/vim/vimrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/vim/vimrc b/packages/vim/vimrc index 33fa59574..7cb8378bd 100644 --- a/packages/vim/vimrc +++ b/packages/vim/vimrc @@ -1,3 +1,6 @@ +" Ensure that <> notation works for the mappings that follow +set nocompatible + " Scroll only one line for mouse wheel events to get smooth scrolling on touch screens map imap From ba909c23e63d3ef58b086bdaa10f8144d1b4d3fd Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Sat, 13 Apr 2019 18:24:01 +0300 Subject: [PATCH 3/5] vim: bump revision --- packages/vim/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/vim/build.sh b/packages/vim/build.sh index 091a86d0f..b83cb3450 100644 --- a/packages/vim/build.sh +++ b/packages/vim/build.sh @@ -6,6 +6,7 @@ TERMUX_PKG_RECOMMENDS="diffutils" # vim should only be updated every 50 releases on multiples of 50. # Update both vim and vim-python to the same version in one PR. TERMUX_PKG_VERSION=8.1.1100 +TERMUX_PKG_REVISION=1 TERMUX_PKG_SHA256=d7f59c2a0a16983d71f0bb27560356fd1602134037abdecd90e4280f3cafa8e3 TERMUX_PKG_SRCURL="https://github.com/vim/vim/archive/v${TERMUX_PKG_VERSION}.tar.gz" TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" From a8dc007e173516c4b8718e0d272e6403be42a0e6 Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Sat, 13 Apr 2019 18:25:40 +0300 Subject: [PATCH 4/5] vim-python: apply changes to vimrc from package 'vim' --- packages/vim-python/build.sh | 1 + packages/vim-python/vimrc | 38 ++++++++++++++++++++++++++++-------- 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/packages/vim-python/build.sh b/packages/vim-python/build.sh index 56425e2d3..436e09793 100644 --- a/packages/vim-python/build.sh +++ b/packages/vim-python/build.sh @@ -6,6 +6,7 @@ TERMUX_PKG_RECOMMENDS="diffutils" # vim should only be updated every 50 releases on multiples of 50. # Update both vim and vim-python to the same version in one PR. TERMUX_PKG_VERSION=8.1.1100 +TERMUX_PKG_REVISION=1 TERMUX_PKG_SHA256=d7f59c2a0a16983d71f0bb27560356fd1602134037abdecd90e4280f3cafa8e3 TERMUX_PKG_SRCURL="https://github.com/vim/vim/archive/v${TERMUX_PKG_VERSION}.tar.gz" TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" diff --git a/packages/vim-python/vimrc b/packages/vim-python/vimrc index 45d68a236..7cb8378bd 100644 --- a/packages/vim-python/vimrc +++ b/packages/vim-python/vimrc @@ -1,3 +1,6 @@ +" Ensure that <> notation works for the mappings that follow +set nocompatible + " Scroll only one line for mouse wheel events to get smooth scrolling on touch screens map imap @@ -10,13 +13,22 @@ set mouse=a " sensible.vim - Defaults everyone can agree on " Maintainer: Tim Pope -" Version: 1.1 +" Version: 1.2 -set nocompatible -let g:loaded_sensible = 1 +if exists('g:loaded_sensible') || &compatible + finish +else + let g:loaded_sensible = 'yes' +endif + +if has('autocmd') + filetype plugin indent on +endif +if has('syntax') && !exists('g:syntax_on') + syntax enable +endif -filetype plugin indent on -syntax enable +" Use :help 'option' to see the documentation for the given option. set autoindent set backspace=indent,eol,start @@ -25,8 +37,10 @@ set smarttab set nrformats-=octal -set ttimeout -set ttimeoutlen=100 +if !has('nvim') && &ttimeoutlen == -1 + set ttimeout + set ttimeoutlen=100 +endif set incsearch " Use to clear the highlighting of :set hlsearch. @@ -46,7 +60,9 @@ if !&sidescrolloff endif set display+=lastline -set encoding=utf-8 +if &encoding ==# 'latin1' && has('gui_running') + set encoding=utf-8 +endif if &listchars ==# 'eol:$' set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+ @@ -60,6 +76,10 @@ if has('path_extra') setglobal tags-=./tags tags-=./tags; tags^=./tags; endif +if &shell =~# 'fish$' && (v:version < 704 || v:version == 704 && !has('patch276')) + set shell=/usr/bin/env\ bash +endif + set autoread if &history < 1000 @@ -84,3 +104,5 @@ if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# '' endif inoremap u + +" vim:set ft=vim et sw=2: From b343f33212a634e7c17528f8ce70f6d7563b36e5 Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Sat, 13 Apr 2019 18:27:01 +0300 Subject: [PATCH 5/5] vim, vim-python: replace /usr/bin with /data/data/com.termux/files/usr/bin in vimrc files --- packages/vim-python/vimrc | 2 +- packages/vim/vimrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vim-python/vimrc b/packages/vim-python/vimrc index 7cb8378bd..9ffc57c51 100644 --- a/packages/vim-python/vimrc +++ b/packages/vim-python/vimrc @@ -77,7 +77,7 @@ if has('path_extra') endif if &shell =~# 'fish$' && (v:version < 704 || v:version == 704 && !has('patch276')) - set shell=/usr/bin/env\ bash + set shell=/data/data/com.termux/files/usr/bin/env\ bash endif set autoread diff --git a/packages/vim/vimrc b/packages/vim/vimrc index 7cb8378bd..9ffc57c51 100644 --- a/packages/vim/vimrc +++ b/packages/vim/vimrc @@ -77,7 +77,7 @@ if has('path_extra') endif if &shell =~# 'fish$' && (v:version < 704 || v:version == 704 && !has('patch276')) - set shell=/usr/bin/env\ bash + set shell=/data/data/com.termux/files/usr/bin/env\ bash endif set autoread