From 4193d20da37ac8505f7da6849be2f375bfd57f46 Mon Sep 17 00:00:00 2001 From: Steffen Rademacker Date: Thu, 2 Nov 2017 11:37:09 +0100 Subject: [PATCH] More minimal vim config, some more software for audio, colors --- install/software.sh | 1 + nvim/bundles.vim | 0 nvim/config.vim | 13 +++++----- nvim/init.vim | 48 +++++++++++++++++-------------------- nvim/statusline.vim | 44 +++++++++++++++++++--------------- tmux.conf | 2 +- zsh/zsh-completions | 2 +- zsh/zsh-syntax-highlighting | 2 +- 8 files changed, 58 insertions(+), 54 deletions(-) delete mode 100644 nvim/bundles.vim diff --git a/install/software.sh b/install/software.sh index 56adf1c2..aa78490a 100755 --- a/install/software.sh +++ b/install/software.sh @@ -20,6 +20,7 @@ brew cask install ocenaudio brew cask install qlcolorcode brew cask install qlstephen brew cask install sequel-pro +brew cask install signal brew cask install sketch brew cask install skype brew cask install slack diff --git a/nvim/bundles.vim b/nvim/bundles.vim deleted file mode 100644 index e69de29b..00000000 diff --git a/nvim/config.vim b/nvim/config.vim index 1eb1a443..0df58d4b 100644 --- a/nvim/config.vim +++ b/nvim/config.vim @@ -44,12 +44,6 @@ set visualbell " don't flicker set wildmode=list:longest,list:full set wrapscan -" hybrid color scheme -let g:hybrid_reduced_contrast = 0 -let g:hybrid_custom_term_colors = 1 -set background=dark -colorscheme hybrid - filetype plugin indent on syntax on @@ -57,3 +51,10 @@ syntax on if &diff syntax off endif + +" hybrid color scheme +let g:hybrid_reduced_contrast = 0 +let g:hybrid_custom_term_colors = 1 +set background=dark +colorscheme hybrid + diff --git a/nvim/init.vim b/nvim/init.vim index bb4c43f7..9bd94387 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -1,34 +1,30 @@ -" if &compatible -" set nocompatible -" endif - language en_US.UTF-8 set runtimepath+=~/.config/nvim/dein/repos/github.com/Shougo/dein.vim " let dein handle all the plugins and bundles call dein#begin(expand('~/.config/nvim/dein')) -call dein#add('Shougo/dein.vim') -call dein#add('Shougo/deoplete.nvim') -call dein#add('Shougo/neosnippet') -call dein#add('christoomey/vim-tmux-navigator') -call dein#add('editorconfig/editorconfig-vim') -call dein#add('junegunn/fzf', { 'merged': 0 }) -call dein#add('junegunn/fzf.vim', { 'depends': 'fzf' }) -call dein#add('junegunn/gv.vim') -call dein#add('maxbrunsfeld/vim-yankstack') -call dein#add('sheerun/vim-polyglot') -call dein#add('tpope/vim-commentary') -call dein#add('tpope/vim-fugitive') -call dein#add('tpope/vim-ragtag') -call dein#add('tpope/vim-repeat') -call dein#add('tpope/vim-surround') -call dein#add('tpope/vim-unimpaired') -call dein#add('tpope/vim-vinegar') -call dein#add('w0ng/vim-hybrid') -call dein#add('w0rp/ale') -call dein#add('webgefrickel/vim-snippets') -call dein#add('wellle/targets.vim') -call dein#add('wellle/tmux-complete.vim') + call dein#add('Shougo/dein.vim') + call dein#add('Shougo/deoplete.nvim') + call dein#add('Shougo/neosnippet') + call dein#add('christoomey/vim-tmux-navigator') + call dein#add('editorconfig/editorconfig-vim') + call dein#add('junegunn/fzf', { 'merged': 0 }) + call dein#add('junegunn/fzf.vim', { 'depends': 'fzf' }) + call dein#add('junegunn/gv.vim') + call dein#add('maxbrunsfeld/vim-yankstack') + call dein#add('sheerun/vim-polyglot') + call dein#add('tpope/vim-commentary') + call dein#add('tpope/vim-fugitive') + call dein#add('tpope/vim-ragtag') + call dein#add('tpope/vim-repeat') + call dein#add('tpope/vim-surround') + call dein#add('tpope/vim-unimpaired') + call dein#add('tpope/vim-vinegar') + call dein#add('w0ng/vim-hybrid') + call dein#add('w0rp/ale') + call dein#add('webgefrickel/vim-snippets') + call dein#add('wellle/targets.vim') + call dein#add('wellle/tmux-complete.vim') call dein#end() " load the default config and mappings diff --git a/nvim/statusline.vim b/nvim/statusline.vim index 3300af80..95f0ba6a 100644 --- a/nvim/statusline.vim +++ b/nvim/statusline.vim @@ -1,23 +1,29 @@ -function! GitBranch() - return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'") +function! StatuslineGitInfo() + let git = fugitive#head() + if git != '' + return ' '.fugitive#head() + else + return '' endfunction -function! StatuslineGit() - let l:branchname = GitBranch() - return strlen(l:branchname) > 0?' '.l:branchname.' ':'' +function! MyStatusLine(mode) + let statusline = "" + if a:mode == 'Enter' + let statusline .= "%#StatusLineColor#" + else + let statusline .= "%#NoStatusLineColor#" + endif + let statusline .= "\ %f\ %m%r\ %{StatuslineGitInfo()}\ " + let statusline .= "%= " + let statusline .= "\ %{toupper(mode())}" + let statusline .= "%= " + let statusline .= "\ %y\ %{&fileencoding?&fileencoding:&encoding}\/\%{&fileformat}\ \|\ %l:%c\ " + return statusline endfunction -set statusline= -set statusline+=%#PmenuSel# -set statusline+=%{StatuslineGit()} -set statusline+=%#LineNr# -set statusline+=\ %f -set statusline+=%m\ -set statusline+=%= -set statusline+=%#CursorColumn# -set statusline+=\ %y -set statusline+=\ %{&fileencoding?&fileencoding:&encoding} -set statusline+=\[%{&fileformat}\] -set statusline+=\ %p%% -set statusline+=\ %l:%c -set statusline+=\ +hi StatusLineColor ctermbg=white ctermfg=black +hi NoStatusLineColor ctermbg=black ctermfg=lightgrey +au WinEnter * setlocal statusline=%!MyStatusLine('Enter') +au WinLeave * setlocal statusline=%!MyStatusLine('Leave') + +set statusline=%!MyStatusLine('Enter') diff --git a/tmux.conf b/tmux.conf index 20eb068b..5358ffa8 100644 --- a/tmux.conf +++ b/tmux.conf @@ -95,4 +95,4 @@ set -g status-left-length 60 set -g status-left '#[fg=brightblack,bg=brightwhite,bold] ❐ #S #[fg=white,bg=default,nobold] ⣿ #P ' set -g status-right '#[fg=white,bg=default,nobold] #(whoami)@#h# #[fg=black,bg=white,nobold] #(date +"%H:%M") ' set -g window-status-format '#[fg=white,bg=default] #I #W' -set -g window-status-current-format '#[fg=black,bg=brightred]#[fg=white,bg=brightred,noreverse,bold] #I #W #[fg=brightred,bg=black,nobold]' +set -g window-status-current-format '#[fg=black,bg=brightgreen]#[fg=black,bg=brightgreen,noreverse,bold] #I #W #[fg=brightgreen,bg=black,nobold]' diff --git a/zsh/zsh-completions b/zsh/zsh-completions index e09fa74f..538f2a02 160000 --- a/zsh/zsh-completions +++ b/zsh/zsh-completions @@ -1 +1 @@ -Subproject commit e09fa74f2d1bf66fd4838294451b42d872c9b71b +Subproject commit 538f2a0287bf8d3775e3745e212e27ad29f5003d diff --git a/zsh/zsh-syntax-highlighting b/zsh/zsh-syntax-highlighting index 11c90819..c41356c3 160000 --- a/zsh/zsh-syntax-highlighting +++ b/zsh/zsh-syntax-highlighting @@ -1 +1 @@ -Subproject commit 11c908196700c00c4662295f44747a5826615c4b +Subproject commit c41356c3f62328122c091b6624cdfc22c62214a4