-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.vimrc
107 lines (81 loc) · 2.33 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
filetype plugin indent on
" ____ __
" | _ \ _ __ ___ / _| ___ _ __ ___ _ __ ___ ___ ___
" | |_) | '__/ _ \ |_ / _ \ '__/ _ \ '_ \ / __/ _ \/ __|
" | __/| | | __/ _| __/ | | __/ | | | (_| __/\__ \
" |_| |_| \___|_| \___|_| \___|_| |_|\___\___||___/
" Syntax hilighting
syntax on
" fzf Fuzzy finder
set rtp+=~/.fzf
" 4 spaces for tabs
set tabstop=4
set shiftwidth=4
set expandtab
set autoindent
" Show linenumbers
set number
" set relativenumber
" Colorscheme
colors zenburn
" Highlight the 80th column
set cursorline
set cc=80
highlight ColorColumn ctermbg=darkblue
"Highlight tabs and extra whitespace
highlight LiteralTabs ctermbg=darkgreen guibg=darkgreen
match LiteralTabs /\s /
highlight ExtraWhitespace ctermbg=darkgreen guibg=darkgreen
match ExtraWhitespace /\s\+$/
let @w = ':%s/\s\+$//e'
" Disable .swp and backup files
set nobackup
set nowritebackup
set noswapfile
" Allow write of read-only files
cmap w!! w !sudo tee > /dev/null %
" vim-sensible changes I liked
set laststatus=0
set backspace=indent,eol,start
set incsearch
set scrolloff=2
set smarttab
let g:ale_python_pylint_options = '--rcfile ~/.dotfiles/.pylintrc'
" __ __ _
"| \/ | __ _ _ __ _ __ (_)_ __ __ _ ___
"| |\/| |/ _` | '_ \| '_ \| | '_ \ / _` / __|
"| | | | (_| | |_) | |_) | | | | | (_| \__ \
"|_| |_|\__,_| .__/| .__/|_|_| |_|\__, |___/
" |_| |_| |___/
" CAUTION: many mappings below
mapclear
" Leader :^)
let mapleader = ','
" Map kpl syntax higlight enable to <F1> for CSCI 509
nnoremap <F1> :setf kpl<CR>:set shiftwidth=2<CR>:set tabstop=2<CR>:set expandtab<CR>:set autoindent<CR>
" Open and source vimconfig mapping
nnoremap <leader>ev :split $MYVIMRC<CR>
nnoremap <leader>sv :source $MYVIMRC<CR>
" Toggle paste mode
nnoremap <leader>p :set paste!<CR>
" Make space more useful
nnoremap <space> zz
" Toggle uppercase on word in normal and visual modes
nnoremap <c-u> viwU
vnoremap <c-u> iwU
" Copy and paste one line below or above
noremap - ddjP
noremap _ ddkP
" Abbreviations!
iabbrev adn and
" ____ _ _
"| _ \| |_ _ __ _(_)_ __ ___
"| |_) | | | | |/ _` | | '_ \/ __|
"| __/| | |_| | (_| | | | | \__ \
"|_| |_|\__,_|\__, |_|_| |_|___/
"|___/
"call plug#begin()
"Plug 'scrooloose/nerdcommenter'
"Plug 'dense-analysis/ale'
"Plug 'yggdroot/indentline'
"call plug#end()