3 The plugin presents a function called `callvim` whose usage is:
5 usage: callvim [-b cmd] [-a cmd] [file ... fileN]
7 -b cmd Run this command in GVIM before editing the first file
8 -a cmd Run this command in GVIM after editing the first file
10 ... fileN The other files to add to the argslist
14 The idea for this script is to give you some decent interaction with a running
15 GVim session. Normally you'll be running around your filesystem doing any
16 number of amazing things and you'll need to load some files into GVim for
17 editing, inspecting, destruction, or other bits of mayhem. This script lets you
22 There are a few aliases presented as well:
24 * `v` A shorthand for `callvim`
25 * `vvsp` Edits the passed in file but first makes a vertical split
26 * `vhsp` Edits the passed in file but first makes a horizontal split
30 At the end of the `callvim` function we invoke the `postCallVim` function if it
31 exists. If you're using MacVim, for example, you could define a function that
32 brings window focus to it after the file is loaded:
36 osascript -e 'tell application "MacVim" to activate'
39 This'll be different depending on your OS / Window Manager.
43 This will load `/tmp/myfile.scala` into the running GVim session:
47 This will load it after first doing a vertical split:
49 > vvsp /tmp/myfile.scala
51 > v -b':vsp' /tmp/myfile.scala
53 This will load it after doing a horizontal split, then moving to the bottom of
56 > vhsp -aG /tmp/myfile.scala
58 > v -b':sp' -aG /tmp/myfile.scala
60 This will load the file and then copy the first line to the end (Why you would
61 ever want to do this... I dunno):
63 > v -a':1t$' /tmp/myfile.scala
65 And this will load all of the `*.txt` files into the args list:
69 If you want to load files into areas that are already split, use one of the
72 # Do a ':wincmd h' first
73 > vh /tmp/myfile.scala
75 # Do a ':wincmd j' first
76 > vj /tmp/myfile.scala
78 # Do a ':wincmd k' first
79 > vk /tmp/myfile.scala
81 # Do a ':wincmd l' first
82 > vl /tmp/myfile.scala