Problem Description:Select the specified character in vim to copy/cut/pasteProblem solving:into vim in visual mode, visual mode enters, there can be three ways:(1) In normal mode, the direct key V can enter the default visual mode, you can use v+j/k/h/l for text selectionNote:Use the v command in normal mode to enter visual mode, v+ j/k/h/l for text selectionPress the following key for the selected text:(1.1) d------
In some applications, sometimes when we submit important information such as the Form Content (password), to ensure security, we need to prevent some copy, cut, and paste events, today I made a simple example about blocking copy, cut, and paste events:
1. Disable other webpages and add the following code to the webpage
Program code
2. Disable caching in front-end HTML
Program code
3. Do not cut or screenshot (ie is valid, the principle is to clear the clipboard), you can prohibit simple screenshots.
Program code
4. Right-click the block, Ctrl + n, shift + F10, F5 refresh, and backspace.
Program code
5. Move the mouse in the browser to the toolbar that jumps out of the image
Program codeOr
Program c
copies the current cursor position to the end of the line: y$ Copy the current cursor position to the beginning of the row: y^ copythreeLine: 3yy, that is, from the current cursor + the next two lines. Cut text: You can press Y to copy after selecting the text with V, if you press D to cut, then press p to paste.CutLine: DD cuts the position of the current line cursor to the end of the line: d$ cuts the po
Delete a character after the cursor XDelete a character before the cursor shift+xDeletes the specified number of character digits +xDelete a line of characters DDCut the specified number of rows dd 3DD cut 3 linesActually, it's not erased, but it's kept in the Clipboard.Paste on the line below the cursor pPaste a line on the top of the cursor shift+pWithdraw one step u max drawdown 50 timesFormer further Ctrl+r/////////////////////////////////////////
current row and enter edit modeO: Insert a row on the current line and enter edit modeR: Replace the character at the cursorW Save gg=g Automatic alignment syntaxR: Replacement modeYY: Copy when moving forwardYYY: The current line and the following three rowsP: PasteNYW: copy n wordsU: UndoD: CutDD: Cut one lineNDD: Cut n rowsX: Delete the character of the cursor, equivalent to the [delete] function keyX:
enter edit modeR: Replace the character at the cursorW Save gg=g Automatic alignment syntaxR: Replacement modeYY: Copy when moving forwardYYY: The current line and the following three rowsP: PasteNYW: copy n wordsU: UndoD: CutDD: Cut one lineNDD: Cut n rowsX: Delete the character of the cursor, equivalent to the [delete] function keyX: Delete cursor before character, equivalent to [Backspace]DD: Delete the
, pasteX: Delete one character forwardX: Remove one character backwardsNX: Remove n characters backwardsDD: Which row of the delete/pre-tangent cursorNDD: Delete/Pre-tangent the line after row n rowsYY: The copy cursor is in the rowSmall p: Pastes the copied or pasted content from the line where the cursor is locatedLarge p: Pastes the copied or pasted content from the line where the cursor is locatedNyy: Starts at the line where the cursor is located, copying the n rows downU: Restore previous
In some applications, sometimes when we submit form content such as (password) important information, in order to be secure, we need to block some copy clipping and pasting events, and today we have a simple example to prevent copying cut and paste events:
Copy Code code as follows:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.