-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
71 lines (67 loc) · 1.82 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
set nocompatible
colorscheme koehler " -- DOESN'T WORK ON OSX
execute pathogen#infect()
filetype indent plugin on
syntax on
""" mappings
""" global mappings
map! ;; <Esc>
map <Space> :w <CR>
map ,wt :silent !printf '\033k%\033\\'<cr> :redraw!<cr>
set visualbell
set number
set colorcolumn=92 " -- DOESN'T WORK ON OSX
set timeoutlen=1000 ttimeoutlen=0
""
""" force write directly to the file instead of writing to a new one, HMR not
""" firing automatically (webpack)
""" https://github.com/webpack/webpack/issues/781#issuecomment-95523711
set backupcopy=yes
""" disable arrow keys
nnoremap <up> <nop>
nnoremap <down> <nop>
nnoremap <right> <nop>
nnoremap <left> <nop>
""
""set laststatus=2
"set t_Co=256
"set background=dark
"colorscheme papercolor
""
""" airline
let g:airline#extensions#tabline#enabled = 1
""
""
""" write then reload file
map ,r :w \| :e!<cr>
""
""" for tabs
nnoremap tbn :tabnew<Space>
nnoremap tn :tabnext<CR>
nnoremap th :tabfirst<CR>
nnoremap tj :tabprev<CR>
nnoremap tl :tablast<CR>
""
""" for splits
map <C-l> <C-W>l
map <C-h> <C-W>h
map <C-j> <C-W>j
map <C-k> <C-W>k
""
""" for elixir
map ,et :w \|:!mix test<cr>
map ,er :w \|:!iex -S mix<cr>
""
""" for filetypes
au BufNewFile,BufRead *.scss set filetype=scss
au BufNewFile,BufRead *.md set filetype=markdown
au BufNewFile,BufRead *.toml set filetype=toml
au BufNewFile,BufRead *.hbs set filetype=handlebars
au FileType javascript setlocal shiftwidth=2 tabstop=2
au FileType scss setlocal shiftwidth=2 tabstop=2
au FileType toml setlocal shiftwidth=4 tabstop=4
au FileType json setlocal shiftwidth=2 tabstop=2 expandtab
au FileType handlebars setlocal shiftwidth=2 tabstop=2 expandtab
command! -nargs=+ Silent execute 'silent <args>' | redraw! | copen
" ignore directories for ctrl+p
let g:ctrlp_custom_ignore = '\v[\/](node_modules|target|dist)|(\.(swp|ico|git|svn|png|jpg))$'