vim: Update from 8.0.0503 to 8.0.0542
[termux-packages] / packages / vim / vimrc
1 " Scroll only one line for mouse wheel events to get smooth scrolling on touch screens
2 map <ScrollWheelUp> <C-Y>
3 imap <ScrollWheelUp> <C-X><C-Y>
4 map <ScrollWheelDown> <C-E>
5 imap <ScrollWheelDown> <C-X><C-E>
6
7 " sensible.vim - Defaults everyone can agree on
8 " Maintainer: Tim Pope <http://tpo.pe/>
9 " Version: 1.1
10
11 set nocompatible
12 let g:loaded_sensible = 1
13
14 filetype plugin indent on
15 syntax enable
16
17 set autoindent
18 set backspace=indent,eol,start
19 set complete-=i
20 set smarttab
21
22 set nrformats-=octal
23
24 set ttimeout
25 set ttimeoutlen=100
26
27 set incsearch
28 " Use <C-L> to clear the highlighting of :set hlsearch.
29 if maparg('<C-L>', 'n') ==# ''
30 nnoremap <silent> <C-L> :nohlsearch<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>
31 endif
32
33 set laststatus=2
34 set ruler
35 set wildmenu
36
37 if !&scrolloff
38 set scrolloff=1
39 endif
40 if !&sidescrolloff
41 set sidescrolloff=5
42 endif
43 set display+=lastline
44
45 if &encoding ==# 'latin1' && has('gui_running')
46 set encoding=utf-8
47 endif
48
49 if &listchars ==# 'eol:$'
50 set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
51 endif
52
53 if v:version > 703 || v:version == 703 && has("patch541")
54 set formatoptions+=j " Delete comment character when joining commented lines
55 endif
56
57 if has('path_extra')
58 setglobal tags-=./tags tags-=./tags; tags^=./tags;
59 endif
60
61 set autoread
62
63 if &history < 1000
64 set history=1000
65 endif
66 if &tabpagemax < 50
67 set tabpagemax=50
68 endif
69 if !empty(&viminfo)
70 set viminfo^=!
71 endif
72 set sessionoptions-=options
73
74 " Allow color schemes to do bright colors without forcing bold.
75 if &t_Co == 8 && $TERM !~# '^linux\|^Eterm'
76 set t_Co=16
77 endif
78
79 " Load matchit.vim, but only if the user hasn't installed a newer version.
80 if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# ''
81 runtime! macros/matchit.vim
82 endif
83
84 inoremap <C-U> <C-G>u<C-U>