Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
df80a2da
Unverified
Commit
df80a2da
authored
Oct 02, 2023
by
bretello
Committed by
GitHub
Oct 02, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(vi-mode): copy to clipboard when using `vi-change*` and `vi-yank*` widgets (#11861)
parent
fea4584c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
README.md
plugins/vi-mode/README.md
+6
-0
vi-mode.plugin.zsh
plugins/vi-mode/vi-mode.plugin.zsh
+9
-2
No files found.
plugins/vi-mode/README.md
View file @
df80a2da
...
@@ -144,11 +144,17 @@ NOTE: this used to be bound to `v`. That is now the default (`visual-mode`).
...
@@ -144,11 +144,17 @@ NOTE: this used to be bound to `v`. That is now the default (`visual-mode`).
- `c{motion}` : Delete {motion} text and start insert
- `c{motion}` : Delete {motion} text and start insert
- `cc` : Delete line and start insert
- `cc` : Delete line and start insert
- `C` : Delete to the end of the line and start insert
- `C` : Delete to the end of the line and start insert
- `P` : Insert the contents of the clipboard before the cursor
- `p` : Insert the contents of the clipboard after the cursor
- `r{char}` : Replace the character under the cursor with {char}
- `r{char}` : Replace the character under the cursor with {char}
- `R` : Enter replace mode: Each character replaces existing one
- `R` : Enter replace mode: Each character replaces existing one
- `x` : Delete `count` characters under and after the cursor
- `x` : Delete `count` characters under and after the cursor
- `X` : Delete `count` characters before the cursor
- `X` : Delete `count` characters before the cursor
NOTE: delete/kill commands (`dd`, `D`, `c{motion}`, `C`, `x`,`X`) and yank commands
(`y`, `Y`) will copy to the clipboard. Contents can then be put back using paste commands
(`P`, `p`).
## Known issues
## Known issues
### Low `$KEYTIMEOUT`
### Low `$KEYTIMEOUT`
...
...
plugins/vi-mode/vi-mode.plugin.zsh
View file @
df80a2da
...
@@ -147,8 +147,15 @@ function wrap_clipboard_widgets() {
...
@@ -147,8 +147,15 @@ function wrap_clipboard_widgets() {
done
done
}
}
wrap_clipboard_widgets copy vi-yank vi-yank-eol vi-backward-kill-word vi-change-whole-line vi-delete vi-delete-char
wrap_clipboard_widgets copy
\
wrap_clipboard_widgets
paste
vi-put-
{
before,after
}
vi-yank vi-yank-eol vi-yank-whole-line
\
vi-change vi-change-eol vi-change-whole-line
\
vi-kill-line vi-kill-eol vi-backward-kill-word
\
vi-delete vi-delete-char vi-backward-delete-char
wrap_clipboard_widgets
paste
\
vi-put-
{
before,after
}
unfunction wrap_clipboard_widgets
unfunction wrap_clipboard_widgets
# if mode indicator wasn't setup by theme, define default, we'll leave INSERT_MODE_INDICATOR empty by default
# if mode indicator wasn't setup by theme, define default, we'll leave INSERT_MODE_INDICATOR empty by default
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment