-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
159 lines (138 loc) · 3.78 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
"
" .vimrc
"
" Tested on: Gentoo-9.0.1627
"
" don't enforce the plain vi compatibility
set nocompatible
" detect file type
filetype on
" load file type related indent files
filetype indent on
" indent new line as the previous one
set autoindent
" improved new line auto-indenting
set smartindent
" copy the previous indentation
set copyindent
" convert Tab to spaces
set expandtab
" when shifting use defined width
set shiftround
" use 4 spaces when shifting
set shiftwidth=4
" when tabing use defined width
set smarttab
" use 4 spaces when tabing
set tabstop=4
" use 4 spaces when editing
set softtabstop=4
" enable syntax highlight
syntax on
" display cursor position x,y
set ruler
" highlight current row
set cursorline
" use underline with default color
hi CursorLine cterm=underline ctermbg=NONE ctermfg=NONE guibg=NONE guifg=NONE
" use yellow background with black text
hi CursorLineNr cterm=NONE ctermbg=yellow ctermfg=black guibg=yellow guifg=black
" number lines
"set number
" show 2 bottom rows as status
set laststatus=2
" hide the editing mode since using vim-airline plugin
set noshowmode
" highliht matching parenthesis
set showmatch
" disable the irritating bells
set noerrorbells
set novisualbell
" set utf8 as standard encoding
set encoding=utf8
" prefer LF as the standard file type
set ffs=unix,dos,mac
" visualize unwanted characters
set list
" Tab, nonbreaking space and trailing spaces
set listchars=tab:▷⋅,trail:⋅,nbsp:⋅
" search as type
set incsearch
" enable search highlight by default
set hlsearch
" default to case insensitive search
set ignorecase
" enable case sensitive search when a query contains a capital letter
set smartcase
" turn off search highlight on <leader> followed by Esc
nnoremap <leader><Esc> :nohlsearch<CR>
" warn when closing a modified file
set confirm
" enable visual auto-complete for command menu
set wildmenu
" enable bash-like auto-complete menu
"set wildmode=list:longest
" select by Tab
set wildchar=<TAB>
" undo files dir - 'mkdir -p ~/.cache/vim' or goes to '/tmp'
set undofile
set undodir=~/.cache/vim,/tmp
" backup files dir
set backupdir=~/.cache/vim,/tmp
" swap store dir
set directory=~/.cache/vim,/tmp
" draw only what needs to be drawn - save cycles
set lazyredraw
" enable fast character drawing (used under urxvt)
set ttyfast
" don't use the horrible modelines
set nomodeline
" remember 100 searches and chagnes
set history=100
" reload file when changed outside of Vim
set autoread
" backspace delete everything
set backspace=indent,eol,start
" allow cursor keys in Insert mode
"set esckeys
" disable Arrow keys in Escape mode
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
" disable Arrow keys in Insert mode
imap <up> <nop>
imap <down> <nop>
imap <left> <nop>
imap <right> <nop>
" Populate dictionary with Powerline symbols. Requires:
" app-vim/pathogen, app-vim/airline and app-vim/airline-themes
let g:airline_powerline_fonts=1
" Use customized Solarized theme
let g:airline_theme='solarizedfix'
" Use the Solarized Dark theme variant
let g:airline_solarized_bg='dark'
if !exists('g:airline_symbols')
let g:airline_symbols={}
endif
" Unicode symbols
let g:airline_left_sep = '»'
let g:airline_left_sep = '▶'
let g:airline_right_sep = '«'
let g:airline_right_sep = '◀'
let g:airline_symbols.linenr = '␊'
let g:airline_symbols.linenr = ''
let g:airline_symbols.linenr = '¶'
let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ'
let g:airline_symbols.paste = '∥'
let g:airline_symbols.whitespace = 'Ξ'
" airline/Powerline symbols
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''
let g:airline_symbols.linenr = ''