-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_vimrc
More file actions
172 lines (136 loc) · 4.24 KB
/
dot_vimrc
File metadata and controls
172 lines (136 loc) · 4.24 KB
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
160
161
162
163
164
165
166
167
168
169
170
171
172
""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vim Plug
""""""""""""""""""""""""""""""""""""""""""""""""""""""
call plug#begin()
"Plug 'chazy/cscope_maps'
"Plug 'simplyzhao/cscope_maps.vim'
Plug 'romainl/Apprentice'
" Plug 'scrooloose/nerdcommenter'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-fugitive'
Plug 'christoomey/vim-tmux-navigator'
"Plug 'abudden/taghighlight-automirror'
Plug 'ervandew/supertab'
Plug 'nathanaelkane/vim-indent-guides'
"Plug 'ludovicchabant/vim-gutentags'
"Plug 'freitass/todo.txt-vim'
"Plug 'morhetz/gruvbox'
"Plug 'nanotech/jellybeans.vim'
"Plug 'sjl/badwolf'
"Plug 'altercation/vim-colors-solarized'
"Plug 'sunuslee/vim-plugin-random-colorscheme-picker'
"Plug 'flazz/vim-colorschemes'
Plug 'loctvl842/monokai-pro.nvim'
Plug 'sheerun/vim-polyglot'
"Plug 'arcticicestudio/nord-vim'
" Use fork until colors are fixed: https://github.com/nordtheme/vim/pull/350
Plug 'MitchiLaser/fork-nord-vim'
call plug#end()
""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Look and Feel
""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" turn off the vi compatibility mode
set nocompatible
" set up the font for GUI
if has('gui_running')
set guifont=Inconsolata:h14
" get rid of the toolbar..useless
set guioptions-=T
endif
" doublewide command line
set laststatus=2
" gotta pick a theme
silent! colorscheme nord
" turn on syntax highlighting
syntax on
" no annoying backups
set nobackup nowritebackup
" better bracket support
set showmatch
" better backspacing
set backspace=indent,eol,start
" get rid of message prompt
set shortmess=atI
" show relative line numbering
set relativenumber
" When nonempty, this option determines the content of the status line
set statusline=%F%m%r%h%w\ [TYPE=%Y]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
" share system clipboard
set clipboard=unnamed
" minimum lines about or below the cursor
set scrolloff=10
" enable omni completion
filetype plugin on
set omnifunc=syntaxcomplete#Complete
" enable indent guides
let g:indent_guides_enable_on_vim_startup = 1
let g:indent_guides_auto_colors=0
hi IndentGuidesEven ctermbg=238
hi IndentGuidesOdd ctermbg=236
let g:indent_guides_soft_pattern = ' '
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Text Formatting/Layout
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" how automatic formatting is to be done
set formatoptions=tcrqn
" take indent for new line from previous line
set autoindent
" smart autoindenting for C programs
set smartindent
" do c-style indenting
set cindent
" tab spacing (settings below are just to unify it)
set tabstop=3
" unify
set softtabstop=3
" unify
set shiftwidth=3
" no tabs please
set expandtab
" do not wrap lines
set nowrap
" use tabs at the start of a line, spaces elsewhere
set smarttab
""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Searching
""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" case insensitive searching unless I add case to search
set ignorecase
set smartcase
" turn on incremental search
set incsearch
" turn on search highlighting
set hlsearch
""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Key Remappings
""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" control - hjkl change vim panes
noremap <C-H> <C-W><C-H>
noremap <C-J> <C-W><C-J>
noremap <C-K> <C-W><C-K>
noremap <C-L> <C-W><C-L>
" switch tabs w/ control tab
noremap <C-Tab> <C-PageDown>
noremap <C-S-Tab> <C-PageUp>
" Leader-d inserts current date
inoremap <leader>d <C-R>=strftime("%Y-%m-%d")<CR>
inoremap <leader>f <C-R>=strftime("%H:%M:%S")<CR>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Path rules
""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Move swap directory to tmp
set directory=/tmp
""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Syntax Rules
""""""""""""""""""""""""""""""""""""""""""""""""""""""
" load up organi kon file highlighting if .kon file
au BufNewFile,BufRead *.kon setf kon
" wiki highlighting
au BufNewFile,BufRead *wiki.vi* setf moin
" A66 assembler files
au BufNewFile,BufRead *.A66 setf pic
""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Abbreviations
""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Save with Sudo
cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!