-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
109 lines (89 loc) · 2.38 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
" my native vimrc
" ===== key mappings ====
" nnoremap - normal mode only, nonrecursive
" noremap - non-recursive most modes
" navigation
" delete a line w cc
noremap cc dd
" navigation
" normal mode
noremap d h
noremap t j
noremap h k
noremap e l
" visual mode
xnoremap d h
xnoremap t j
xnoremap h k
xnoremap e l
" visual block mode
" ==== end key mappings ====
vnoremap d h
vnoremap t j
vnoremap h k
vnoremap e l
set laststatus=2
" status line start
function! HighlightSearch()
if &hls
return 'H'
else
return ''
endif
endfunction
set statusline=%#Status3#
set statusline+=%7*\[%n] "buffernr
set statusline+=%1*\ %<%F\ "File+path
set statusline+=%2*\ %y\ "FileType
set statusline+=%3*\ %{''.(&fenc!=''?&fenc:&enc).''} "Encoding
set statusline+=%3*\ %{(&bomb?\",BOM\":\"\")}\ "Encoding2
"set statusline+=%4*\ %{&ff}\ "FileFormat (dos/unix..)
"set statusline+=%5*\ %{&spelllang}\%{HighlightSearch()}\ "Spellanguage & Highlight on?
set statusline+=%8*\ %=\ row:%l/%L\ (%03p%%)\ "Rownumber/total (%)
set statusline+=%9*\ col:%03c\ "Colnr
set statusline+=%0*\ \ %m%r%w\ %P\ \ "Modified? Readonly? Top/bot
" status line end
" no backwards compatibility
set nocompatible
" no more .swp clutter
let &directory = expand('~/.vimdata/swap//')
set backup
let &backupdir = expand('~/.vimdata/backup//')
set undofile
let &undodir = expand('~/.vimdata/undo//')
if !isdirectory(&undodir) | call mkdir(&undodir, "p") | endif
if !isdirectory(&backupdir) | call mkdir(&backupdir, "p") | endif
if !isdirectory(&directory) | call mkdir(&directory, "p") | endif
" Filetype detect
filetype on
" leet coding shit
filetype plugin on
filetype indent on
syntax on
set number
" for my blind ass
set cursorcolumn
" tab shinanigans
set shiftwidth=4
set tabstop=4
set expandtab
set smarttab
set nowrap
" when searching, incrementaly highlight letters
set incsearch
" and ignore case
set ignorecase
" highlight as we search
set hlsearch
" exept with only capitals
set smartcase
" show matchew when searching
set showmatch
" show what mode we are in
set showmode
" commands to save
set history=500
" wildmenu stuff
set wildmenu
set wildmode=list:longest
set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx