forked from stamp/super-dot-files
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc-custom
81 lines (66 loc) · 2.3 KB
/
vimrc-custom
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
set shiftwidth=4
set softtabstop=4
set tabstop=4
colorscheme solarized
let g:airline_theme="solarized"
se t_Co=256
let g:solarized_termcolors=256
"system clipboard
vmap <Leader>y "+y
vmap <Leader>d "+d
nmap <Leader>p "+p
nmap <Leader>P "+P
vmap <Leader>p "+p
vmap <Leader>P "+P
" normal keyword completion with ,,
inoremap <leader>, <C-x><C-n>
" map space to toggle fold or create new one in visual mode
nnoremap <silent> <Space> @=(foldlevel('.')?'za':"\<Space>")<CR>
vnoremap <Space> zf
"; i command mode ger ; i slutet på raden
noremap ; :s/\([^;]\)$/\1;/<cr>:set nohlsearch<cr>
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<tab>"
let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
let g:UltiSnipsListSnippets="<c-e>"
au InsertEnter * exec "inoremap <silent> " . g:UltiSnipsExpandTrigger . " <C-R>=g:UltiSnips_Complete()<cr>"
" this mapping Enter key to <C-y> to chose the current highlight item
" and close the selection list, same as other IDEs.
" CONFLICT with some plugins like tpope/Endwise
"inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
let g:UltiSnipsEditSplit="vertical"
let g:snips_author='Jonas Falck'
let g:ctrlp_max_files = 100000
let g:ctrlp_clear_cache_on_exit = 0
let g:ctrlp_regexp = 1
let g:ctrlp_lazy_update = 150
"let g:syntastic_javascript_jshint_conf = "~/.jshintrc"
let g:syntastic_javascript_jshint_args = '--config ~/.jshintrc'
let g:syntastic_html_jshint_args = '--config ~/.jshintrc'
let g:syntastic_html_checkers = ['jshint']
"let g:syntastic_html_checkers = ['tidy','jshint']
"let g:syntastic_html_tidy_exec = 'tidy'
let g:syntastic_php_phpmd_post_args = "~/.phpmd-ruleset.xml"
"vim-go stuff
let g:go_fmt_command = "goimports"
au FileType go nmap <leader>r <Plug>(go-run)
au FileType go nmap <leader>b <Plug>(go-build)
au FileType go nmap <leader>t <Plug>(go-test)
au FileType go nmap <leader>v <Plug>(go-coverage)
set nocompatible
set backspace=indent,eol,start
"special fix for YouCompleteMe with Ultisnips and the TAB key
function! g:UltiSnips_Complete()
call UltiSnips#ExpandSnippet()
if g:ulti_expand_res == 0
if pumvisible()
return "\<C-n>"
else
call UltiSnips#JumpForwards()
if g:ulti_jump_forwards_res == 0
return "\<TAB>"
endif
endif
endif
return ""
endfunction