默认情况下,Ubuntu 上 GVim 中的剪切/复制/粘贴快捷方式是:
切"+x 复制“+y 粘贴“+gP
我想在 GVim 中使用控制键组合,就像我在 Firefox 和其他 gnome 应用程序中使用的那样。如何配置 GVim 使其像其他 Gnome 应用程序一样工作?
我想使用 Ctrl+Shift+箭头向上/向下移动选择,与其他编辑器类似。目前我的 .vimrc 中的内容如下:
" from https://superuser.com/a/825561
:behave mswin
:set clipboard=unnamedplus
:smap <Del> <C-g>"_d
:smap <C-c> <C-g>y
:smap <C-x> <C-g>x
:imap <C-v> <Esc>pi
:smap <C-v> <C-g>p
:smap <Tab> <C-g>1>
:smap <S-Tab> <C-g>1<
" from https://vi.stackexchange.com/a/2682
nnoremap <C-S-Up> :m-2<CR>
nnoremap <C-S-Down> :m+<CR>
inoremap <C-S-Up> <Esc>:m-2<CR>
inoremap <C-S-Down> <Esc>:m+<CR>
" enable syntax highlighting
syntax enable
" show line numbers
set number
" set tabs to have 4 spaces
set ts=4
" indent when moving to the next line while writing code
set …Run Code Online (Sandbox Code Playgroud)