Skip to content

Commit

Permalink
fix options
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuya OTA committed Jun 12, 2019
1 parent 249bd0d commit 0520d70
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
Binary file added .main.go.swp
Binary file not shown.
18 changes: 13 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ func runVimCS(srvName string, args []string) error {
}
} else {
if *tabFlg {
args = append([]string{"--servername", srvName, "--remote-tab"}, args...)
args = append([]string{"--servername", srvName, "--remote-tab-wait"}, args...)
} else {
args = append([]string{"--servername", srvName, "--remote"}, args...)
args = append([]string{"--servername", srvName, "--remote-wait"}, args...)
}

}
Expand All @@ -115,10 +115,18 @@ func runVimCS(srvName string, args []string) error {
}

func runNvimNVR(args []string) error {
if *tabFlg {
args = append([]string{"--remote-tab-wait"}, args...)
if len(args) == 0 {
if *tabFlg {
args = []string{"--remote-send", `<C-\><C-N>:tabnew<CR>`}
} else {
args = []string{"--remote-send", `<C-\><C-N>:new<CR>`}
}
} else {
args = append([]string{"--remote-wait"}, args...)
if *tabFlg {
args = append([]string{"--remote-tab-wait"}, args...)
} else {
args = append([]string{"--remote-wait"}, args...)
}
}
vim := exec.Command("nvr", args...)

Expand Down

0 comments on commit 0520d70

Please sign in to comment.