.vimrc: +<Esc>s: wdiff
[nethome.git] / .vimrc
diff --git a/.vimrc b/.vimrc
index 782bf04..fad69ee 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -73,6 +73,7 @@ let g:netrw_home = $HOME
 if &term=="xterm" || &term=="xterm-256color"
        set t_Co=8
 endif
+set mouse=
 
 " FIXME: Learn how to do :tag instead of :tselect with :cstag (used by :tag and CTRL-] if set cst)
 set nocst
@@ -85,10 +86,12 @@ noremap <Esc>: @:
 noremap <C-n> :next<cr>zz<C-g>
 noremap <C-p> :prev<cr>zz<C-g>
 noremap <Esc>N :tn<cr>zz<C-g>
-if $ANDROID_DATA!=#"/data" && $SSH_CLIENT!~"^2a02:2b88:2:1::3b57:[89]f "
-  " It auto-types random data after starting it from Termux
-  noremap <Esc>P :tp<cr>zz<C-g>
-endif
+noremap <Esc>P :tp<cr>zz<C-g>
+"<Esc>P would auto-type random data after starting it on recent distros or Termux.
+"read(0, "\33P1$r0 q\33\\\33[?12;4$y", 4096) = 19
+noremap <Esc>P$r0<Space>q <Nop>
+" Termux types <F11>
+noremap! <Esc>[23~ <Nop>
 noremap <Esc>M :cn<cr>zz<C-g>
 noremap <Esc>L :cp<cr>zz<C-g>
 noremap <Esc>f "myiw:grep<Space>-Ew<Space>'<C-r>m'<Space>`git ls-files`
@@ -99,6 +102,7 @@ noremap <C-d> G:r !date '+\%H:\%M:\%S-'<cr>kA
 noremap <Esc>d :set hlsearch<cr>/^[+-]\([^+-].*\\|\)$<cr>
 noremap <Esc>D :set hlsearch<cr>/^[+-][+-]\([^+-].*\\|\)$<cr>
 noremap <Esc>w 0i <Esc>/[^ ]<cr>vf.h"kyf./[^ ]<cr>vf.h"ly0x:r !date -d "`date '+\%Y'`-<C-r>l-<C-r>k" '+\%u'<cr>yypkV:!tr '1234567' 'PUSCPSN'<cr>jV:!tr '1234567' 'otttaoe'<cr>kJxv0xk0llllllplxxjddk0
+noremap <Esc>s :syntax on<cr>:set syntax=wdiff<cr>
 noremap * :let ic_save=&ic<cr>:set noic<cr>*:let &ic=ic_save<cr>
 noremap # :let ic_save=&ic<cr>:set noic<cr>#:let &ic=ic_save<cr>
 noremap <C-k> :w<cr>:!aspell --check '%'<cr>:e<cr>