-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
139 lines (117 loc) · 3.22 KB
/
.vimrc
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
set autoindent
set backspace=indent,eol,start
set backup
set backupcopy=yes
set backupext=.bak
set belloff=all
set browsedir=current
set cmdheight=1
set cmdwinheight=2
set complete=.,w,u,b,i,d,t
set completeopt="menu,noinsert,noselect"
set confirm
set cpoptions+=B
set expandtab
set guioptions=ia
set hidden
set ignorecase
set incsearch
set laststatus=2
set matchpairs=(:),{:},[:],<:>
set matchtime=1
set modeline
set modelines=2
set noautowrite
set noeol
set noerrorbells
set nofixeol
set nohlsearch
set nowrap
set nowrapscan
set pastetoggle=<C-<>
set ruler
set rulerformat=%25(#%n\ %m%r%y\ %P\ <%l,%c%V>%)
set scroll=15
set sessionoptions=buffers,curdir,folds,globals,localoptions,options,winpos,winsize
set shiftwidth=4
set shortmess=aAoOtIc " make messages fit into one line
set showcmd
set showmatch
set showmode
set smartcase
set splitbelow
set splitright
set statusline=%<%F%m%=#%n\ %([%R]%)\ %([%Y]%)\ %P\ [%b\-0x%B]\ <%l,%c%V>
set suffixes+=\.zip,\.gz
set tabstop=4
set textwidth=80
set title
set titlelen=100
set titlestring=%<%F%m%r%=\ [\ %{getcwd()}\ ]\ -on-\ %{hostname()}
set updatecount=200
set whichwrap+=<,>,[,]
set wildignore=*.bak,*.~,*.obj,*.tmp,*.001,*.~mp,*.hlp,*.swp,*.def,*.class
set wildmenu
"set wildmode=longest,list
set winaltkeys=menu
" disables any bell in vim
set visualbell
set t_vb=
if !has('nvim')
set clipboard=unnamed,autoselect
set ttymouse=
set nocompatible " NOTE: nvim is always nocompatible
endif
if has("autocmd") " must be done first for some reason, this enables after/ftplugin stuff
filetype plugin indent on
endif
if has("syntax")
syntax on
endif
let MYTMP=$TMP
set runtimepath+=$VIMHOME
set runtimepath+=$VIMHOME/after
set packpath+=$VIMHOME
""""""""""""""""""""" START platform/env specific """""""""""""""""""""""""
" without this, it takes over a minute to start in docker
if $IN_DOCKER == 1
set clipboard=
endif
let g:in_wsl = 0
set shell=bash
if has("unix")
set diffopt-=internal " UNIX platforms use external tool and may not have been compiled with support for internal diff
set guioptions+=F
set guifont=Monospace\ 10,Bitstream\ Vera\ Sans\ Mono\ 12,Monospace\ 8,Terminal\ 10,MiscFixed\ 8
set encoding=utf8 " GTK likes this
let $PAGER=''
let MYTMP=$HOME . '/.tmp' " I don't want these deleted on reboot, so not in /tmp
" WSL check
let uname = substitute(system('uname'),'\n','','')
if uname == 'Linux'
let lines = readfile("/proc/version")
if lines[0] =~ "Microsoft"
let g:in_wsl = 1
endif
endif
endif
if has ('win32') || has( 'win64' ) && has('gui_running')
set shell=cmd.exe
endif
if has ("macunix")
set diffopt-=internal " UNIX platforms use external tool and may not have been compiled with support for internal diff
set clipboard=unnamed
if !has('gui_running')
set t_Co=256
endif
endif
""""""""""""""""""""" END platform/env specific """""""""""""""""""""""""
let &backupdir=MYTMP . '/recover' " backups
let &directory=MYTMP . '/recover' " swap files
" bootstrap all of my stuff
runtime usr/functions.vim
runtime usr/norm.vim
if has('nvim')
runtime usr/init.lua
endif
runtime usr/plugin_overrides.vim