This repository has been archived by the owner on Jun 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
/
basic.vim
104 lines (89 loc) · 2.6 KB
/
basic.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
" ----------------------------------------
" Regular Vim Configuration (No Plugins Needed)
" ----------------------------------------
" Config {{{
if has('persistent_undo')
set undofile
set undodir=~/.vim/.undo
endif
" We rely on bash for some things, make sure we use that for shelling out
set shell=/bin/bash
" Prevent netrw buffers from being set as alternate
let g:netrw_altfile = 1
" }}}
" Backups {{{
set swapfile " Keep swapfiles
set directory=~/.vim-tmp,~/tmp,/var/tmp,/tmp
set backupdir=~/.vim-tmp,~/tmp,/var/tmp,/tmp
" }}}
" UI {{{
set number " Line numbers on
set nowrap " Line wrapping off
set cmdheight=1 " Make the command area two lines high
set noshowmode " don't need to show mode since we have airline
set numberwidth=4
set encoding=utf-8
set guioptions=cg
set guicursor=n-v-c:block-Cursor-blinkon0,ve:ver35-Cursor,o:hor50-Cursor,i-ci:ver25-Cursor,r-cr:hor20-Cursor,sm:block-Cursor-blinkwait175-blinkoff150-blinkon175
if !has('nvim')
set ttyfast
endi
set lazyredraw
if !has('nvim')
if has('mouse_sgr')
set ttymouse=sgr
else
set ttymouse=xterm2
end
end
" }}}
" Behaviors {{{
filetype plugin indent on " Automatically detect file types. (must turn on after Vundle)
set wildmode=list:longest " use emacs-style tab completion when selecting files, etc
set hidden " Change buffer - without saving
set autowriteall " Writes on make/shell commands
set foldlevelstart=99
set formatoptions=crql
set iskeyword+=$,@,- " Add extra characters that are valid parts of variables
set tags=./tags;/,tags;/
set splitright
if v:version >= 704
set completeopt=menu,noinsert,noselect
endif
set viewoptions=cursor,folds,slash,unix
set scrolloff=5
" }}}
" Security {{{
set nomodeline
" }}}
" Text Format {{{
set tabstop=2
set shiftwidth=2 " Tabs under smart indent
set expandtab
" }}}
" Searching {{{
set ignorecase
set smartcase " Non-case sensitive search
set hlsearch
set wildignore+=.final_builds/*,*/node_modules/*,*.o,*.obj,*.exe,*.so,*.dll,*.pyc,.svn,.hg,.bzr,.git,.sass-cache,*.class,*.scssc,*/Godeps/*
if executable('rg')
set grepprg=rg\ --vimgrep
elseif executable('ag')
set grepprg=ag\ --nogroup\ --column\ --smart-case\ --nocolor\ --follow
set grepformat=%f:%l:%c:%m
elseif executable('ack')
set grepprg=ack\ --nogroup\ --column\ --smart-case\ --nocolor\ --follow\ $*
set grepformat=%f:%l:%c:%m
endif
" }}}
" Visual {{{
set noshowmatch " Disable jumping to matching bracket when typing
" }}}
" Sounds {{{
set noerrorbells
set novisualbell
" }}}
" Mouse {{{
set mousehide " Hide mouse after chars typed
set mouse=a " Mouse in all modes
" }}}