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