Compare commits

..

3 Commits

Author SHA1 Message Date
b40a9abb59 Only load YouCompleteMe when :TermDebug isn't 2020-04-02 12:14:13 +01:00
8fac5fb74f Add OSC 52 escape sequence yank
If the `tmux` `set-clipboard` option is set to `on` add the `osc52yank`
plugin and change `<leader>y` mapping to use it.
2020-04-02 12:12:57 +01:00
72316785d5 Add CMake reStructuredText block snippet 2020-04-02 12:11:46 +01:00
3 changed files with 27 additions and 5 deletions

View File

@ -9,6 +9,12 @@ def complete(t, opts):
return '|'.join(opts)
endglobal
snippet rst
#[=======================================================================[.rst:
$0
#]=======================================================================]
endsnippet
snippet add_compile_options
add_compile_options($1)
endsnippet

View File

@ -76,11 +76,15 @@ nnoremap <leader>tm :tabmove<Space>
" Clear search highlights
nnoremap <leader><Space> :nohlsearch<CR>
" System clipboard yank/put
noremap <leader>y "+y
noremap <leader>Y "+Y
noremap <leader>p "+p
noremap <leader>P "+P
if g:use_osc52
noremap <leader>y :Oscyank<CR>
else
" System clipboard yank/put
noremap <leader>y "+y
noremap <leader>Y "+Y
noremap <leader>p "+p
noremap <leader>P "+P
endif
" Quickly access spelling menu
inoremap <C-s> <C-g>u<C-X>s

12
vimrc
View File

@ -199,3 +199,15 @@ Pack 'mustache/vim-mustache-handlebars'
Pack 'joshglendenning/vim-caddyfile'
Pack 'kbenzie/vim-khr'
Pack 'jrozner/vim-antlr'
" Plugins for remote integrations
Pack 'greymd/oscyank.vim', {'type': 'opt'}
let g:use_osc52 = trim(system('tmux show-options -g set-clipboard')) ==# 'set-clipboard on'
if g:use_osc52
packadd oscyank.vim
endif
" Load YouComplteMe if termdebug plugin is not loaded.
if !exists(':Termdebug')
packadd YouCompleteMe
endif