-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc.local
More file actions
79 lines (64 loc) · 2.28 KB
/
vimrc.local
File metadata and controls
79 lines (64 loc) · 2.28 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
67
68
69
70
71
72
73
74
75
76
77
78
79
" Bindings
map <leader>n :NERDTreeToggle<CR>
map <leader>m :NERDTreeFind<CR>
noremap <leader>ff :Ack<space>
let vim_markdown_preview_hotkey='<C-m>'
let vim_markdown_preview_github=1
" Ignore files for ctrlp
set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/](node_modules|vendor|\.(git|hg|svn))$',
\ 'file': '\v\.(exe|so|dll)$'
\ }
" Misc
set nowrap
set noshowmode
set hlsearch
" Force indentation to use soft tabs
set expandtab
set shiftwidth=2
set softtabstop=2
" Custom snippets
let g:UltiSnipsSnippetDirectories=["UltiSnips", "custom-snippets"]
autocmd BufRead,BufNewFile *.tpl set filetype=html
" Enable true colors
" Break *only* Terminal vim
if (has("termguicolors"))
set termguicolors
endif
" Theme
syntax enable
colorscheme night-owl
" Remove background color from...
hi! Normal ctermbg=NONE guibg=NONE
hi! NonText ctermbg=NONE guibg=NONE
hi! EndOfBuffer ctermbg=NONE guibg=NONE
hi! LineNr ctermbg=NONE guibg=NONE
hi! VertSplit term=NONE cterm=NONE ctermbg=NONE ctermfg=240 gui=NONE guibg=NONE guifg=#4f5b66
hi! SignColumn ctermbg=NONE guibg=NONE
" Set italics for...
hi! Comment cterm=italic
hi! xmlAttrib cterm=italic ctermfg=221 gui=bold guifg=#fac863
" Change colors for...
hi! StorageClass ctermfg=176 guifg=#c594c5
" Use async Prettier formatting on save
let g:prettier#autoformat = 0
autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.vue PrettierAsync
" NERDCommenter
let g:NERDSpaceDelims = 1
let g:NERDDefaultAlign='left'
let g:NERDCommentEmptyLines=1
" F12 reveals highlight group beneath cursor
map <F12> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
\ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
\ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
" Revert vim-prettior confg to Prettier defaults (https://git.io/fjBWW)
let g:prettier#config#arrow_parens = 'avoid'
let g:prettier#config#bracket_spacing = 'true'
let g:prettier#config#jsx_bracket_same_line = 'false'
let g:prettier#config#parser = 'babylon'
let g:prettier#config#single_quote = 'false'
let g:prettier#config#trailing_comma = 'none'
" Set syntax for fastlane Fastfile
autocmd BufNewFile,BufRead Fastfile set syntax=ruby