VIFM в Windows 7 x64 тип файла по умолчанию для ОС

834
user176540

Я искал файловый менеджер, который имел привязки клавиш Vim и работал с Windows, и в результате я узнал о "Vifm"

Проблема в том, что (кроме того, что он не может быть развернут в полноэкранном режиме), он не может открывать какие-либо файлы. Я продолжаю получать:

vim не распознается как внутренняя или внешняя программа ..... нажмите любую клавишу для продолжения

(cmd) диалоговое окно.

Скриншот

По сути, я хочу открыть любую программу по умолчанию для любого расширения в Windows 7 x64, как в Vifm.

если есть какой-либо другой (совместимый с Windows) файловый менеджер, имеющий привязки клавиш Vi, перечислите их все вниз.

2

2 ответа на вопрос

3
xaizek

Ingo is right about the way vim is called by default, there is just no really good way of doing it on Windows (vim works well on Unix-like systems). You should know that there are simpler ways to accomplish what you want than modifying PATH environment variable or installing vim.bat. Here is a quick guide:

  1. First you need to setup a configuration file. It can be placed under %HOME% or %USEPROFILE% directories. The simple way to find default location on your system is to run :echo $VIFM command inside vifm. You can use data/vifmrc file as an example (though, it's mostly Linux-oriented), just copy it to configuration directory.

  2. Now you can configure actual command to run Vim. It's done using vicmd option (at the top of the sample vifmrc). An example: set vicmd=e:/programs/editors/vim/vim73/gvim.exe (spaces in the path might make it a bit different).

  3. The sample vifmrc also contains this commented out line closer to the bottom of the file:

    " filetype * start, explorer

    Just uncomment it to open files with standard Windows associations by default.

  4. Don't forget to reopen vifm, or try using :restart command to reload configuration file.

besides the fact it can't be fullscreen-maximized

Actually, vifm can, it's cmd.exe that stands in the way. Use properties of a running console window (see context menu of an icon in the left top corner) to change window dimentions. You can quickly check that vifm supports resizing by changing size using :set columns+=1 and set lines+=1 commands. Alternatively, use something like ConEmu or Console2 instead of cmd.exe to run vifm, those are nice replacements of standard console.

If there are any other (windows compatible) file manager that has Vi key bindings, please list them all down.

Sorry, I can't name any, this is kinda a reason why vifm supports Windows.

2
Ingo Karkat

Vifm is invoking Vim as just vim, and assumes it is accessible through your system's PATH, which does not seem to be the case.

The Vim installer (C:\Program Files\vim\vim74\install.exe) has an option to install vim.bat wrapper scripts into C:\WINDOWS; you can re-execute the installer to add those. Alternatively, append the Vim installation directory to your (user or system) PATH environment variable (through the Control Panel).