added Ctrl+C from vim visual mode

This commit is contained in:
ADRN 2023-11-18 14:18:12 +01:00
parent 4d3e3ba078
commit 379bb99498

15
vimrc
View file

@ -81,6 +81,11 @@ let g:airline_powerline_fonts=1 " Make airline use powerline fonts (pretty arrow
" Allow saving of files as sudo when I forgot to start vim using sudo. " Allow saving of files as sudo when I forgot to start vim using sudo.
cmap w!! w !sudo tee > /dev/null % cmap w!! w !sudo tee > /dev/null %
" Map CAPSLOCK to Escape in insert mode?
" Wrap move left/right to end of last line/beginning of the next one
set whichwrap+=<,>,h,l,[,]
" Do not create swap files " Do not create swap files
set nobackup set nobackup
set noswapfile set noswapfile
@ -93,6 +98,16 @@ augroup numbertoggle autocmd!
autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
augroup END augroup END
" Yank vim text to system & selection clipboard with Ctrl+C
" Paste with Ctrl+V
" Requires `gvim` that is the following flags to your `vim --version`
" +clipboard
" +X11
" +xterm_clipboard
" From https://www.youtube.com/watch?v=E_rbfQqrm7g
vnoremap <C-c> "*y :let @+=@*<CR>
map <C-v> "+P
" You wanna suffer? Disable arrow keys " You wanna suffer? Disable arrow keys
" noremap <Up> <NOP> " noremap <Up> <NOP>
" noremap <Down> <NOP> " noremap <Down> <NOP>