-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
124 lines (100 loc) · 2.85 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
set encoding=utf-8
let g:polyglot_disabled = ['markdown']
"vimrc for John Rudolph
"Created December 2020
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vim Plugin Management
" Use vim-plug for Plugin managment
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.vim/plugged')
"LightLine
Plug 'itchyny/lightline.vim'
"Gruvbox
"Plug 'morhetz/gruvbox'
Plug 'sainnhe/gruvbox-material'
" Syntax Highlighting
Plug 'sheerun/vim-polyglot'
" Python linting
" Plug 'Vimjas/vim-python-pep8-indent'
" Code Completion
" Plug 'pappasam/coc-jedi', { 'do': 'yarn install --frozen-lockfile && yarn build' }
" Plug 'davidhalter/jedi-vim'
call plug#end()
"LiteLine Config
set laststatus=2
if !has('gui_running')
set t_Co=256
endif
let g:lightline = {
\ 'colorscheme':'jellybeans'
\}
" Grovbox Config
colorscheme
" Important!!
if has('termguicolors')
set termguicolors
endif
" For dark version.
set background=dark
" For light version.
"set background=light
" Set contrast.
" This configuration option should be placed before `colorscheme gruvbox-material`.
" Available values: 'hard', 'medium'(default), 'soft'
let g:gruvbox_material_background = 'soft'
colorscheme gruvbox-material
" Syntax highlighting with Vim-Polygot
set nocompatible
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Native Vim Configurations
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" use indentation for newline
set autoindent
" highlight search word
set hlsearch
"
" Set to mouse to work in Vim
set mouse=a
" use intelligent indentation
set smartindent
set cindent
"inoremap { {<CR>}<up><end><CR>
"tab is 4 spaces
set tabstop=4
"indent is 4 spaces
set shiftwidth=4
"tab is set to 4 for python files
autocmd Filetype py setlocal tabstop=4
autocmd Filetype py setlocal shiftwidth=4
"expand tabs to spaces
set expandtab
"wrap lines at 80 chars
set textwidth=80
"turn on syntax highlighting
"set t_Co=256
"syntax on
"turn on line numbers
set relativenumber
set number
"show matching braces
set showmatch
"automatically closing braces and quotes
inoremap { {}<Esc>ha
inoremap ( ()<Esc>ha
inoremap [ []<Esc>ha
inoremap " ""<Esc>ha
inoremap ' ''<Esc>ha
inoremap ` ``<Esc>ha
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"key mapping
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let mapleader = "\<space"
:inoremap jj <esc>
:nnoremap <S-j> <C-d>
:nnoremap <S-k> <C-u>
vmap <space>j <esc>