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