Remove conditional loading for syntax plugins;

Add some explanatory comments;
Add conditional loading to vim-fugitive;
Move tmux fix to bottom of file
This commit is contained in:
mitchell 2020-02-27 18:09:43 -05:00
parent f6315df2f0
commit 502675d0a4
1 changed files with 25 additions and 22 deletions

47
.vimrc
View File

@ -3,7 +3,7 @@ call plug#begin('~/.vim/plugged')
" Contains lots of sensible configurations, which I have in turn omitted from this file
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-fugitive'
" Always enabled, non-language plugins
Plug 'tpope/vim-eunuch'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-endwise'
@ -15,25 +15,28 @@ Plug 'airblade/vim-gitgutter'
Plug 'vimwiki/vimwiki'
Plug 'junegunn/goyo.vim'
" Conditionally loaded plugins
Plug 'tpope/vim-fugitive', { 'on': ['G', 'Git'] }
Plug 'mileszs/ack.vim', { 'on': 'Ack' }
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'reedes/vim-pencil', { 'on': ['HardPencil', 'SoftPencil'] }
Plug 'junegunn/limelight.vim', { 'on': 'Limelight' }
Plug 'junegunn/fzf', { 'on': 'FZF' }
Plug 'dart-lang/dart-vim-plugin', { 'for': 'dart' }
Plug 'elixir-editors/vim-elixir', { 'for': 'elixir' }
Plug 'dag/vim-fish', { 'for': 'fish' }
Plug 'fatih/vim-go', { 'for': ['go', 'gomod'] }
Plug 'jparise/vim-graphql', { 'for': 'graphql' }
Plug 'pangloss/vim-javascript', { 'for': 'javascript' }
Plug 'vim-ruby/vim-ruby', { 'for': 'ruby' }
Plug 'cespare/vim-toml', { 'for': 'toml' }
Plug 'OmniSharp/omnisharp-vim', { 'for': 'cs' }
Plug 'HerringtonDarkholme/yats.vim', { 'for': 'typescript' }
Plug 'MaxMEllon/vim-jsx-pretty', { 'for': ['typescript', 'javascript'] }
Plug 'fsharp/vim-fsharp', { 'for': 'fsharp' }
Plug 'hashivim/vim-terraform', { 'for': 'terraform' }
" Language specific plugins
Plug 'dart-lang/dart-vim-plugin'
Plug 'elixir-editors/vim-elixir'
Plug 'dag/vim-fish'
Plug 'fatih/vim-go'
Plug 'jparise/vim-graphql'
Plug 'pangloss/vim-javascript'
Plug 'vim-ruby/vim-ruby'
Plug 'cespare/vim-toml'
Plug 'OmniSharp/omnisharp-vim'
Plug 'HerringtonDarkholme/yats.vim'
Plug 'MaxMEllon/vim-jsx-pretty'
Plug 'fsharp/vim-fsharp', { 'do': './make' }
Plug 'hashivim/vim-terraform'
call plug#end()
@ -48,14 +51,6 @@ set textwidth=100
set noshowmode
set background=dark
if exists('$TMUX')
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
else
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
endif
nnoremap <C-p> :FZF<cr>
let mapleader = 'j'
@ -131,3 +126,11 @@ augroup js_ft
autocmd BufNewFile,BufRead *.jsx set ft=javascript
autocmd BufNewFile,BufRead *.tsx set ft=typescript
augroup END
if exists('$TMUX')
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
else
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
endif