My vim configuration
git clone https://mcol.xyz/code/vim-misc
Log | Files | Refs | README

commit 476322a7070442c08ae31c3a8b76d3380430e77e
parent 447e5a476568def706135633c6396b3b399d963f
Author: mcol <mcol@posteo.net>
Date:   Sat, 14 Sep 2019 20:23:47 +0100

remove bsptm; disable vimtex and some theming

Diffstat:
Dbsptm | 70----------------------------------------------------------------------
Rplugin/goyo.vim -> plugin/goyo.vim.shelved | 0
Mplugin/theme.vim | 16++++++++--------
Mvimrc | 64+++++++++++++++++++++++++++++-----------------------------------
4 files changed, 37 insertions(+), 113 deletions(-)

diff --git a/bsptm b/bsptm @@ -1,70 +0,0 @@ -#!/bin/sh -# -# binary space partitioning for tmux panes - -# Written in 2016 by Suraj N. Kurapati <https://github.com/sunaku> -# Documented at <https://sunaku.github.io/tmux-layout-dwindle.html> -# and modified - -# parse any orientation flags specified among the command-line arguments -spiral_tb=+ -spiral_lr=+ -modulo_hv=1 is_vertical=true -is_spiral=true - - -# gather information about the current state of the window and its panes -set -- $(tmux list-panes -F '#{pane_id}') -selected_pane=$(tmux display-message -p '#{pane_id}') -window_height=$(tmux display-message -p '#{window_height}') -historic_pane=$(tmux last-pane 2>/dev/null \;\ - display-message -p '#{pane_id}' \;\ - last-pane) ||: # exit 1 - no last pane - -# execute all tmux commands in one shot to avoid flickering and slowness -exec tmux $({ -# flatten current layout, stacking all panes vertically like pancakes -echo select-layout even-vertical -# transform pane stack into binary space partitions of dwindling size -count=1 -for pane_id; do - if [ $count -eq $# ]; then - break # skip last pane because .+1 wraps around to the first pane - elif [ $(( count % 2 )) -eq $modulo_hv ]; then - move_h=+ - if $is_spiral && [ $(( count % 5 )) -gt 2 ] - then move_b=$spiral_lr - fi - else - move_h= - if $is_spiral && [ $(( count % 5 )) -gt 2 ] - then move_b=$spiral_tb - fi - fi - echo resize-pane -t $pane_id -y $window_height # make room for move - echo select-pane -t $pane_id # for relative pane addressing in move - echo move-pane -d -s .+1 -t . ${move_h:+-h} ${move_b:+-b} # move it - count=$(( count + 1 )) -done -# divide available space evenly among panes (binary space partitions) -branch_height=$window_height -count=1 -for pane_id; do - if [ $count -eq $# ] && ! $is_vertical; then - break # skip last pane because it will already be sized correctly - elif [ $(( count % 2 )) -eq 1 ]; then - # every other pane is a branch in the binary space partition tree - parent_height=$branch_height - branch_height=$(( 62 * branch_height / 100 )) - if $is_vertical - then resize_y=$parent_height - else resize_y=$branch_height - fi - echo resize-pane -t $pane_id -y $resize_y - fi - count=$(( count + 1 )) -done -# restore pane selection back to how it was before we did any of this -test -n "$historic_pane" && echo select-pane -t $historic_pane -echo select-pane -t $selected_pane -} | sed 's/$/ ;/') diff --git a/plugin/goyo.vim b/plugin/goyo.vim.shelved diff --git a/plugin/theme.vim b/plugin/theme.vim @@ -63,13 +63,13 @@ augroup CursorLine augroup END " change cursor shape in insert mode -let &t_SI = "\e[4 q" "underscore -let &t_EI = "\e[2 q" "block -augroup myCmds - au! - autocmd VimEnter * silent !echo -ne "\e[2 q" -augroup END +"let &t_SI = "\e[4 q" "underscore +"let &t_EI = "\e[2 q" "block +"augroup myCmds +" au! +" autocmd VimEnter * silent !echo -ne "\e[2 q" +"augroup END " character for split barrier -set fillchars=vert:\ -hi VertSplit cterm=bold term=bold ctermbg=12 +"set fillchars=vert:\ +"hi VertSplit cterm=bold term=bold ctermbg=12 diff --git a/vimrc b/vimrc @@ -22,19 +22,12 @@ Plugin 'VundleVim/Vundle.vim' " required if hostname() == "zenbook" Plugin 'vimwiki/vimwiki' " vimwiki - Plugin 'mclgn/vimlab' " vimlab - Plugin 'lervag/vimtex' " vimtex - Plugin 'linkinpark342/xonsh-vim' " xonsh vim syntax + "Plugin 'mclgn/vimlab' " vimlab + "Plugin 'lervag/vimtex' " vimtex endif -if hostname() == "ardbeg" - Plugin 'mclgn/vimlab' " vimlab -endif - -Plugin 'junegunn/goyo.vim' Plugin 'mclgn/vim-misc' " my vimrc and misc functions Plugin 'mclgn/tide' " tmux ide -Plugin 'nvie/vim-flake8' " python linter call vundle#end() " required filetype plugin indent on " required @@ -108,42 +101,43 @@ au BufReadPost * " netrw nmap <C-n> :Explore<CR> -nmap <C-t> :Texplore<CR> let g:netrw_sort_sequence='[\/]$' " machine specific settings if hostname() == "zenbook" - packadd! matchit " needed for matlab indentation functionality - let g:mlint_path_to_mlint = expand("$HOME") . "/applications/MATLAB/R2018b/bin/glnxa64/mlint" + + "packadd! matchit " needed for matlab indentation functionality + "let g:mlint_path_to_mlint = expand("$HOME") . "/applications/MATLAB/R2018b/bin/glnxa64/mlint" + let g:vimwiki_list = [{'path': '~/work/research/research.wiki/', 'path_html': '~/work/research/research.wiki.html/'}] - let g:vimtex_view_general_viewer = 'qpdfview' - let g:vimtex_view_general_options = '--unique @pdf\#src:@tex:@line:@col' - let g:vimtex_view_general_options_latexmk = '--unique' + "let g:vimtex_view_general_viewer = 'qpdfview' + "let g:vimtex_view_general_options = '--unique @pdf\#src:@tex:@line:@col' + "let g:vimtex_view_general_options_latexmk = '--unique' endif " session saving -let g:vimlab_session = "~/.vim/sessions/matlab-session.vim" - -" Intelligently navigate tmux panes and Vim splits using the same keys. -" See https://sunaku.github.io/tmux-select-pane.html for documentation. -let progname = substitute($VIM, '.*[/\\]', '', '') -if empty(v:servername) - set title titlestring=%{progname}\ [%n]\ %F -else - set title titlestring=%{progname}\ [%{v:servername}]\ [%n]\ %F -endif -if &term =~ '^screen' && !has('nvim') | exe "set t_ts=\e]2; t_fs=\7" | endif - -let g:vimtex_view_qpdfview_hook_callback = 'ViewerCallback' -function! ViewerCallback() dict - VimtexView -endfunction +"let g:vimlab_session = "~/.vim/sessions/matlab-session.vim" + +"" Intelligently navigate tmux panes and Vim splits using the same keys. +"" See https://sunaku.github.io/tmux-select-pane.html for documentation. +"let progname = substitute($VIM, '.*[/\\]', '', '') +"if empty(v:servername) +" set title titlestring=%{progname}\ [%n]\ %F +"else +" set title titlestring=%{progname}\ [%{v:servername}]\ [%n]\ %F +"endif +"if &term =~ '^screen' && !has('nvim') | exe "set t_ts=\e]2; t_fs=\7" | endif +" +"let g:vimtex_view_qpdfview_hook_callback = 'ViewerCallback' +"function! ViewerCallback() dict +" VimtexView +"endfunction " disable middle click paste (restoring xterm middle click open url) -map <MiddleMouse> <Nop> -imap <MiddleMouse> <Nop> +"map <MiddleMouse> <Nop> +"imap <MiddleMouse> <Nop> " flake8 settings -let g:flake8_show_in_gutter=1 -let g:flake8_show_in_file=1 +"let g:flake8_show_in_gutter=1 +"let g:flake8_show_in_file=1