dotfiles

$HOME is where the <3 is
git clone git://git.alexkarle.com/dotfiles.git
Log | Files | Refs | Submodules | README

commit 370134eae81072777b2a82acd364783736c38c0a (patch)
parent d37f1b9ad1286d857827c87fff086b09e0c07188
Author: Alexander Karle <akarle@umass.edu>
Date:   Wed, 27 Dec 2017 14:27:14 -0500

Split vmrc into multiple files + swap to vim-plug

Diffstat:
Akeys.vim | 17+++++++++++++++++
Aplugins.vim | 39+++++++++++++++++++++++++++++++++++++++
Apluginsettings.vim | 16++++++++++++++++
Atheme.vim | 32++++++++++++++++++++++++++++++++
Mvimrc | 123++++++-------------------------------------------------------------------------
5 files changed, 113 insertions(+), 114 deletions(-)

diff --git a/keys.vim b/keys.vim @@ -0,0 +1,17 @@ +"================================ +" KEY MAPPINGS +"================================ +"Map 'jk' to ESC (its wonderful) +inoremap jk <ESC> + +"Map ctrl-i/j/k/h to switch between splits +nnoremap <C-j> <C-w>j +nnoremap <C-k> <C-w>k +nnoremap <C-h> <C-w>h +nnoremap <C-l> <C-w>l + +"Map ctrl-p to fuzzy finder +nnoremap <C-p> :GFiles<CR> + +" HTML autoclose tag +iabbrev </ </<C-X><C-O> diff --git a/plugins.vim b/plugins.vim @@ -0,0 +1,39 @@ +" Plugs will be downloaded under the specified directory. +call plug#begin('~/.vim/bundle') + +" Colorscheme +Plug 'rakr/vim-one' + +" Plug nerdtree for tree package explorer +Plug 'scrooloose/nerdtree' + +" Airline = status bar for vime +Plug 'vim-airline/vim-airline' +Plug 'vim-airline/vim-airline-themes' + +" Fugitive = git for vim +Plug 'tpope/vim-fugitive' + +" NERD Commenter = for comments +Plug 'scrooloose/nerdcommenter' + +" Git Gutter +Plug 'airblade/vim-gitgutter' + +" Syntastic for syntax checks +Plug 'vim-syntastic/syntastic' + +" todo task plugin +Plug 'irrationalistic/vim-tasks' + +" Simple latex tools +Plug 'lervag/vimtex' + +" fzf -- fuzzy finder +Plug 'junegunn/fzf.vim' + +" surround for parens and such +Plug 'tpope/vim-surround' + +" List ends here. Plugins become visible to Vim after this call. +call plug#end() diff --git a/pluginsettings.vim b/pluginsettings.vim @@ -0,0 +1,16 @@ +" Syntastic Default Settings +"set statusline+=%#warningmsg# +"set statusline+=%{SyntasticStatuslineFlag()} +"set statusline+=%* + +"let g:syntastic_always_populate_loc_list = 1 +"let g:syntastic_auto_loc_list = 1 +"let g:syntastic_check_on_open = 0 +"let g:syntastic_check_on_wq = 0 + +"let g:syntastic_python_checkers = ['flake8'] +"let g:syntastic_python_flake8_post_args='--ignore=E116' + +" vimtex stuff +" Set pdf viewer to sim +let g:vimtex_view_method='skim' diff --git a/theme.vim b/theme.vim @@ -0,0 +1,32 @@ +"================================ +" THEME +"================================ +"for airline status bar -- need to include font +if filereadable(expand("~/.vim/bundle/vim-airline/plugin/airline.vim")) + let g:airline_powerline_fonts = 1 +endif + +if filereadable(expand("~/.vim/bundle/vim-airline-themes/plugin/airline-themes.vim")) + let g:airline_theme = 'onedark' +endif + +"Syntax highlighting on +syntax on + +" COLORSCHEME +" use iterm profiles to determin background +if $ITERM_PROFILE=='light_background' + set background=light +else + set background=dark +endif + +" load colorscheme if plugins installed +if filereadable(expand("~/.vim/bundle/vim-one/colors/one.vim")) + colorscheme one +endif + +" if can use truecolor, do +if (has("termguicolors")) + set termguicolors +endif diff --git a/vimrc b/vimrc @@ -18,130 +18,25 @@ set smarttab "search highlighting set hlsearch -"=============================== -" PLUGINS -"=============================== -"Don't try to work with vi -set nocompatible - -"Use vundle for plugins! -filetype off - -" set the runtime path to include Vundle and initialize -set rtp+=~/.vim/bundle/Vundle.vim -call vundle#begin() - -" let Vundle manage Vundle, required -Plugin 'VundleVim/Vundle.vim' - -" Colorscheme -Plugin 'rakr/vim-one' - -" Plugin nerdtree for tree package explorer -Plugin 'scrooloose/nerdtree.git' - -" Airline = status bar for vime -Plugin 'vim-airline/vim-airline' -Plugin 'vim-airline/vim-airline-themes' - -" Fugitive = git for vim -Plugin 'tpope/vim-fugitive' - -" NERD Commenter = for comments -Plugin 'scrooloose/nerdcommenter' - -" Better syntax highlighting for python -"Plugin 'hdima/python-syntax' - -" Git Gutter -Plugin 'airblade/vim-gitgutter' - -" Syntastic for syntax checks -Plugin 'vim-syntastic/syntastic' - -" todo task plugin -Plugin 'irrationalistic/vim-tasks' - -" Simple latex tools -Plugin 'lervag/vimtex' - -" fzf -- fuzzy finder set rtp+=/usr/local/opt/fzf -Plugin 'junegunn/fzf.vim' +filetype plugin indent on -" All of your Plugins must be added before the following line -call vundle#end() " required -filetype plugin indent on " required -"================================ -" THEME + OTHER -"================================ -"for airline status bar -- need to include font -let g:airline_powerline_fonts = 1 +" OTHER +" Link clipboard to mac +set clipboard=unnamed "For security (modeline vulnerability) set modelines=0 -"Syntax highlighting on -syntax on - " Encoding set encoding=utf-8 -" COLORSCHEME -" use iterm profiles to determin background -if $ITERM_PROFILE=='light_background' - set background=light -else - set background=dark -endif - -" load colorscheme if plugins installed -if filereadable(expand("~/.vim/bundle/vim-one/colors/one.vim")) - colorscheme one -endif - -" if can use truecolor, do -if (has("termguicolors")) - set termguicolors -endif - -let g:airline_theme = 'onedark' - " Show whitespace with 'set: list' (disable: set: nolist) set listchars=space:·,tab:>–,trail:~,eol:¬ -" Syntastic Default Settings -set statusline+=%#warningmsg# -set statusline+=%{SyntasticStatuslineFlag()} -set statusline+=%* - -let g:syntastic_always_populate_loc_list = 1 -let g:syntastic_auto_loc_list = 1 -let g:syntastic_check_on_open = 0 -let g:syntastic_check_on_wq = 0 - -let g:syntastic_python_checkers = ['flake8'] -let g:syntastic_python_flake8_post_args='--ignore=E116' - -" vimtex stuff -" Set pdf viewer to sim -let g:vimtex_view_method='skim' - -"================================ -" NEW MAPPINGS -"================================ -"Map 'jk' to ESC (its wonderful) -inoremap jk <ESC> - -"Map ctrl-i/j/k/h to switch between splits -nnoremap <C-j> <C-w>j -nnoremap <C-k> <C-w>k -nnoremap <C-h> <C-w>h -nnoremap <C-l> <C-w>l - -"Map ctrl-p to fuzzy finder -nnoremap <C-p> :GFiles<CR> - -" Link clipboard to mac -set clipboard=unnamed +" Source helper files +source ~/.vim/plugins.vim +source ~/.vim/pluginsettings.vim +source ~/.vim/theme.vim +source ~/.vim/keys.vim