dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 9d5b787d1a7131b2f8e2aa619cc9a3481d6f43e6
parent 0ede34b05b5a0b67bc6eb4d407bf6dc39abae92f
Author: Anders Damsgaard <andersd@riseup.net>
Date:   Tue,  3 Apr 2018 09:18:23 -0400

Remove reattach-to-namespace dependency in tmux, use system clipboard for vim

Diffstat:
Mlinks/.tmux.conf | 12++++++------
Mlinks/.vim/plugin/keybinds.vim | 4++--
Mlinks/.vim/vimrc | 8+++-----
3 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/links/.tmux.conf b/links/.tmux.conf @@ -136,18 +136,18 @@ bind-key -n -r M-N swap-window -t +1 # Swap window right #### CLIPBOARD # enable reattach-to-user-namespace which fixes pasteboard access and launchctl -if-shell 'uname | grep -qi Darwin' 'set-option -g default-command "reattach-to-user-namespace -l zsh"' bind Space copy-mode # enter copy mode with <C-a><Space> -bind-key -n M-Space copy-mode # enter copy mode with <M-Space> -bind -T copy-mode-vi v send-keys -X begin-selection # start "visual" with v +bind -n M-Space copy-mode # enter copy mode with <M-Space> +bind -T copy-mode-vi v send -X begin-selection # start "visual" with v # Copy (yank) with y if-shell 'uname | grep -qi Linux && which xclip > /dev/null' 'bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "DISPLAY=:0 xclip -i -sel clipboard"' -if-shell 'uname | grep -qi Darwin && which reattach-to-user-namespace > /dev/null' 'bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"' +if-shell 'uname | grep -qi Darwin' 'bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"' -# Paste with p +# Paste with C-a p or M-p if-shell 'uname | grep -qi Linux && which xclip > /dev/null' 'bind p run "DISPLAY=:0 xclip -o | tmux load-buffer - ; tmux paste-buffer"' -if-shell 'uname | grep -qi Darwin && which reattach-to-user-namespace > /dev/null' 'bind p run "reattach-to-user-namespace pbpaste | tmux load-buffer - ; tmux paste-buffer"' +if-shell 'uname | grep -qi Darwin && which reattach-to-user-namespace > /dev/null' 'bind p run "pbpaste | tmux load-buffer - ; tmux paste-buffer"' +if-shell 'uname | grep -qi Darwin' 'bind -n M-p run "pbpaste | tmux load-buffer - ; tmux paste-buffer"' #### LAUNCH PROCESSES diff --git a/links/.vim/plugin/keybinds.vim b/links/.vim/plugin/keybinds.vim @@ -167,8 +167,8 @@ nnoremap <leader>t :Tags<CR> " Copy and paste to system clipboard with <Space>v and <Space>y xnoremap <Leader>y "+y xnoremap <Leader>d "+d -nnoremap <Leader>v "+p -nnoremap <Leader>V "+P +nnoremap <Leader>p "+p +nnoremap <Leader>P "+P xnoremap <Leader>v "+p xnoremap <Leader>V "+P diff --git a/links/.vim/vimrc b/links/.vim/vimrc @@ -3,6 +3,8 @@ source ~/.vim/plugins.vim " make sure that plugins are sourced first set autoread " reload files when changed on disk set backspace=2 " fix broken backspace in some setups set backupcopy=yes " see :help crontab +set clipboard=unnamed " use system clipboard +set dictionary+=/usr/share/dict/words " word completion using Ctrl-x Ctrl-k set expandtab " use the appropriate number of spaces for <Tab> set hlsearch " highlight search matches set ignorecase " case-insensitive search @@ -22,10 +24,6 @@ set textwidth=80 " default line width in number of characters set wildmenu " show a navigable menu for tab completion set wildmode=longest,list,full -" Dictionary word completion using Ctrl-x Ctrl-k -" File from wordlist- (debian) or word- (arch) package -set dictionary+=/usr/share/dict/words - " specify mutt aliases path, autocomplete aliases with @@ in insert mode let g:mutt_aliases_file = '~/.mutt/aliases' @@ -33,7 +31,7 @@ let g:mutt_aliases_file = '~/.mutt/aliases' " number when negative let g:netrw_winsize = 20 -" Use faster :grep alternatives when available +" use faster :grep alternatives when available if executable("rg") set grepprg=rg\ --vimgrep\ --no-heading set grepformat=%f:%l:%c:%m,%f:%l:%m