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
e0213342
Unverified
Commit
e0213342
authored
Nov 20, 2023
by
Þórhallur Sverrisson
Committed by
GitHub
Nov 20, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(vi-mode): add option to disable clipboard (#12037)
parent
6165c257
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
README.md
plugins/vi-mode/README.md
+2
-0
vi-mode.plugin.zsh
plugins/vi-mode/vi-mode.plugin.zsh
+5
-3
No files found.
plugins/vi-mode/README.md
View file @
e0213342
...
...
@@ -37,6 +37,8 @@ plugins=(... vi-mode)
- `INSERT_MODE_INDICATOR`: controls the string displayed when the shell is in insert mode.
See [Mode indicators](#mode-indicators) for details.
- `VI_MODE_DISABLE_CLIPBOARD`: If set, disables clipboard integration on yank/paste
## Mode indicators
*Normal mode* is indicated with a red `<<<` mark at the right prompt, when it
...
...
plugins/vi-mode/vi-mode.plugin.zsh
View file @
e0213342
...
...
@@ -147,17 +147,19 @@ function wrap_clipboard_widgets() {
done
}
wrap_clipboard_widgets copy
\
if
[[
-z
"
${
VI_MODE_DISABLE_CLIPBOARD
:-}
"
]]
;
then
wrap_clipboard_widgets copy
\
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
\
wrap_clipboard_widgets
paste
\
vi-put-
{
before,after
}
\
put-replace-selection
unfunction wrap_clipboard_widgets
unfunction wrap_clipboard_widgets
fi
# if mode indicator wasn't setup by theme, define default, we'll leave INSERT_MODE_INDICATOR empty by default
if
[[
-z
"
$MODE_INDICATOR
"
]]
;
then
...
...
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