From 673f7009c8a6dcdbc8927fde4ba1eabdc5fff42f Mon Sep 17 00:00:00 2001 From: Sonny Bakker Date: Fri, 8 Dec 2017 19:21:32 +0100 Subject: [PATCH] Tmux version specific vim bindings --- tmux/.tmux.conf | 20 ++- vim/.netrwhist | 4 + .../Development=+Python=+OMX_GUI=+app.py= | 121 ++++++++++++++++ .../~=+Development=+Python=+OMX_GUI=+app.py= | 131 ++++++++++++++++++ ...opment=+Python=+OMX_GUI=+custom_thread.py= | 123 ++++++++++++++++ ...=+Development=+Python=+OMX_GUI=+status.py= | 121 ++++++++++++++++ ...+Development=+Python=+OMX_GUI=+youtube.py= | 125 +++++++++++++++++ 7 files changed, 640 insertions(+), 5 deletions(-) create mode 100644 vim/.netrwhist create mode 100644 vim/view/Development=+Python=+OMX_GUI=+app.py= create mode 100644 vim/view/~=+Development=+Python=+OMX_GUI=+app.py= create mode 100644 vim/view/~=+Development=+Python=+OMX_GUI=+custom_thread.py= create mode 100644 vim/view/~=+Development=+Python=+OMX_GUI=+status.py= create mode 100644 vim/view/~=+Development=+Python=+OMX_GUI=+youtube.py= diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 9a2fe9c..7d1038a 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -1,12 +1,22 @@ # use vim copy/paste keybindings setw -g mode-keys vi -# needs tmux 2.4 -bind-key -T copy-mode-vi 'v' send -X begin-selection -bind-key -T copy-mode-vi 'V' send -X select-line -bind-key -T copy-mode-vi 'r' send -X rectangle-toggle # needs xclip for system clipboard -bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "xclip -in -selection clipboard" +run-shell "tmux setenv -g TMUX_VERSION $(tmux -V | cut -c 6-)" +if-shell -b '[ "$(echo "$TMUX_VERSION < 2.4" | bc)" = 1 ]' \ + "bind-key Escape copy-mode; \ + bind-key -t vi-copy Escape cancel; \ + bind-key p paste-buffer; \ + bind-key -t vi-copy v begin-selection; \ + bind-key -t vi-copy V select-line; \ + bind-key -t vi-copy r rectangle-toggle; \ + bind -t vi-copy y copy-pipe 'xclip -in -selection clipboard'" + +if-shell -b '[ "$(echo "$TMUX_VERSION >= 2.4" | bc)" = 1 ]' \ + "bind-key -T copy-mode-vi 'v' send -X begin-selection; \ + bind-key -T copy-mode-vi 'V' send -X select-line; \ + bind-key -T copy-mode-vi 'r' send -X rectangle-toggle; \ + bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'" # split panes using | and - bind | split-window -h diff --git a/vim/.netrwhist b/vim/.netrwhist new file mode 100644 index 0000000..76bdb89 --- /dev/null +++ b/vim/.netrwhist @@ -0,0 +1,4 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhist_cnt =2 +let g:netrw_dirhist_1='/home/platvoeten/dotfiles/vim/ftplugin' +let g:netrw_dirhist_2='/home/platvoeten' diff --git a/vim/view/Development=+Python=+OMX_GUI=+app.py= b/vim/view/Development=+Python=+OMX_GUI=+app.py= new file mode 100644 index 0000000..6ef5f6d --- /dev/null +++ b/vim/view/Development=+Python=+OMX_GUI=+app.py= @@ -0,0 +1,121 @@ +let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0 +argglobal +setlocal keymap= +setlocal noarabic +setlocal autoindent +setlocal backupcopy= +setlocal balloonexpr= +setlocal nobinary +setlocal nobreakindent +setlocal breakindentopt= +setlocal bufhidden= +setlocal buflisted +setlocal buftype= +setlocal nocindent +setlocal cinkeys=0{,0},0),:,!^F,o,O,e +setlocal cinoptions= +setlocal cinwords=if,else,while,do,for,switch +setlocal colorcolumn=80 +setlocal comments=b:#,fb:- +setlocal commentstring=#\ %s +setlocal complete=.,w,b,u,t,i +setlocal concealcursor= +setlocal conceallevel=0 +setlocal completefunc= +setlocal nocopyindent +setlocal cryptmethod= +setlocal nocursorbind +setlocal nocursorcolumn +setlocal cursorline +setlocal define= +setlocal dictionary= +setlocal nodiff +setlocal equalprg= +setlocal errorformat= +setlocal expandtab +if &filetype != 'python' +setlocal filetype=python +endif +setlocal fixendofline +setlocal foldcolumn=0 +setlocal foldenable +setlocal foldexpr=0 +setlocal foldignore=# +setlocal foldlevel=20 +setlocal foldmarker={{{,}}} +setlocal foldmethod=indent +setlocal foldminlines=1 +setlocal foldnestmax=20 +setlocal foldtext=foldtext() +setlocal formatexpr= +setlocal formatoptions=tcq +setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* +setlocal formatprg= +setlocal grepprg= +setlocal iminsert=2 +setlocal imsearch=2 +setlocal include=^\\s*\\(from\\|import\\) +setlocal includeexpr=substitute(v:fname,'\\.','/','g') +setlocal indentexpr=GetPythonIndent(v:lnum) +setlocal indentkeys=0{,0},:,!^F,o,O,e,<:>,=elif,=except +setlocal noinfercase +setlocal iskeyword=@,48-57,_,192-255 +setlocal keywordprg=pydoc +setlocal linebreak +setlocal nolisp +setlocal lispwords= +setlocal nolist +setlocal makeencoding= +setlocal makeprg= +setlocal matchpairs=(:),{:},[:] +setlocal modeline +setlocal modifiable +setlocal nrformats=bin,octal,hex +setlocal number +setlocal numberwidth=4 +setlocal omnifunc=pythoncomplete#Complete +setlocal path= +setlocal nopreserveindent +setlocal nopreviewwindow +setlocal quoteescape=\\ +setlocal noreadonly +setlocal norelativenumber +setlocal norightleft +setlocal rightleftcmd=search +setlocal noscrollbind +setlocal shiftwidth=4 +setlocal noshortname +setlocal signcolumn=auto +setlocal nosmartindent +setlocal softtabstop=4 +setlocal nospell +setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ +setlocal spellfile= +setlocal spelllang=en +setlocal statusline= +setlocal suffixesadd=.py +setlocal noswapfile +setlocal synmaxcol=3000 +if &syntax != 'python' +setlocal syntax=python +endif +setlocal tabstop=4 +setlocal tagcase= +setlocal tags= +setlocal textwidth=0 +setlocal thesaurus= +setlocal noundofile +setlocal undolevels=-123456 +setlocal nowinfixheight +setlocal nowinfixwidth +setlocal wrap +setlocal wrapmargin=0 +let s:l = 1 - ((0 * winheight(0) + 18) / 37) +if s:l < 1 | let s:l = 1 | endif +exe s:l +normal! zt +1 +normal! 0 +let &so = s:so_save | let &siso = s:siso_save +doautoall SessionLoadPost +" vim: set ft=vim : diff --git a/vim/view/~=+Development=+Python=+OMX_GUI=+app.py= b/vim/view/~=+Development=+Python=+OMX_GUI=+app.py= new file mode 100644 index 0000000..cb46e76 --- /dev/null +++ b/vim/view/~=+Development=+Python=+OMX_GUI=+app.py= @@ -0,0 +1,131 @@ +let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0 +argglobal +setlocal keymap= +setlocal noarabic +setlocal autoindent +setlocal backupcopy= +setlocal balloonexpr=netrw#BalloonHelp() +setlocal nobinary +setlocal nobreakindent +setlocal breakindentopt= +setlocal bufhidden=hide +setlocal buflisted +setlocal buftype= +setlocal nocindent +setlocal cinkeys=0{,0},0),:,!^F,o,O,e +setlocal cinoptions= +setlocal cinwords=if,else,while,do,for,switch +setlocal colorcolumn=80 +setlocal comments=b:#,fb:- +setlocal commentstring=#\ %s +setlocal complete=.,w,b,u,t,i +setlocal concealcursor= +setlocal conceallevel=0 +setlocal completefunc= +setlocal nocopyindent +setlocal cryptmethod= +setlocal nocursorbind +setlocal nocursorcolumn +setlocal cursorline +setlocal define= +setlocal dictionary= +setlocal nodiff +setlocal equalprg= +setlocal errorformat= +setlocal expandtab +if &filetype != 'python' +setlocal filetype=python +endif +setlocal fixendofline +setlocal foldcolumn=0 +setlocal foldenable +setlocal foldexpr=0 +setlocal foldignore=# +setlocal foldlevel=20 +setlocal foldmarker={{{,}}} +setlocal foldmethod=indent +setlocal foldminlines=1 +setlocal foldnestmax=20 +setlocal foldtext=foldtext() +setlocal formatexpr= +setlocal formatoptions=tcq +setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* +setlocal formatprg= +setlocal grepprg= +setlocal iminsert=2 +setlocal imsearch=2 +setlocal include=^\\s*\\(from\\|import\\) +setlocal includeexpr=substitute(v:fname,'\\.','/','g') +setlocal indentexpr=GetPythonIndent(v:lnum) +setlocal indentkeys=0{,0},:,!^F,o,O,e,<:>,=elif,=except +setlocal noinfercase +setlocal iskeyword=@,48-57,_,192-255 +setlocal keywordprg=pydoc +setlocal linebreak +setlocal nolisp +setlocal lispwords= +setlocal nolist +setlocal makeencoding= +setlocal makeprg= +setlocal matchpairs=(:),{:},[:] +setlocal modeline +setlocal modifiable +setlocal nrformats=bin,octal,hex +setlocal number +setlocal numberwidth=4 +setlocal omnifunc=pythoncomplete#Complete +setlocal path= +setlocal nopreserveindent +setlocal nopreviewwindow +setlocal quoteescape=\\ +setlocal noreadonly +setlocal norelativenumber +setlocal norightleft +setlocal rightleftcmd=search +setlocal noscrollbind +setlocal shiftwidth=4 +setlocal noshortname +setlocal signcolumn=auto +setlocal nosmartindent +setlocal softtabstop=4 +setlocal nospell +setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ +setlocal spellfile= +setlocal spelllang=en +setlocal statusline= +setlocal suffixesadd=.py +setlocal noswapfile +setlocal synmaxcol=3000 +if &syntax != 'python' +setlocal syntax=python +endif +setlocal tabstop=4 +setlocal tagcase= +setlocal tags= +setlocal textwidth=0 +setlocal thesaurus= +setlocal noundofile +setlocal undolevels=-123456 +setlocal nowinfixheight +setlocal nowinfixwidth +setlocal wrap +setlocal wrapmargin=0 +83 +normal! zo +104 +normal! zo +106 +normal! zo +124 +normal! zo +152 +normal! zo +let s:l = 40 - ((22 * winheight(0) + 18) / 37) +if s:l < 1 | let s:l = 1 | endif +exe s:l +normal! zt +40 +normal! 0 +let &so = s:so_save | let &siso = s:siso_save +doautoall SessionLoadPost +" vim: set ft=vim : diff --git a/vim/view/~=+Development=+Python=+OMX_GUI=+custom_thread.py= b/vim/view/~=+Development=+Python=+OMX_GUI=+custom_thread.py= new file mode 100644 index 0000000..5b0c63d --- /dev/null +++ b/vim/view/~=+Development=+Python=+OMX_GUI=+custom_thread.py= @@ -0,0 +1,123 @@ +let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0 +argglobal +setlocal keymap= +setlocal noarabic +setlocal autoindent +setlocal backupcopy= +setlocal balloonexpr= +setlocal nobinary +setlocal nobreakindent +setlocal breakindentopt= +setlocal bufhidden= +setlocal buflisted +setlocal buftype= +setlocal nocindent +setlocal cinkeys=0{,0},0),:,!^F,o,O,e +setlocal cinoptions= +setlocal cinwords=if,else,while,do,for,switch +setlocal colorcolumn=80 +setlocal comments=b:#,fb:- +setlocal commentstring=#\ %s +setlocal complete=.,w,b,u,t,i +setlocal concealcursor= +setlocal conceallevel=0 +setlocal completefunc= +setlocal nocopyindent +setlocal cryptmethod= +setlocal nocursorbind +setlocal nocursorcolumn +setlocal cursorline +setlocal define= +setlocal dictionary= +setlocal nodiff +setlocal equalprg= +setlocal errorformat= +setlocal expandtab +if &filetype != 'python' +setlocal filetype=python +endif +setlocal fixendofline +setlocal foldcolumn=0 +setlocal foldenable +setlocal foldexpr=0 +setlocal foldignore=# +setlocal foldlevel=20 +setlocal foldmarker={{{,}}} +setlocal foldmethod=indent +setlocal foldminlines=1 +setlocal foldnestmax=20 +setlocal foldtext=foldtext() +setlocal formatexpr= +setlocal formatoptions=tcq +setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* +setlocal formatprg= +setlocal grepprg= +setlocal iminsert=2 +setlocal imsearch=2 +setlocal include=^\\s*\\(from\\|import\\) +setlocal includeexpr=substitute(v:fname,'\\.','/','g') +setlocal indentexpr=GetPythonIndent(v:lnum) +setlocal indentkeys=0{,0},:,!^F,o,O,e,<:>,=elif,=except +setlocal noinfercase +setlocal iskeyword=@,48-57,_,192-255 +setlocal keywordprg=pydoc +setlocal linebreak +setlocal nolisp +setlocal lispwords= +setlocal nolist +setlocal makeencoding= +setlocal makeprg= +setlocal matchpairs=(:),{:},[:] +setlocal modeline +setlocal modifiable +setlocal nrformats=bin,octal,hex +setlocal number +setlocal numberwidth=4 +setlocal omnifunc=pythoncomplete#Complete +setlocal path= +setlocal nopreserveindent +setlocal nopreviewwindow +setlocal quoteescape=\\ +setlocal noreadonly +setlocal norelativenumber +setlocal norightleft +setlocal rightleftcmd=search +setlocal noscrollbind +setlocal shiftwidth=4 +setlocal noshortname +setlocal signcolumn=auto +setlocal nosmartindent +setlocal softtabstop=4 +setlocal nospell +setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ +setlocal spellfile= +setlocal spelllang=en +setlocal statusline= +setlocal suffixesadd=.py +setlocal noswapfile +setlocal synmaxcol=3000 +if &syntax != 'python' +setlocal syntax=python +endif +setlocal tabstop=4 +setlocal tagcase= +setlocal tags= +setlocal textwidth=0 +setlocal thesaurus= +setlocal noundofile +setlocal undolevels=-123456 +setlocal nowinfixheight +setlocal nowinfixwidth +setlocal wrap +setlocal wrapmargin=0 +4 +normal! zo +let s:l = 6 - ((5 * winheight(0) + 18) / 37) +if s:l < 1 | let s:l = 1 | endif +exe s:l +normal! zt +6 +normal! 09| +let &so = s:so_save | let &siso = s:siso_save +doautoall SessionLoadPost +" vim: set ft=vim : diff --git a/vim/view/~=+Development=+Python=+OMX_GUI=+status.py= b/vim/view/~=+Development=+Python=+OMX_GUI=+status.py= new file mode 100644 index 0000000..6ef5f6d --- /dev/null +++ b/vim/view/~=+Development=+Python=+OMX_GUI=+status.py= @@ -0,0 +1,121 @@ +let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0 +argglobal +setlocal keymap= +setlocal noarabic +setlocal autoindent +setlocal backupcopy= +setlocal balloonexpr= +setlocal nobinary +setlocal nobreakindent +setlocal breakindentopt= +setlocal bufhidden= +setlocal buflisted +setlocal buftype= +setlocal nocindent +setlocal cinkeys=0{,0},0),:,!^F,o,O,e +setlocal cinoptions= +setlocal cinwords=if,else,while,do,for,switch +setlocal colorcolumn=80 +setlocal comments=b:#,fb:- +setlocal commentstring=#\ %s +setlocal complete=.,w,b,u,t,i +setlocal concealcursor= +setlocal conceallevel=0 +setlocal completefunc= +setlocal nocopyindent +setlocal cryptmethod= +setlocal nocursorbind +setlocal nocursorcolumn +setlocal cursorline +setlocal define= +setlocal dictionary= +setlocal nodiff +setlocal equalprg= +setlocal errorformat= +setlocal expandtab +if &filetype != 'python' +setlocal filetype=python +endif +setlocal fixendofline +setlocal foldcolumn=0 +setlocal foldenable +setlocal foldexpr=0 +setlocal foldignore=# +setlocal foldlevel=20 +setlocal foldmarker={{{,}}} +setlocal foldmethod=indent +setlocal foldminlines=1 +setlocal foldnestmax=20 +setlocal foldtext=foldtext() +setlocal formatexpr= +setlocal formatoptions=tcq +setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* +setlocal formatprg= +setlocal grepprg= +setlocal iminsert=2 +setlocal imsearch=2 +setlocal include=^\\s*\\(from\\|import\\) +setlocal includeexpr=substitute(v:fname,'\\.','/','g') +setlocal indentexpr=GetPythonIndent(v:lnum) +setlocal indentkeys=0{,0},:,!^F,o,O,e,<:>,=elif,=except +setlocal noinfercase +setlocal iskeyword=@,48-57,_,192-255 +setlocal keywordprg=pydoc +setlocal linebreak +setlocal nolisp +setlocal lispwords= +setlocal nolist +setlocal makeencoding= +setlocal makeprg= +setlocal matchpairs=(:),{:},[:] +setlocal modeline +setlocal modifiable +setlocal nrformats=bin,octal,hex +setlocal number +setlocal numberwidth=4 +setlocal omnifunc=pythoncomplete#Complete +setlocal path= +setlocal nopreserveindent +setlocal nopreviewwindow +setlocal quoteescape=\\ +setlocal noreadonly +setlocal norelativenumber +setlocal norightleft +setlocal rightleftcmd=search +setlocal noscrollbind +setlocal shiftwidth=4 +setlocal noshortname +setlocal signcolumn=auto +setlocal nosmartindent +setlocal softtabstop=4 +setlocal nospell +setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ +setlocal spellfile= +setlocal spelllang=en +setlocal statusline= +setlocal suffixesadd=.py +setlocal noswapfile +setlocal synmaxcol=3000 +if &syntax != 'python' +setlocal syntax=python +endif +setlocal tabstop=4 +setlocal tagcase= +setlocal tags= +setlocal textwidth=0 +setlocal thesaurus= +setlocal noundofile +setlocal undolevels=-123456 +setlocal nowinfixheight +setlocal nowinfixwidth +setlocal wrap +setlocal wrapmargin=0 +let s:l = 1 - ((0 * winheight(0) + 18) / 37) +if s:l < 1 | let s:l = 1 | endif +exe s:l +normal! zt +1 +normal! 0 +let &so = s:so_save | let &siso = s:siso_save +doautoall SessionLoadPost +" vim: set ft=vim : diff --git a/vim/view/~=+Development=+Python=+OMX_GUI=+youtube.py= b/vim/view/~=+Development=+Python=+OMX_GUI=+youtube.py= new file mode 100644 index 0000000..648c60d --- /dev/null +++ b/vim/view/~=+Development=+Python=+OMX_GUI=+youtube.py= @@ -0,0 +1,125 @@ +let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0 +argglobal +setlocal keymap= +setlocal noarabic +setlocal autoindent +setlocal backupcopy= +setlocal balloonexpr= +setlocal nobinary +setlocal nobreakindent +setlocal breakindentopt= +setlocal bufhidden= +setlocal buflisted +setlocal buftype= +setlocal nocindent +setlocal cinkeys=0{,0},0),:,!^F,o,O,e +setlocal cinoptions= +setlocal cinwords=if,else,while,do,for,switch +setlocal colorcolumn=80 +setlocal comments=b:#,fb:- +setlocal commentstring=#\ %s +setlocal complete=.,w,b,u,t,i +setlocal concealcursor= +setlocal conceallevel=0 +setlocal completefunc= +setlocal nocopyindent +setlocal cryptmethod= +setlocal nocursorbind +setlocal nocursorcolumn +setlocal cursorline +setlocal define= +setlocal dictionary= +setlocal nodiff +setlocal equalprg= +setlocal errorformat= +setlocal expandtab +if &filetype != 'python' +setlocal filetype=python +endif +setlocal fixendofline +setlocal foldcolumn=0 +setlocal foldenable +setlocal foldexpr=0 +setlocal foldignore=# +setlocal foldlevel=20 +setlocal foldmarker={{{,}}} +setlocal foldmethod=indent +setlocal foldminlines=1 +setlocal foldnestmax=20 +setlocal foldtext=foldtext() +setlocal formatexpr= +setlocal formatoptions=tcq +setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* +setlocal formatprg= +setlocal grepprg= +setlocal iminsert=2 +setlocal imsearch=2 +setlocal include=^\\s*\\(from\\|import\\) +setlocal includeexpr=substitute(v:fname,'\\.','/','g') +setlocal indentexpr=GetPythonIndent(v:lnum) +setlocal indentkeys=0{,0},:,!^F,o,O,e,<:>,=elif,=except +setlocal noinfercase +setlocal iskeyword=@,48-57,_,192-255 +setlocal keywordprg=pydoc +setlocal linebreak +setlocal nolisp +setlocal lispwords= +setlocal nolist +setlocal makeencoding= +setlocal makeprg= +setlocal matchpairs=(:),{:},[:] +setlocal modeline +setlocal modifiable +setlocal nrformats=bin,octal,hex +setlocal number +setlocal numberwidth=4 +setlocal omnifunc=pythoncomplete#Complete +setlocal path= +setlocal nopreserveindent +setlocal nopreviewwindow +setlocal quoteescape=\\ +setlocal noreadonly +setlocal norelativenumber +setlocal norightleft +setlocal rightleftcmd=search +setlocal noscrollbind +setlocal shiftwidth=4 +setlocal noshortname +setlocal signcolumn=auto +setlocal nosmartindent +setlocal softtabstop=4 +setlocal nospell +setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ +setlocal spellfile= +setlocal spelllang=en +setlocal statusline= +setlocal suffixesadd=.py +setlocal noswapfile +setlocal synmaxcol=3000 +if &syntax != 'python' +setlocal syntax=python +endif +setlocal tabstop=4 +setlocal tagcase= +setlocal tags= +setlocal textwidth=0 +setlocal thesaurus= +setlocal noundofile +setlocal undolevels=-123456 +setlocal nowinfixheight +setlocal nowinfixwidth +setlocal wrap +setlocal wrapmargin=0 +7 +normal! zo +8 +normal! zo +let s:l = 20 - ((19 * winheight(0) + 18) / 37) +if s:l < 1 | let s:l = 1 | endif +exe s:l +normal! zt +20 +normal! 016| +let &so = s:so_save | let &siso = s:siso_save +doautoall SessionLoadPost +" vim: set ft=vim :