added color rules and golang settings
This commit is contained in:
		@@ -6,3 +6,4 @@ set t_Co=256
 | 
			
		||||
highlight Normal   guibg=NONE ctermbg=NONE
 | 
			
		||||
highlight SpellBad ctermbg=NONE ctermfg=red
 | 
			
		||||
highlight LineNr   ctermfg=yellow
 | 
			
		||||
highlight SignColumn guibg=NONE ctermbg=NONE
 | 
			
		||||
 
 | 
			
		||||
@@ -33,6 +33,8 @@ augroup filetype_specific_formatting
 | 
			
		||||
	autocmd FileType kotlin     call FormatFileType(2, v:true,  'indent', 99, v:false)
 | 
			
		||||
	autocmd FileType dockerfile call FormatFileType(4, v:true,  'indent', 99, v:false)
 | 
			
		||||
	autocmd FileType vue        call FormatFileType(2, v:true,  'indent', 99, v:false)
 | 
			
		||||
	autocmd FileType go         call FormatFileType(4, v:false, 'manual', 99, v:false)
 | 
			
		||||
	autocmd FileType json       call FormatFileType(2, v:false, 'indent', 99, v:false)
 | 
			
		||||
augroup end
 | 
			
		||||
 | 
			
		||||
augroup forced_filetype_recognition
 | 
			
		||||
@@ -49,6 +51,7 @@ augroup end
 | 
			
		||||
augroup execute_file_shortcuts
 | 
			
		||||
	autocmd FileType tex		nnoremap <Leader>ec :! pdf=$(grep -rl 'documentclass' ./ <bar> head -n 1 <bar> sed 's/\(.*\)\.tex/\1.pdf/'); $WEBBROWSER $pdf<CR>
 | 
			
		||||
	autocmd FileType markdown	nnoremap <Leader>ec :! $WEBBROWSER %:p<CR>
 | 
			
		||||
	autocmd FileType go         nnoremap <Leader>ec :!clear<CR><CR>q:?GoRun<CR><CR>
 | 
			
		||||
augroup end
 | 
			
		||||
" }}}
 | 
			
		||||
 | 
			
		||||
@@ -61,6 +64,11 @@ augroup latex_commands
 | 
			
		||||
	autocmd FileType tex nnoremap <Leader>t :! clear; texfile=$(grep -rl 'documentclass' ./ <bar> head -n 1); timeout 3 pdflatex $texfile && { clear; pdflatex $texfile <bar> lolcat }<CR>
 | 
			
		||||
 | 
			
		||||
augroup end
 | 
			
		||||
 | 
			
		||||
augroup go_commands
 | 
			
		||||
	autocmd FileType go nmap <silent> <Leader>ef <Plug>(go-imports)
 | 
			
		||||
	autocmd FileType go nmap <silent> gd <Plug>(go-def-tab)
 | 
			
		||||
augroup end
 | 
			
		||||
" }}}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -17,6 +17,9 @@ Plugin 'VundleVim/Vundle.vim'
 | 
			
		||||
" nerdtree
 | 
			
		||||
	Plugin 'git://github.com/scrooloose/nerdtree.git'
 | 
			
		||||
 | 
			
		||||
" go-vim
 | 
			
		||||
	Plugin 'fatih/vim-go'
 | 
			
		||||
 | 
			
		||||
" youCompleteMe
 | 
			
		||||
	Plugin 'git://github.com/Valloric/YouCompleteMe.git'
 | 
			
		||||
 | 
			
		||||
@@ -61,22 +64,32 @@ function! ToggleYCM()
 | 
			
		||||
	endif
 | 
			
		||||
endfunction
 | 
			
		||||
 | 
			
		||||
" uncomment to deactivate by default
 | 
			
		||||
" let g:ycm_auto_trigger=0
 | 
			
		||||
let g:ycm_autoclose_preview_window_after_insertion = 1
 | 
			
		||||
let g:ycm_goto_buffer_command = 'new-tab'
 | 
			
		||||
 | 
			
		||||
nnoremap <S-y> :call ToggleYCM()<CR>
 | 
			
		||||
nnoremap gd :YcmCompleter GoToDefinition<CR>
 | 
			
		||||
 | 
			
		||||
" STARTS DEACTIVATED
 | 
			
		||||
" let g:ycm_auto_trigger=0
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
" --- ALE ---------------------------------------------------------------------------
 | 
			
		||||
let g:ale_linters = {
 | 
			
		||||
\ 'cs' : ['OmniSharp'],
 | 
			
		||||
\ 'python' : ['pylint']
 | 
			
		||||
\ 'python' : ['pylint'],
 | 
			
		||||
\ 'go' : ['golint']
 | 
			
		||||
\}
 | 
			
		||||
let g:ale_lint_on_text_changed = 'never'
 | 
			
		||||
let g:ale_lint_on_insert_leave = 'never'
 | 
			
		||||
let g:ale_lint_on_text_changed = 0
 | 
			
		||||
let g:ale_lint_on_insert_leave = 0
 | 
			
		||||
let g:ale_lint_on_save = 1
 | 
			
		||||
let g:ale_sign_column_always = 1
 | 
			
		||||
 | 
			
		||||
nnoremap <Leader>ae :ALENext<cr>
 | 
			
		||||
nnoremap <Leader>ar :ALEPrevious<cr>
 | 
			
		||||
nmap <Leader>ae <Plug>(ale_next)
 | 
			
		||||
nmap <Leader>ar <Plug>(ale_previous)
 | 
			
		||||
 | 
			
		||||
" --- vim-go ------------------------------------------------------------------------
 | 
			
		||||
let g:go_imports_autosave = 0
 | 
			
		||||
let g:go_def_mapping_enabled = 0
 | 
			
		||||
let g:go_fmt_fail_silently = 1
 | 
			
		||||
let g:go_def_reuse_buffer = 1
 | 
			
		||||
let g:go_textobj_enabled = 0
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user