@@ 1,8 1,27 @@
-" misc {{{
+" Settings
set updatetime=100
set tags=./tags;$HOME
-let @r=':r !cat /dev/random | tr -dc 0-9a-zA-Z | head -c 32' " Random 32 bytes
-" }}}
+set colorcolumn=80
+set number
+set hlsearch
+set hidden
+"TAB SETTINGS
+set autoindent " Copy indent from current line when starting a new line.
+set tabstop=4 " Size of a hard tabstop (ts).
+set shiftwidth=4 " Size of an indentation (sw).
+"set noexpandtab
+set softtabstop=4 " Number of spaces a <Tab> counts for. When 0, featuer is off (sts).
+set smarttab " Inserts blanks on a <Tab> key (as per sw, ts and sts).
+set expandtab " Always uses spaces instead of tab characters (et).
+"FOLD SETTINGS
+set foldenable
+set foldlevelstart=10
+set foldnestmax=10
+set foldmethod=indent
+set cursorline
+set wildmenu
+set modelines=1
+syntax enable
" vim-plug {{{
if empty(glob('~/.vim/autoload/plug.vim'))
@@ 11,38 30,23 @@ if empty(glob('~/.vim/autoload/plug.vim'))
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
+" Ordered by importance
call plug#begin('~/.vim/plugged')
+" Deving
+Plug 'airblade/vim-gitgutter'
Plug 'dense-analysis/ale'
-Plug 'tpope/vim-fugitive'
-Plug 'morhetz/gruvbox'
+Plug 'ctrlpvim/ctrlp.vim'
+Plug 'scrooloose/nerdtree'
+
+" Theming
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
-Plug 'valloric/vim-indent-guides'
-Plug 'airblade/vim-gitgutter'
-Plug 'scrooloose/nerdtree'
-Plug 'ctrlpvim/ctrlp.vim'
-"Plug 'sodapopcan/vim-twiggy'
-"Plug 'gregsexton/gitv'
-"Plug 'fedorenchik/VimCalc3'
-"Plug 'rhysd/vim-clang-format'
+Plug 'morhetz/gruvbox'
call plug#end()
" }}}
-" Colors {{{
-"GRUVBOX
-silent! colorscheme gruvbox
-silent! set background=dark
-
-"MONOKAI DARK
-"colorscheme monokai
-
-"SPACE-VIM-DARK
-"colorscheme space-vim-dark
-"hi Comment cterm=italic
-" }}}
-
-" FUNCTIONS {{{
-function! <SID>StripTrailingWhiteSpaces()
+" Remove trailing white space
+function! StripTrailingWhiteSpaces()
"prep: save last searched
let _s=@/
let l = line(".")
@@ 54,62 58,40 @@ function! <SID>StripTrailingWhiteSpaces()
let @/=_s
call cursor(l, c)
endfunction
-" }}}
+command Strip :call StripTrailingWhiteSpaces()
-" COMMANDS {{{
-"show trailing white spaces by default
-:command Trail /\s\+$
-" remove all whitespaces when done
-nnoremap <silent> <F5> :call <SID>StripTrailingWhiteSpaces()<CR>
-"autocmd BufWritePre *.txt, *.c :call <SID>StripTrailingWhiteSpaces()
-" }}}
+let @r=':r !cat /dev/random | tr -dc 0-9a-zA-Z | head -c 32' " Random 32 bytes
+
+" Universal Dev'ing
+set wildignore+=*/tmp/*,*.so,*.swp,*.zip " Linux/MacOSX
+
+" Java deving, ECLIPSE_JDT_LS should contain the path to the langaun server
+let g:ale_java_eclipselsp_path = $ECLIPSE_JDT_LS
+set wildignore+=*.class " Ignore class files
+inoremap jp<Tab> System.out.println("");<Esc>2hi
+
+" C deving
+inoremap cp<Tab> printf("\n");<Esc>4hi
+inoremap clib<Tab> #include <stdlib.h><CR>#include <stdio.h><Esc>
+
+" Theming
+silent! colorscheme gruvbox
+silent! set background=dark
+" End Theming
-" KEYBINDS {{{
+" KEYBINDS
+nnoremap <C-s> :w<CR>
nnoremap \ :noh<return>
nnoremap <C-\> :ToggleNumber()<CR>
-nnoremap <C-l> :IndentGuidesToggle<return>
nnoremap <C-n> :NERDTreeToggle<CR>
"space open/closes folds
nnoremap <space> za
nnoremap <Tab> :bnext<CR>
nnoremap <S-Tab> :bprevious<CR>
nnoremap <S-x> :bdelete<CR>
-" }}}
-
-" Custom "commands {{{
-inoremap jp<Tab> System.out.println("");<Esc>2hi
-inoremap cp<Tab> printf("\n");<Esc>4hi
-inoremap clib<Tab> #include <stdlib.h><CR>#include <stdio.h><Esc>
-" }}}
-
-" ALL SETS {{{
-set colorcolumn=80
-set number
-set relativenumber
-set hlsearch
-set hidden
-"TAB SETTINGS
-set autoindent " Copy indent from current line when starting a new line.
-set tabstop=4 " Size of a hard tabstop (ts).
-set shiftwidth=4 " Size of an indentation (sw).
-"set noexpandtab
-set softtabstop=4 " Number of spaces a <Tab> counts for. When 0, featuer is off (sts).
-set smarttab " Inserts blanks on a <Tab> key (as per sw, ts and sts).
-set expandtab " Always uses spaces instead of tab characters (et).
-"END TAB SETTINGS
-"FOLD SETTINGS
-set foldenable
-set foldlevelstart=10
-set foldnestmax=10
-set foldmethod=indent
-"END FOLD SETTINGS
-syntax enable
-set cursorline
-set wildmenu
-set modelines=1
-" }}}
+" End Keybinds
-" air-line {{{
+" Airine
let g:Powerline_symbols = 'fancy'
let g:airline_theme='base16'
let g:airline_solorized_bg='dark'
@@ 125,11 107,6 @@ if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
-" unicode symbols
-"let g:airline_left_sep = '»'
-"let g:airline_left_sep = '▶'
-"let g:airline_right_sep = '«'
-"let g:airline_right_sep = '◀'
let g:airline_symbols.linenr = '␊'
let g:airline_symbols.linenr = ''
let g:airline_symbols.linenr = '¶'
@@ 138,6 115,6 @@ let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ'
let g:airline_symbols.paste = '∥'
let g:airline_symbols.whitespace = 'Ξ'
-" }}}
+" End Airline
"vim:foldmethod=marker:foldlevel=0