-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
67 lines (53 loc) · 1.45 KB
/
vimrc
File metadata and controls
67 lines (53 loc) · 1.45 KB
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
""" vimrc
" this two values are set for compatibility with tmux
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
" theme
colorscheme molokai
" settings
syntax on
set mouse=a
set tabstop=4
set shiftwidth=4
set nu
set colorcolumn=80
set listchars=tab:>-,trail:.,precedes:<,extends:>,eol:⏎,space:·
set smartindent
set hlsearch
set cursorline
" yml/yaml indentation
autocmd FileType yml setlocal ts=2 sts=2 sw=2 expandtab
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
" shaders extentions syntax on
autocmd BufNewFile,BufRead *.glsl set syntax=c
autocmd BufNewFile,BufRead *.frag set syntax=c
"binds
:command WQ wq
:command Wq wq
:command W w
:command Q q
:command H %!xxd
:command HH %!xxd -r
" key binds for tmux
nnoremap <silent> <C-Right> <c-w>l
nnoremap <silent> <C-Left> <c-w>h
nnoremap <silent> <C-Up> <c-w>k
nnoremap <silent> <C-Down> <c-w>j
" ctrl + arrow in tmux
if &term =~ '^screen'
execute "set <xUp>=\e[1;*A"
execute "set <xDown>=\e[1;*B"
execute "set <xRight>=\e[1;*C"
execute "set <xLeft>=\e[1;*D"
endif
" F7 will show hexdump of the file, while f8 convert it to ascii
:nnoremap <F7> :H<CR>
:nnoremap <F8> :HH<CR>
" display/hide hilights with F4
:nnoremap <F4> :set hlsearch! hlsearch?<CR>
" display/hide invisible characters
:nnoremap <F5> :set list! list?<CR>
" show relative numbers in the margin
:nnoremap <F3> :set relativenumber! relativenumber?<CR>
" avoid auto indent when pasting
set pastetoggle=<F2>