aboutsummaryrefslogtreecommitdiff
path: root/vimrc
diff options
context:
space:
mode:
authorCody Hiar <cody.hiar@investopedia.com>2016-06-02 11:26:44 -0600
committerCody Hiar <cody.hiar@investopedia.com>2016-06-02 11:26:44 -0600
commit27430ddec87a17eaa51414cbbd9bba698dc8a704 (patch)
treee3f92b069293d907f7d9b9a06c068703362007e4 /vimrc
parente861773246795e21688bd3b2bd60cdd2d2096f27 (diff)
Updating to use new shared options plugin
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc381
1 files changed, 6 insertions, 375 deletions
diff --git a/vimrc b/vimrc
index 4e1e2d3..c6de641 100644
--- a/vimrc
+++ b/vimrc
@@ -1,404 +1,35 @@
"-----------------------------------------------------------------------------------------------------------------------
-" Vundle Settings
+" Plug
"-----------------------------------------------------------------------------------------------------------------------
-set nocompatible " be iMproved
-filetype off " required!
-
-"Plugins
call plug#begin('~/.vim/plugged')
+
"General vim Plugins
Plug 'nathanaelkane/vim-indent-guides'
Plug 'scrooloose/nerdtree'
Plug 'scrooloose/nerdcommenter'
Plug 'jistr/vim-nerdtree-tabs'
Plug 'tpope/vim-fugitive'
-Plug 'tpope/vim-unimpaired'
Plug 'terryma/vim-multiple-cursors'
Plug 'scrooloose/syntastic'
Plug 'joonty/vdebug'
Plug 'ctrlpvim/ctrlp.vim'
-Plug 'Shougo/unite.vim'
-Plug 'honza/vim-snippets'
-Plug 'ervandew/supertab'
-Plug 'tsukkee/unite-tag'
-Plug 'gcmt/taboo.vim'
Plug 'tpope/vim-surround'
-Plug 'mattn/emmet-vim'
Plug 'tmhedberg/matchit'
-Plug 'shawncplus/phpcomplete.vim'
-Plug 'StanAngeloff/php.vim'
-Plug 'octol/vim-cpp-enhanced-highlight'
-Plug 'stephpy/vim-yaml'
-Plug 'hdima/python-syntax'
-Plug 'vim-scripts/pep8'
-Plug 'fs111/pydoc.vim'
-Plug 'davidhalter/jedi-vim'
-Plug 'godlygeek/tabular'
Plug 'plasticboy/vim-markdown'
-Plug 'jamessan/vim-gnupg'
+Plug 'thornycrackers/vim-options' " Vim options
+
" Add plugins to &runtimepath
call plug#end()
-filetype plugin indent on " required!
-" Autocomplete
-set omnifunc=syntaxcomplete#Complete
-"-----------------------------------------------------------------------------------------------------------------------
-
-
-"-----------------------------------------------------------------------------------------------------------------------
-" Theme Colors
"-----------------------------------------------------------------------------------------------------------------------
-" Solarized cterm colors
-" 0 = almost dark blue // 1 = red
-" 2 = green // 3 = yellow
-" 4 = light blue // 5 = pink
-" 6 = cyan // 7 = beige
-" 8 = dark blue // 9 = orange
-" 10 = dark grey // 11 = grey
-" 12 = light grey // 13 = purple
-" 14 = grey // 15 = white
-" 16 = black
-"-----------------------------------------------------------------------------------------------------------------------
-
-
-"-----------------------------------------------------------------------------------------------------------------------
-" Module Fixes
-"---------------------------------------------------
-" vdebug window height plugin/python/vdebug/ui/vimui.py to 50 line 62
-"-----------------------------------------------------------------------------------------------------------------------
-
-"-----------------------------------------------------------------------------------------------------------------------
-" Vim Settings
-"-----------------------------------------------------------------------------------------------------------------------
-let mapleader="\\"
-syntax on
-"let g:solarized_termcolors=16
-let g:solarized_termtrans=1
-set background=dark
-colorscheme solarized
-set expandtab "Expand tabs into spaces
-set tabstop=4 "Number of spaces that <Tab> counts for
-set shiftwidth=4 "Number of space for each (auto)indent
-set textwidth=0 "Maximium width of text that is being inserted. 0 disables it
-set history=200 "Set history of : commands
-set autoindent "Copy the indentation from the previous line
-set number "Show line numbers
-set splitright "Vertical splits go to the right
-set splitbelow "Horizontal splits go beneath
-set incsearch "Show search results as they are being typed
-set nowrap "Turn off TextWrapping
-set completeopt=longest,menuone "Autocomplete options
-set wildmode=longest,list "Completion mode for wildchar
-set backspace=indent,eol,start "Backspace over everything in insert mode
-set laststatus=2 "Show the status bar always
-set clipboard=unnamed "Set clipboard to use system clipboard on mac
-set wildignore=*/app/cache,*/vendor,*/env,*.pyc "Ignore useless files
-:command! W w "Save functions for accidental uppercases
-:command! Q q
-:command! Wq wq
-"Highlighting in vim leaves your cursor wherever you ended at
-:vmap y ygv<ESC>
-"Stops flashing from command above and helps save on processing
-set lazyredraw
-"Vim diff commands
-nnoremap <leader>du :diffupdate<CR>
-nnoremap <leader>dd :diffget<CR>
-nnoremap <leader>df :diffput<CR>
-nnoremap - [c
-nnoremap = ]c
-"File ident on xml files
-au FileType xml setlocal equalprg=xmllint\ --format\ --recover\ -\ 2>/dev/null
-"Formating a json file
-com! Formatjson %!python -m json.tool
-"Command for figuring out highlight group
-map ,hi :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" . " FG:" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"fg#")<CR>
-"Twig Syntax
-au BufRead,BufNewFile *.twig set filetype=htmljinja
-au BufRead,BufNewFile *.html set filetype=htmljinja
-"Make sure yml are set as yaml
-au BufNewFile,BufRead *.yml set filetype=yaml
-au BufNewFile,BufRead *.sls set filetype=yaml
-" Set drupal files as php
-au BufNewFile,BufRead *.inc set filetype=php
-au BufNewFile,BufRead *.module set filetype=php
-" Faster saving
-noremap <Leader>w :update<CR>
-" Faster quiting
-noremap <Leader>q :quit<CR>
-" Visually select pasted text
-nnoremap gp `[v`]
-" Python indent
-autocmd FileType python set tabstop=4|set shiftwidth=4
-autocmd FileType htmljinja set tabstop=2|set shiftwidth=2
-autocmd FileType sh set tabstop=2|set shiftwidth=2
-autocmd FileType css set tabstop=2|set shiftwidth=2
-" Stubs open
-:command! ST tabnew ~/.stubs/index.markdown
-" Clean MS Quotes
-:command! QUOTES :%s/”\|“/"/g
-" Yank withouth newlinw
-nmap yY ^y$
-" Move cursor to matched string
-set incsearch
-" Turn off highlight search
-set hlsearch!
-" allows incsearch highlighting for range commands
-cnoremap $t <CR>:t''<CR>
-cnoremap $T <CR>:T''<CR>
-cnoremap $m <CR>:m''<CR>
-cnoremap $M <CR>:M''<CR>
-cnoremap $d <CR>:d<CR>``
-"-----------------------------------------------------------------------------------------------------------------------
"-----------------------------------------------------------------------------------------------------------------------
-" Backup Directories
-set backupdir-=.
-set backupdir+=.
-set backupdir-=~/
-set backupdir^=~/.vim/vim-files/backups/
-set backup
-set directory=~/.vim/vim-files/swaps/
+" Local Options
"-----------------------------------------------------------------------------------------------------------------------
-
-
-"-----------------------------------------------------------------------------------------------------------------------
-" Window Navigation Remaps
+set lazyredraw "Stops flashing from command above and helps save on processing
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
nnoremap <C-]> <C-w><C-]>
-"-----------------------------------------------------------------------------------------------------------------------
-
-
-"-----------------------------------------------------------------------------------------------------------------------
-" Color/Theming Options
-"-----------------------------------------------------------------------------------------------------------------------
-" Highlight for searching (Light Background)
-"hi Search guibg=Green guifg=Black
-"hi Search cterm=NONE ctermfg=Black ctermbg=Green
-" Highlight for searching (Dark Background)
-"hi Search guibg=White guifg=Red
-"hi Search cterm=NONE ctermfg=Red ctermbg=White
-" Vim diff Colors
-highlight DiffAdd cterm=NONE ctermfg=0 ctermbg=2
-highlight DiffDelete cterm=NONE ctermfg=0 ctermbg=1
-highlight DiffChange cterm=NONE ctermfg=0 ctermbg=6
-highlight DiffText cterm=NONE ctermfg=0 ctermbg=6
-" Highligh current cursorline
-hi CursorLineNR cterm=bold ctermfg=226
-" Status line options
-set statusline=
-set statusline+=%1*\ %02c\ "Colnr
-set statusline+=%2*\ » "RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
-set statusline+=%3*\ %<%F\ "File+path
-set statusline+=%2*\«
-set statusline+=%2*\ %=\ %l/%L\ (%02p%%)\ "Rownumber/total (%)
-" Status line colors per mode
-hi User1 ctermfg=226 ctermbg=8 cterm=bold
-hi User3 ctermfg=4 ctermbg=0
-hi User2 ctermfg=6 ctermbg=0
-"-----------------------------------------------------------------------------------------------------------------------
-
-
-
-
-
-
-
-
-
-"-----------------------------------------------------------------------------------------------------------------------
-" Nerdtree Plugin
-"-----------------------------------------------------------------------------------------------------------------------
-let NERDTreeShowLineNumbers=1
-nnoremap <leader>n :NERDTreeTabsToggle<CR>
-let NERDTreeDirArrows=0
-let NERDTreeMapOpenSplit = 's'
-let NERDTreeMapOpenVSplit = 'v'
-let NERDTreeWinSize = 40
-let NERDTreeIgnore = ['\.pyc$']
-
-
-"-----------------------------------------------------------------------------------------------------------------------
-" Emmet Plugin
-"-----------------------------------------------------------------------------------------------------------------------
-let g:use_emmet_complete_tag = 1
-
-
-"-----------------------------------------------------------------------------------------------------------------------
-" Indent Lines Plugin
-"-----------------------------------------------------------------------------------------------------------------------
-let g:indent_guides_enable_on_vim_startup = 1
-let g:indent_guides_auto_colors = 0
-let g:indent_guides_exclude_filetypes =['help', 'nerdtree']
-let g:indent_guides_start_level = 2
-let g:indent_guides_guide_size = 1
-" Indent Lines light background
-"autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd ctermbg=7
-"autocmd VimEnter,Colorscheme * :hi IndentGuidesEven ctermbg=7
-" Indent Line dark background
-autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd ctermbg=0
-autocmd VimEnter,Colorscheme * :hi IndentGuidesEven ctermbg=0
-
-
-"-----------------------------------------------------------------------------------------------------------------------
-" Vdebug Plugin
-"-----------------------------------------------------------------------------------------------------------------------
-let g:vdebug_options = {
-\ "watch_window_style" : 'compact',
-\ "port" : 9000,
-\ "path_maps" : {"/vagrant": "/Users/codyhiar/Sites"},
-\}
-"Delete all breakpoints
-:command! BR BreakpointRemove *
-"-----------------------------------------------------------------------------------------------------------------------
-
-
-"-----------------------------------------------------------------------------------------------------------------------
-" Unite Plugin
-"-----------------------------------------------------------------------------------------------------------------------
-let g:unite_enable_start_insert = 1
-let g:unite_split_rule = "botright"
-let g:unite_force_overwrite_statusline = 0
-let g:unite_winheight = 10
-let g:unite_source_history_yank_enable = 1
-let g:unite_source_rec_max_cache_files=5000
-" Check to see if the plugin is loaded before callinging
-if exists('g:loaded_unite')
- call unite#custom_source('file_rec,file_rec/async,file_mru,file,buffer,grep',
- \ 'ignore_pattern', join([
- \ '\.git/',
- \ ], '\|'))
- call unite#filters#matcher_default#use(['matcher_fuzzy'])
- call unite#filters#sorter_default#use(['sorter_rank'])
-endif
-
-nnoremap <space>s :<C-u>Unite -buffer-name=buffer buffer -winheight=40<cr>
-nnoremap <space>y :<C-u>Unite -buffer-name=yank history/yank -winheight=40<cr>
-" Custom mappings for the unite buffer
-autocmd FileType unite call s:unite_settings()
-function! s:unite_settings()
- " Enable navigation with control-j and control-k in insert mode
- let b:SuperTabDisabled=1
- imap <buffer> <C-j> <Plug>(unite_select_next_line)
- imap <buffer> <C-k> <Plug>(unite_select_previous_line)
- imap <silent><buffer><expr> <C-x> unite#do_action('split')
- imap <silent><buffer><expr> <C-v> unite#do_action('vsplit')
- imap <silent><buffer><expr> <C-t> unite#do_action('tabopen')
-endfunction
-"-----------------------------------------------------------------------------------------------------------------------
-
-
-"-----------------------------------------------------------------------------------------------------------------------
-" CtrlP Plugin
-"-----------------------------------------------------------------------------------------------------------------------
-let g:ctrlp_working_path_mode = 'a'
-let g:ctrlp_by_filename = 1
-let g:ctrlp_status_func = {
- \ 'main': 'CtrlP_main_status',
- \ 'prog': 'CtrlP_progress_status',
- \ }
-" Arguments: focus, byfname, s:regexp, prv, item, nxt, marked
-" a:1 a:2 a:3 a:4 a:5 a:6 a:7
-fu! CtrlP_main_status(...)
- let regex = a:3 ? '%#CtrlP_Violet#regex %*' : ''
- let prv = '%#CtrlP_Purple# '.a:4.' %*'
- let item = '%#CtrlP_IPurple# '.a:5.' %*'
- let nxt = '%#CtrlP_Purple# '.a:6.' %*'
- let byfname = '%#CtrlP_Violet# '.a:2.' %*'
- let dir = '%#CtrlP_Purple# '.fnamemodify(getcwd(), ':~').' %*'
- retu prv . item . nxt . '%#CtrlP_Violet#%=%*%<' . byfname . regex . dir
-endf
-fu! CtrlP_progress_status(...)
- let len = '%#Function# '.a:1.' %*'
- let dir = ' %=%<%#LineNr# '.getcwd().' %*'
- retu len.dir
-endf
-hi CtrlP_Purple ctermfg=7 ctermbg=4
-hi CtrlP_IPurple ctermfg=4 ctermbg=7
-hi CtrlP_Violet ctermfg=4 ctermbg=8
-"-----------------------------------------------------------------------------------------------------------------------
-
-
-
-
-"-----------------------------------------------------------------------------------------------------------------------
-" SuperTab Plugin
-"-----------------------------------------------------------------------------------------------------------------------
-let g:SuperTabMappingForward = '<tab>'
-let g:SuperTabMappingBackward = '<s-tab>'
-let g:SuperTabLongestHighlight = 0
-let g:SuperTabDefaultCompletionType = "<c-x><c-o>"
-"au FileType python set omnifunc=pythoncomplete#Complete
-"-----------------------------------------------------------------------------------------------------------------------
-
-
-
-"-----------------------------------------------------------------------------------------------------------------------
-" Unite Tag
-"-----------------------------------------------------------------------------------------------------------------------
-autocmd BufEnter *
-\ if empty(&buftype)
-\| nnoremap <buffer> <C-]> :<C-u>UniteWithCursorWord -immediately tag<CR>
-\| endif
-let g:unite_source_tag_max_name_length = 80
-let g:unite_source_tag_max_fname_length = 80
-"-----------------------------------------------------------------------------------------------------------------------
-
-
-
-"-----------------------------------------------------------------------------------------------------------------------
-" Fugtive
-"-----------------------------------------------------------------------------------------------------------------------
-nnoremap <leader>gc :Gcommit<CR>
-nnoremap <leader>gd :Gdiff<CR>
-nnoremap <leader>gl :Glog<CR>
-function! ToggleGStatus()
- if buflisted(bufname('.git/index'))
- bd .git/index
- else
- Gstatus
- endif
-endfunction
-command ToggleGStatus :call ToggleGStatus()
-nnoremap <leader>gs :ToggleGStatus<CR>
-
-
-"-----------------------------------------------------------------------------------------------------------------------
-" Python-Syntax
-"-----------------------------------------------------------------------------------------------------------------------
-let python_highlight_all = 1
-
-
-
-"-----------------------------------------------------------------------------------------------------------------------
-" PEP8 Plugin
-"-----------------------------------------------------------------------------------------------------------------------
-let g:pep8_map='<F9>'
-
-
-
-"-----------------------------------------------------------------------------------------------------------------------
-" Jedi
-"-----------------------------------------------------------------------------------------------------------------------
-let g:jedi#popup_on_dot = 0
-let g:jedi#usages_command = 0
-let g:jedi#rename_command = 0
-
-
-"-----------------------------------------------------------------------------------------------------------------------
-" Syntastic
-"-----------------------------------------------------------------------------------------------------------------------
-let g:syntastic_always_populate_loc_list = 1
-let g:syntastic_auto_loc_list = 1
-let g:syntastic_check_on_open = 1
-let g:syntastic_check_on_wq = 1
-
-
-"-----------------------------------------------------------------------------------------------------------------------
-" Markdown
-"-----------------------------------------------------------------------------------------------------------------------
-let g:vim_markdown_folding_disabled=1
-