-
Notifications
You must be signed in to change notification settings - Fork 0
/
.minrc
169 lines (140 loc) · 4.22 KB
/
.minrc
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
" Plugins will be downloaded under the specified directory.
call plug#begin('~/.vim/plugged')
Plug 'sjl/badwolf'
Plug 'jiangmiao/auto-pairs'
Plug 'scrooloose/nerdtree'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'airblade/vim-gitgutter'
Plug 'mateusbraga/vim-spell-pt-br'
Plug 'christoomey/vim-tmux-navigator'
Plug 'ryanoasis/vim-devicons'
Plug 'luochen1990/rainbow'
Plug 'tpope/vim-surround'
Plug 'easymotion/vim-easymotion'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'xolox/vim-misc'
Plug 'godlygeek/tabular'
Plug 'unblevable/quick-scope'
Plug 'scrooloose/nerdcommenter'
" List ends here. Plugins become visible to Vim after this call.
call plug#end()
filetype plugin indent on " required
" ----------------------------------
" Visuals
" ----------------------------------
colorscheme badwolf "color theme
" italized comments
highlight Comment cterm=italic
set tabstop=4 "visual of a tab
set softtabstop=4 "mechanics of a tab
set noexpandtab
set relativenumber
set number "show line numbers
set number relativenumber
"setting line wrapping
set textwidth=0
set wrap
set linebreak
" ----------------------------------
" ----------------------------------
" ----------------------------------
" Basic Functionality
" ----------------------------------
set backspace=indent,eol,start "backspace deletes from preceding line
set clipboard=unnamedplus "clipboard from-to outside vim
inoremap jk <esc>
inoremap kj <esc>
inoremap <C-j> <esc>o
nnoremap Q :close<enter>
command! Indent %s/ /\t/g
let mapleader = ";"
nnoremap , ;
nnoremap <leader>g :Git
nnoremap <leader>o o<esc>k
nnoremap <leader>O O<esc>j
vnoremap <leader>t :Tabularize/
"complete on <tab>
inoremap <silent><expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
inoremap <silent><expr><s-tab> pumvisible() ? "\<c-p>" : "\<s-tab>"
"setting line wrapping
set textwidth=0
set wrap
set linebreak
"auto indentation
set shiftwidth=4
set autoindent
set smartindent
"search highlighting
set hlsearch
set incsearch
nnoremap <CR> :noh<CR>
let g:qs_highlight_on_keys = ['f', 'F', 't', 'T']
" movement mappings
" move vertically by visual line
nnoremap j gj
nnoremap k gk
vnoremap j gj
vnoremap k gk
" visual movement
nnoremap $ g$
nnoremap 0 g0
nnoremap J j
nnoremap K k
vnoremap $ g$
vnoremap 0 g0
vnoremap J j
vnoremap K k
" move through split panes with ctrl-<button>
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
nnoremap <c-w>v :vsp <enter>
nnoremap <c-w>z :sp <enter>
" spell checking
" C-l replaces last misspelled word with the fist suggestion
inoremap <C-l> <c-g>u<Esc>[s1z=`]<c-g>a
" replaces word under cursor with first suggestion
nnoremap == 1z=
" ----------------------------------
" ----------------------------------
au FileType ruby let b:AutoPairs = {'(':')', '[':']', '{':'}',"'":"'",'"':'"', '`':'`', '|':'|', '/':'/'}
au FileType markdown let b:AutoPairs = {'(':')', '[':']', '{':'}',"'":"'",'"':'"', '`':'`', '$':'$'}
au FileType scheme let b:AutoPairs = {'(':')', '"': '"', '[':']', '{':'}'}
" Create default mappings
let g:NERDCreateDefaultMappings = 1
let g:NERDSpaceDelims = 1
let g:NERDCompactSexyComs = 1
let g:NERDDefaultAlign = 'left'
let g:NERDCustomDelimiters = { 'c': { 'left': '/**','right': '*/' } }
let g:NERDCommentEmptyLines = 1
let g:NERDTrimTrailingWhitespace = 1
let g:NERDToggleCheckAllLines = 1
nnoremap <leader>R :RainbowToggle<enter>
let g:rainbow_active = 0
augroup scheme
autocmd!
autocmd FileType scheme setlocal ts=2 sts=2 sw=2 expandtab
augroup end
"tabs > spaces
augroup tabs
autocmd!
autocmd FileType python setlocal ts=4 sts=4 sw=4 noexpandtab
autocmd FileType ruby setlocal ts=2 sts=2 sw=2 noexpandtab
augroup end
let g:airline#extensions#whitespace#checks = ['trailing', 'conflicts']
let g:airline#extensions#nerdtree_status = 1
let g:airline#extensions#branch#enabled = 1
let g:airline#extensions#nerdtree_status = 1
let g:airline#extensions#tagbar#enabled = 1
let g:airline#extensions#vimtex#enabled = 1
let g:airline#extensions#ycm#enabled = 1
let g:airline_powerline_fonts = 1
let g:airline#extensions#scrollbar#enabled = 0
set guifont=DejaVuSansMono_Nerd_Font_Mono:h11
let &t_8f="\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b="\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
syntax enable