diff --git a/.vimrc b/.vimrc index b32445d..1956c7a 100644 --- a/.vimrc +++ b/.vimrc @@ -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 = "\Ptmux;\\]50;CursorShape=1\x7\\\" - let &t_EI = "\Ptmux;\\]50;CursorShape=0\x7\\\" -else - let &t_SI = "\]50;CursorShape=1\x7" - let &t_EI = "\]50;CursorShape=0\x7" -endif - nnoremap :FZF 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 = "\Ptmux;\\]50;CursorShape=1\x7\\\" + let &t_EI = "\Ptmux;\\]50;CursorShape=0\x7\\\" +else + let &t_SI = "\]50;CursorShape=1\x7" + let &t_EI = "\]50;CursorShape=0\x7" +endif