vim wayland stuff

This commit is contained in:
Christoph J. Scherr 2023-01-23 01:06:18 +01:00
parent fa172cee05
commit d10998d199
3 changed files with 20 additions and 2 deletions

View File

@ -43,6 +43,12 @@ let mapleader=" "
map <leader>t :echo "leader tested!"<CR>
map <leader>h :noh<CR>
" copy to wayland clipboard when leader is used. (note, install gvim for this)
vnoremap <leader>wy y :call system("wl-copy", @")<CR>
nnoremap <leader>wY Y :call system("wl-copy", @")<CR>
nnoremap <leader>wy y :call system("wl-copy", @")<CR>
nnoremap <leader>wyy yy :call system("wl-copy", @")<CR>
" copy to system clipboard when leader is used. (note, install gvim for this)
vnoremap <leader>y "+y
nnoremap <leader>Y "+Y

View File

@ -43,6 +43,12 @@ let mapleader=" "
map <leader>t :echo "leader tested!"<CR>
map <leader>h :noh<CR>
" copy to wayland clipboard when leader is used. (note, install gvim for this)
vnoremap <leader>wy y :call system("wl-copy", @")<CR>
nnoremap <leader>wY Y :call system("wl-copy", @")<CR>
nnoremap <leader>wy y :call system("wl-copy", @")<CR>
nnoremap <leader>wyy yy :call system("wl-copy", @")<CR>
" copy to system clipboard when leader is used. (note, install gvim for this)
vnoremap <leader>y "+y
nnoremap <leader>Y "+Y
@ -58,7 +64,7 @@ map <Leader>" :vsplit<CR>
" split with <Leader>, then %"
map <Leader>% :split<CR>
" :W to save file as root"
" :W to write file as root"
command W :SudaWrite
" :E to open file as root"

View File

@ -36,6 +36,12 @@ let mapleader=" "
map <leader>t :echo "leader tested!"<CR>
map <leader>h :noh<CR>
" copy to wayland clipboard when leader is used. (note, install gvim for this)
vnoremap <leader>wy y :call system("wl-copy", @")<CR>
nnoremap <leader>wY Y :call system("wl-copy", @")<CR>
nnoremap <leader>wy y :call system("wl-copy", @")<CR>
nnoremap <leader>wyy yy :call system("wl-copy", @")<CR>
" copy to system clipboard when leader is used. (note, install gvim for this)
vnoremap <leader>y "+y
nnoremap <leader>Y "+Y
@ -51,7 +57,7 @@ map <Leader>" :vsplit<CR>
" split with <Leader>, then %"
map <Leader>% :split<CR>
" :W to save file as root"
" :W to write file as root"
command W :w ! sudo tee %
" Set completeopt to have a better completion experience"
set completeopt=menuone,noinsert,noselect