aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nvim/.config/nvim/init.vim44
1 files changed, 44 insertions, 0 deletions
diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim
index e9449e8..6d5b3e4 100644
--- a/nvim/.config/nvim/init.vim
+++ b/nvim/.config/nvim/init.vim
@@ -90,6 +90,18 @@ Plugin 'maksimr/vim-jsbeautify'
" rst
Plugin 'marshallward/vim-restructuredtext'
+Plugin 'artur-shaik/vim-javacomplete2'
+
+Plugin 'leafgarland/typescript-vim'
+
+Plugin 'Quramy/tsuquyomi'
+
+Plugin 'palantir/tslint'
+
+"Plugin 'FredKSchott/CoVim'
+
+Plugin 'makerforceio/CoVim'
+
" After all plugins...
call vundle#end()
filetype plugin indent on
@@ -206,3 +218,35 @@ noremap <F3> :Autoformat<CR>
let g:autoformat_autoindent = 0
let g:autoformat_retab = 0
let g:autoformat_remove_trailing_spaces = 0
+
+autocmd Filetype java set makeprg=javac\ %
+set errorformat=%A%f:%l:\ %m,%-Z%p^,%-C%.%#
+map <F9> :make<Return>:copen<Return>
+map <F10> :cprevious<Return>
+map <F11> :cnext<Return>
+
+map <F5> :call CompileRunGcc()<CR>
+func! CompileRunGcc()
+ exec "w"
+ if &filetype == 'c'
+ exec "!gcc % -o %<"
+ exec "!time ./%<"
+ elseif &filetype == 'cpp'
+ exec "!g++ % -o %<"
+ exec "!time ./%<"
+ elseif &filetype == 'java'
+ exec "!time java -cp %:p:h %:t:r"
+ elseif &filetype == 'sh'
+ exec "!time bash %"
+ elseif &filetype == 'python'
+ exec "!time python2.7 %"
+ elseif &filetype == 'html'
+ exec "!firefox % &"
+ elseif &filetype == 'go'
+ exec "!go build %<"
+ exec "!time go run %"
+ elseif &filetype == 'mkd'
+ exec "!~/.vim/markdown.pl % > %.html &"
+ exec "!firefox %.html &"
+ endif
+endfunc