-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
62 lines (54 loc) · 1.36 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
set nu
set tabpagemax=50
set tabstop=2
set shiftwidth=2
set list listchars=tab:\▸\-
set expandtab
set ignorecase
set smartcase
set incsearch
set wrapscan
set hlsearch
set cursorline
set vb t_vb=
set laststatus=2
" left
set statusline=%f
set statusline+=%m
set statusline+=%r
" right
set statusline+=%=
set statusline+=[%{&fileencoding}]
set statusline+=[%l/%L]
syntax on
" functions
function ExecCurrentFile()
let map = { "py":"python", "rb":"ruby", "sh":"sh", "php":"php" }
let extension = expand("%:e")
if !has_key(map, extension)
echo 'unknown extension!! (TT)'
return
endif
let execCommand=map[extension]
execute "!" . execCommand . " %"
endfunction
" bind
noremap <F2> <esc>:set nu!<Enter>
noremap <F3> <esc>:noh<Enter>
noremap <F4> <esc>:q<Enter>
noremap <F5> <esc>:call ExecCurrrentFile()<Enter>
noremap <C-w> <esc>:q<Enter>
noremap <C-s> <esc>:w<Enter>
inoremap <F2> <esc>:set nu!<Enter>
inoremap <F3> <esc>:noh<Enter>
inoremap <F4> <esc>:q<Enter>
inoremap <F5> <esc>:call ExecCurrentFile<Enter>
inoremap <C-w> <esc>:q<Enter>
inoremap <C-s> <esc>:w<Enter>
augroup MyHighlight
au!
autocmd VimEnter,ColorScheme * hi! CursorLine term=underline cterm=NONE gui=NONE ctermbg=black
autocmd VimEnter,ColorScheme * hi! def link StatusLine CursorLine
autocmd VimEnter,ColorScheme * hi! Normal ctermfg=231 ctermbg=16 cterm=NONE
augroup END
colorscheme delek