" Run the following git commands to get the plugins " Plugin manager if empty(glob('~/.vim/autoload/plug.vim')) silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim autocmd VimEnter * PlugInstall --sync | source $MYVIMRC endif " Pre-plugin calls let g:ale_completion_enabled = 1 let g:ale_set_balloons = 1 " Plugins call plug#begin('~/.vim/plugged') Plug 'preservim/nerdtree' Plug 'tpope/vim-fugitive' Plug 'tpope/vim-commentary' #Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } Plug 'itchyny/lightline.vim' Plug 'dikiaap/minimalist' Plug 'morhetz/gruvbox' Plug 'dense-analysis/ale' Plug 'maximbaz/lightline-ale' call plug#end() filetype plugin indent on syntax on set autoindent set backspace=2 set background=dark set cursorcolumn set cursorline set expandtab set history=1000 set hlsearch set incsearch set nowrap set number set numberwidth=4 set pastetoggle= "Press when paste-alot set preserveindent set ruler set shiftround set shiftwidth=2 set shortmess=atI set showcmd set showmatch set smartindent set smarttab set tabstop=2 set whichwrap+=<,>,[,],h,l set undofile set undodir=~/.vim/undo " Gruvbox let g:gruvbox_italic = 1 let g:gruvbox_bold = 1 let g:gruvbox_transparent_bg = 1 colorscheme gruvbox " ALE completion set omnifunc=ale#completion#OmniFunc let g:ale_completion_autoimport = 1 " ALE navigation nmap (ale_previous_wrap) nmap (ale_next_wrap) " Lightline set laststatus=2 set noshowmode let g:lightline = { \ 'colorscheme': 'gruvbox', \ 'active': { \ 'left': [ \ [ 'mode', 'paste' ], \ [ 'gitbranch', 'readonly', 'filename', 'modified' ] \ ], \ 'right': [ \ [ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_infos', 'linter_ok' ], \ [ 'percent', 'lineinfo', 'offset' ], \ [ 'fileformat', 'fileencoding', 'filetype' ] \ ] \ }, \ 'component_function': { \ 'gitbranch': 'FugitiveHead', \ 'offset': 'FileOffset' \ }, \ 'component_expand': { \ 'linter_checking': 'lightline#ale#checking', \ 'linter_infos': 'lightline#ale#infos', \ 'linter_warnings': 'lightline#ale#warnings', \ 'linter_errors': 'lightline#ale#errors', \ 'linter_ok': 'lightline#ale#ok' \ }, \ 'component_type': { \ 'linter_checking': 'right', \ 'linter_infos': 'right', \ 'linter_warnings': 'warning', \ 'linter_errors': 'error', \ 'linter_ok': 'right' \ } \ } function! FileOffset() return line2byte(line('.')) + col('.') - 1 endfunction " NERDtree " Start NERDTree if no file was specified autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif " Close NERDTree on opening file let NERDTreeQuitOnOpen=1 " Show hidden files let NERDTreeShowHidden=1 " Toggle NERDTree on -o map o :NERDTreeToggle " " vim-go " let g:go_highlight_types = 1 " let g:go_highlight_fields = 1 " let g:go_highlight_functions = 1 " let g:go_highlight_function_calls = 1 " let g:go_highlight_operators = 1 " let g:go_auto_type_info = 1 " let g:go_fmt_command = "goimports" " let g:go_list_type = "quickfix" " map v :GoVet " map r :GoRun " map b :GoBuild " Key mappings map n :cnext map p :cprevious nnoremap c :cclose