My awesome dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

65 lines
1.8 KiB

call plug#begin('~/.vim/plugged')
Plug 'artur-shaik/vim-javacomplete2'
"Plug 'apalmer1377/factorus'
Plug 'junegunn/fzf.vim'
"Plug 'dense-analysis/ale'
call plug#end()
" javacomplete2
autocmd FileType java setlocal omnifunc=javacomplete#Complete
let g:JavaComplete_ClosingBrace = 1
let g:mapleader = " "
let g:netrw_liststyle = 3
let g:netrw_banner = 0
let g:netrw_winsize = 25
let g:netrw_browse_split = 4
let g:netrw_altv = 1
syntax on
set completeopt=menuone,noinsert
set ts=4 sw=4
set relativenumber number
set nohlsearch
set splitbelow splitright
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
nnoremap S :%s//g<Left><Left>
nnoremap <Leader>i :JCimportAddSmart<CR>
nnoremap <Leader>I <Plug>(JavaComplete-Imports-Add)
nnoremap <Leader>a <Plug>(JavaComplete-Imports-AddMissing)
nnoremap <Leader>r <Plug>(JavaComplete-Imports-RemoveUnused)
nnoremap <Leader>c :JCclassNew
nnoremap <Leader>gg :JCgenerateAccessorGetter<CR>
nnoremap <Leader>gc :JCgenerateConstructor<CR>
nnoremap <Leader>f :Files<CR>
nnoremap <Leader>p :bp<CR>
nnoremap <Leader>n :bn<CR>
nnoremap <Leader>t :!clear && make test<CR>
nnoremap <Leader>b :!clear && make package<CR>
nnoremap <Leader>m :make
nnoremap <Leader>v :e ~/.vim/vimrc<CR>
nnoremap <Leader>s :source ~/.vim/vimrc<CR>
nnoremap <Leader>e :Vex<CR>
nnoremap zz ZZ
nnoremap zq ZQ
inoremap <C-@> <C-X><C-o>
nnoremap <Leader>j :m .+1<CR>
nnoremap <Leader>k :m .-2<CR>
vnoremap <Leader>j :m '>+1<CR>
vnoremap <Leader>k :m '<-2<CR>
" guile
nnoremap <Leader>gb gg^i#!/usr/bin/guile \<CR>-e main -s<CR>!#<CR><CR>(define (main args)<CR><CR>)<CR><Esc>kk
autocmd BufReadPost *.doc,*.docx silent %!antiword "%"
autocmd BufReadPost *.odt,*.odp silent %!odt2txt "%"
autocmd BufReadPost *.pdf silent %!pdftotext -nopgbrk -layout -q -eol unix "%" - | fmt -w78
autocmd BufWriteCmd *.pdf set readonly