From 25d274e48ca31fee13067bc1ffd6927abed22526 Mon Sep 17 00:00:00 2001 From: Joey Yakimowich-Payne Date: Thu, 6 May 2021 15:47:19 -0600 Subject: [PATCH] Update --- .config/nvim/init.vim | 50 ++++++++++++++++++++++++++++++++++++++++--- .tmux.conf | 8 ++++--- 2 files changed, 52 insertions(+), 6 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index ac9ab48..3d0a30f 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -47,7 +47,6 @@ set history=10000 set foldmethod=indent set foldlevel=99 let g:pydiction_location='/home/joey/.vim/bundle/pydiction/complete-dict' -let g:python_version_2 = 1 let g:jsx_ext_required = 0 let g:asyncrun_auto = "make" let g:syntastic_enable_elixir_checker = 1 @@ -141,7 +140,7 @@ command U :%s#\C\(\<\u[a-z0-9]\+\|[a-z0-9]\+\)\(\u\)#\l\1_\l\2#g map y "*y map p "*p -nmap =j :%!python -m json.tool +nmap =j :%!python3 -m json.tool if !exists("autocommands_loaded") let autocommands_loaded = 1 @@ -192,6 +191,8 @@ endf nn :call JumpToDef() ino :call JumpToDef()i +nn :Rg + autocmd FileType ocaml nmap :MerlinTypeOf " replace currently selected text with default register @@ -447,6 +448,49 @@ let g:asyncomplete_auto_popup = 0 au User asyncomplete_setup call asyncomplete#register_source({ \ 'name': 'nim', \ 'whitelist': ['nim'], - \ 'triggers': {'*': ['.'] }, + \ 'triggers': {'nim': ['.'] }, \ 'completor': {opt, ctx -> nim#suggest#sug#GetAllCandidates({start, candidates -> asyncomplete#complete(opt['name'], ctx, start, candidates)})} \ }) + +inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? "\" : "\" +imap . .(asyncomplete_force_refresh) + +" let g:asyncomplete_auto_popup = 0 + +function! s:check_back_space() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~ '\s' +endfunction + +inoremap + \ pumvisible() ? "\" : + \ check_back_space() ? "\" : + \ asyncomplete#force_refresh() + +inoremap pumvisible() ? "\" : "\" +autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif +set completeopt+=preview +set rtp+=/usr/local/opt/fzf +function! WrapForTmux(s) + if !exists('$TMUX') + return a:s + endif + + let tmux_start = "\Ptmux;" + let tmux_end = "\\\" + + return tmux_start . substitute(a:s, "\", "\\", 'g') . tmux_end +endfunction + +let &t_SI .= WrapForTmux("\[?2004h") +let &t_EI .= WrapForTmux("\[?2004l") + +function! XTermPasteBegin() + set pastetoggle=[201~ + set paste + return "" +endfunction + +inoremap [200~ XTermPasteBegin() diff --git a/.tmux.conf b/.tmux.conf index 7fd46b1..7978014 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -9,10 +9,12 @@ # -- general ------------------------------------------------------------------- # Add truecolor support -set-option -ga terminal-overrides ",xterm-256color:Tc" +set-option -s default-terminal "tmux-256color" +set-option -sa terminal-overrides ",xterm-256color:RGB" +set-option -sa terminal-overrides ",xterm-255color*:Tc" # Default terminal is 256 colors -set -g default-terminal "screen-256color" # colors! +#set -g default-terminal "screen-256color" # colors! setw -g xterm-keys on set -s escape-time 10 # faster command sequences set -sg repeat-time 600 # increase repeat timeout @@ -182,7 +184,7 @@ bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" -bind-key -n 'C-\' if-shell "$is_vim" "send-keys C-\\" "select-pane -l" +bind-key -n 'C-\' if-shell "$is_vim" "send-keys 'C-\\'" "select-pane -l" bind-key -T copy-mode-vi C-h select-pane -L bind-key -T copy-mode-vi C-j select-pane -D bind-key -T copy-mode-vi C-k select-pane -U