put in vimrc:
set clipboard=unnamedplus
source $VIMRUNTIME/mswin.vim
https://github.com/vim/vim/blob/master/runtime/mswin.vim
open a file and ctrl+a ctrl+x
all the words of the file has been cut to clipboard and the file will go blank
But the truth is:
clipboard is empty and file has not changed
PS: ctrl+c does not work in Normal mode, only in Insert mode
9.0.0236
Archlinux Konsole bash
+acl -dnd +listcmds +postscript +termresponse
+arabic -ebcdic +localmap +printer +textobjects
+autocmd +emacs_tags +lua/dyn +profile +textprop
+autochdir +eval +menu -python +timers
-autoservername +ex_extra +mksession +python3/dyn +title
-balloon_eval +extra_search +modify_fname +quickfix -toolbar
+balloon_eval_term -farsi +mouse +reltime +user_commands
-browse +file_in_path -mouseshape +rightleft +vartabs
++builtin_terms +find_in_path +mouse_dec +ruby/dyn +vertsplit
+byte_offset +float +mouse_gpm +scrollbind +vim9script
+channel +folding -mouse_jsbterm +signs +viminfo
+cindent -footer +mouse_netterm +smartindent +virtualedit
-clientserver +fork() +mouse_sgr -sodium +visual
-clipboard +gettext -mouse_sysmouse -sound +visualextra
+cmdline_compl -hangul_input +mouse_urxvt +spell +vreplace
+cmdline_hist +iconv +mouse_xterm +startuptime +wildignore
+cmdline_info +insert_expand +multi_byte +statusline +wildmenu
+comments +ipv6 +multi_lang -sun_workshop +windows
+conceal +job -mzscheme +syntax +writebackup
+cryptv +jumplist +netbeans_intg +tag_binary -X11
+cscope +keymap +num64 -tag_old_static -xfontset
+cursorbind +lambda +packages -tag_any_white -xim
+cursorshape +langmap +path_extra +tcl/dyn -xpm
+dialog_con +libcall +perl/dyn +termguicolors -xsmp
+diff +linebreak +persistent_undo +terminal -xterm_clipboard
+digraphs +lispindent +popupwin +terminfo -xterm_save
No response
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
You mswin cannot be activated by default in Linux. You can remap them.
nnoremap <C-A> ggVG nnoremap <C-X> d nnoremap <C-C> y
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
STEP 1: Install either xsel or xclip with pacman.
STEP 2: Notice that you have not Vim compiled with clipboard (vim --version | grep clip). Either compile Vim with clipboard or install gVim. Because gVim has clipboard support. Also if you want to use TUI Vim you can do so. Because gVim has a command-line version too. Just run vim.
STEP 3: As far as I know mswin is not sourced/activated by default in Linux. You can either source mswin with runtime! mswin or remap them.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@vim-ml You are right. Ctrl+A Ctrl+C and Ctrl+V behave right. But Ctrl+X/Shift+Del do not work.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you were mentioned.![]()
Ctrl+X and some other mappings are enabled only when the clipboard feature is available:
https://github.com/vim/vim/blob/dde77a7c4d72622284dc5fb72557bde42c314fa6/runtime/mswin.vim#L26-L41
Your version result shows that the clipboard feature is disabled: -clipboard.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you were mentioned.![]()
What about using set clipboard=unnamedplus
—
Reply to this email directly, view it on GitHub.
You are receiving this because you were mentioned.![]()
the first 2 steps that I mentioned earlier
—
Reply to this email directly, view it on GitHub.
You are receiving this because you were mentioned.![]()
Can I edit mswin.vim to make it working when -clipboard and set clipboard=unnamedplus?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you were mentioned.![]()
This has turned into a user discussion, therefore closing.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you were mentioned.![]()
Closed #10965 as completed.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you were mentioned.![]()