You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
133 lines
2.3 KiB
VimL
133 lines
2.3 KiB
VimL
4 years ago
|
if has('syntax') && !exists('g:syntax_on')
|
||
|
syntax enable
|
||
|
endif
|
||
4 years ago
|
|
||
4 years ago
|
if has('autocmd')
|
||
|
filetype plugin on
|
||
|
filetype indent on
|
||
|
endif
|
||
|
|
||
4 years ago
|
" Tabs
|
||
|
set complete-=i
|
||
4 years ago
|
set autoindent
|
||
|
set backspace=indent,eol,start
|
||
|
set smarttab
|
||
4 years ago
|
set noexpandtab
|
||
|
set shiftwidth=4
|
||
|
set softtabstop=4
|
||
|
set tabstop=4
|
||
4 years ago
|
|
||
|
set nrformats-=octal
|
||
|
|
||
|
if !has('nvim') && &ttimeoutlen == -1
|
||
|
set ttimeout
|
||
|
set ttimeoutlen=100
|
||
|
endif
|
||
|
|
||
|
set incsearch
|
||
|
" Use <C-L> to clear the highlighting of :set hlsearch.
|
||
|
if maparg('<C-L>', 'n') ==# ''
|
||
|
nnoremap <silent> <C-L> :nohlsearch<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>
|
||
|
endif
|
||
|
|
||
|
set laststatus=2
|
||
|
set ruler
|
||
|
set wildmenu
|
||
|
|
||
|
" Status
|
||
|
" ~/file [type] [line,column] [number of lines]
|
||
4 years ago
|
"set statusline=%F%m%r%h%w\ [%Y]\ [%03l,%03v]\ [%L]
|
||
4 years ago
|
|
||
|
if !&scrolloff
|
||
|
set scrolloff=1
|
||
|
endif
|
||
|
if !&sidescrolloff
|
||
|
set sidescrolloff=5
|
||
|
endif
|
||
|
set display+=lastline
|
||
|
|
||
|
if &encoding ==# 'latin1' && has('gui_running')
|
||
|
set encoding=utf-8
|
||
|
endif
|
||
|
|
||
|
if &listchars ==# 'eol:$'
|
||
4 years ago
|
set listchars=tab:\⇥\ ,trail:…,extends:→,precedes:←,nbsp:+
|
||
4 years ago
|
endif
|
||
|
|
||
|
if v:version > 703 || v:version == 703 && has("patch541")
|
||
|
set formatoptions+=j " Delete comment character when joining commented lines
|
||
|
endif
|
||
|
|
||
|
if has('path_extra')
|
||
|
setglobal tags-=./tags tags-=./tags; tags^=./tags;
|
||
|
endif
|
||
|
|
||
|
set autoread
|
||
|
|
||
|
if &history < 10000
|
||
|
set history=10000
|
||
|
endif
|
||
|
if &tabpagemax < 50
|
||
|
set tabpagemax=50
|
||
|
endif
|
||
|
if !empty(&viminfo)
|
||
|
set viminfo^=!
|
||
|
endif
|
||
|
set sessionoptions-=options
|
||
|
set viewoptions-=options
|
||
|
|
||
|
if empty(mapcheck('<C-U>', 'i'))
|
||
|
inoremap <C-U> <C-G>u<C-U>
|
||
|
endif
|
||
|
|
||
|
if empty(mapcheck('<C-W>', 'i'))
|
||
|
inoremap <C-W> <C-G>u<C-W>
|
||
|
endif
|
||
4 years ago
|
|
||
|
" Basics
|
||
4 years ago
|
set encoding=utf-8
|
||
4 years ago
|
|
||
|
" General
|
||
4 years ago
|
" setlocal spell spelllang=en_us
|
||
4 years ago
|
set fileformats=unix,dos,mac
|
||
|
set nostartofline
|
||
|
set autochdir
|
||
4 years ago
|
set colorcolumn=81
|
||
|
|
||
|
" Have tab complete work more like bash
|
||
|
set wildmode=list:longest
|
||
|
set whichwrap+=<,>,[,]
|
||
4 years ago
|
set magic
|
||
4 years ago
|
|
||
|
" Turn on omni completion. Must have `filetype plugin on` to use.
|
||
|
" To use, in insert mode press ctrl+x ctrl+o
|
||
|
set omnifunc=syntaxcomplete#Complete
|
||
4 years ago
|
set completeopt=menu,longest,preview
|
||
4 years ago
|
|
||
|
" Indent
|
||
4 years ago
|
set smartindent
|
||
|
set copyindent
|
||
|
set preserveindent
|
||
|
set shiftround
|
||
|
|
||
|
" Text Formatting/Layout
|
||
|
set nowrap
|
||
|
set ignorecase
|
||
|
set smartcase
|
||
|
set list
|
||
4 years ago
|
|
||
|
" UI
|
||
4 years ago
|
set showcmd
|
||
|
set number relativenumber
|
||
|
set numberwidth=4
|
||
|
set hidden
|
||
4 years ago
|
|
||
4 years ago
|
" Cues
|
||
|
set showmatch
|
||
|
set matchtime=2
|
||
|
set hlsearch
|
||
4 years ago
|
set noerrorbells
|
||
|
set novisualbell
|
||
|
set t_vb=
|
||
4 years ago
|
set timeoutlen=500
|