Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
27b9aed8
Commit
27b9aed8
authored
Jul 01, 2018
by
Pierre Barbier de Reuille
Committed by
Marc Cornellà
Jul 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added "-n name" option to vim-interaction plugin (#4522)
parent
c7d8ad1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
vim-interaction.plugin.zsh
plugins/vim-interaction/vim-interaction.plugin.zsh
+7
-3
No files found.
plugins/vim-interaction/vim-interaction.plugin.zsh
View file @
27b9aed8
...
...
@@ -8,10 +8,11 @@ function callvim
{
if
[[
$#
==
0
]]
;
then
cat
<<
EOH
usage: callvim [-b cmd] [-a cmd] [file ... fileN]
usage: callvim [-b cmd] [-a cmd] [
-n name] [
file ... fileN]
-b cmd Run this command in GVIM before editing the first file
-a cmd Run this command in GVIM after editing the first file
-n name Name of the GVIM server to connect to
file The file to edit
... fileN The other files to add to the argslist
EOH
...
...
@@ -21,13 +22,16 @@ EOH
local
cmd
=
""
local
before
=
"<esc>"
local
after
=
""
while
getopts
":b:a:"
option
local
name
=
"GVIM"
while
getopts
":b:a:n:"
option
do
case
$option
in
a
)
after
=
"
$OPTARG
"
;;
b
)
before
=
"
$OPTARG
"
;;
n
)
name
=
"
$OPTARG
"
;;
esac
done
shift
$((
OPTIND-1
))
...
...
@@ -43,7 +47,7 @@ EOH
files
=
':args! '
"
${
@
:A:q
}
<cr>"
fi
cmd
=
"
$before$files$after
"
gvim
--remote-send
"
$cmd
"
gvim
--
servername
"
$name
"
--
remote-send
"
$cmd
"
if
typeset
-f
postCallVim
>
/dev/null
;
then
postCallVim
fi
...
...
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