Skip to content

Commit

Permalink
NeoVim config improvements
Browse files Browse the repository at this point in the history
* Removed auto-pairs plugin - it only causes difficulties
* Fixed OSC52 yank - no more crashing on "y" key press
* Added abbreviation for binding.pry that I use a lot

Also yet another attempt to fix OSC52 In mosh-tmux environment.
Unfortunately mosh project is abandoned, so there is no chance
mobile-shell/mosh#1054 will be merged.
And those workarounds actually never work.
  • Loading branch information
arg committed Sep 8, 2021
1 parent 4c8445c commit b6b30b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions home/.config/nvim/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ endif

autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'cd' argv()[0] | endif
autocmd TextYankPost * silent! if v:event.operator ==# 'y' | call YankOSC52(join(v:event["regcontents"],"\n")) | endif
" autocmd TextYankPost * if v:event.operator is 'y' && v:event.regname is '+' | execute 'OSCYankReg +' | endif
autocmd TextYankPost * if v:event.operator is 'y' && v:event.regname is '' | execute 'OSCYankReg "' | endif
" autocmd TextYankPost * silent! if v:event.operator ==# 'y' | call YankOSC52(join(v:event["regcontents"],"\n")) | endif
autocmd CursorHold * lua vim.lsp.diagnostic.show_line_diagnostics()
autocmd User LspDiagnosticsChanged call lightline#update()
augroup highlight_yank
autocmd!
autocmd TextYankPost * silent! lua require'vim.highlight'.on_yank("IncSearch", 1000)
augroup END
autocmd FileType text,markdown,mail,gitcommit setlocal spell spelllang=en_us
autocmd FileType ruby iabbrev <buffer> pry binding.pry
" }}}

" Plugins {{{
Expand All @@ -31,7 +34,6 @@ Plug 'junegunn/fzf', { 'dir': '~/.config/fzf', 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'scrooloose/nerdcommenter'
Plug 'janko/vim-test'
Plug 'tmsvg/pear-tree'
Plug 'ojroques/vim-oscyank'
Plug 'hrsh7th/nvim-compe'
call plug#end()
Expand Down
3 changes: 2 additions & 1 deletion home/.tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ set -sg display-time 2000
set -sg escape-time 0
set -sg focus-events on
set -g default-terminal "screen-256color"
set -ga terminal-overrides ',screen-256color:Tc'
set -ag terminal-overrides ",screen-256color:colors=256:Tc"
set -ag terminal-overrides ",screen-256color:Ms=\\E]52;c;%p2%s\\7"
# set -ga terminal-overrides ",xterm-256color*:Tc:kend=\E[F:khome=\E[H:smkx=\E=:rmkx=\E>"
set -wg xterm-keys on
set -g visual-activity off
Expand Down

0 comments on commit b6b30b9

Please sign in to comment.