tcmdbar.vim : Script for use with Total Commander's button bar
| script karma
Downloaded by 1690
Comments, bugs, improvements
script versions (upload new version)
|This script is only for users of Total Commander and Win32 (maybe Win16).
After proper installation:
Start Total Commander, select one or more files, then click the GVim button.
GVim will create an argument list from the selected files so you can edit them.
Sounds trivial, but it is not.
Works with Ctrl-B (show flattened file list).
Customization for _vimrc (optional)
Open files in windows, tab pages or in diff mode:
:let Tcmdbar_OpenIn = "Windows"
:let Tcmdbar_OpenIn = "Tabs" " ignored in Vim6
:let Tcmdbar_OpenIn = "Diff Mode"
Values may be abbreviated to "win", "tab" and "diff".
You will get an error if you want to open too many files. In this case
Vim will only open windows/tabs for as many files as possible.
-- Please report errors if the script does not work for you! --
2007 Sep 17
If the first argument is always the file list, the plugin actually isn't needed!
You can define the button this way:
Command: <path>\gvim.exe "+n `=readfile(argv(0))`"
In the help:
|1. Put script in any directory where it is _not_ sourced automatically
for example, ~\vimfiles is a good choice
2. Create a button for GVim in TC's button bar (see inside script for details)
Command: <path>\gvim.exe -S ~\vimfiles\tcmdbar.vim
Parameters: %L dummy
- The "dummy" argument is a required dummy file name, its name is fixed!
You should not run into problems if this is an existing file.
- You can also set a variable in the Command Textbox:
<path>\gvim.exe +"let Tcmdbar_OpenIn='Tabs'" -S ~\vimfiles\tcmdbar.vim
Click on the package to download.
ip used for rating: 126.96.36.199
||fix: make it work with file list from "Find Files" dialog + more than one selected "Search in" directories + "Feed to listbox"
fix: proper file name escaping with fnameescape()
new preferred name for config variable: "tcmdbar_open_in" (old variable names still work)
||added :let Tcmdbar_OpenIn='Ask' to query the user with a dialog; when selecting two files, the dialog contains a "diff" button
||added option to open two files in diff mode
||Added option to open files in windows or tabpages
||Bugfixes: issues with 'gd', order of buffers