Welcome to the Power Users community on Codidact!
Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.
Post History
From the FAQ: No, unfortunately it's not possible. Allowing this would require embedding terminal multiplexer into Vifm, which is kinda silly because it is a file manager. The compromise is to r...
Answer
#3: Post edited
- From the [FAQ][1]:
- > No, unfortunately it's not possible. Allowing this would require embedding terminal multiplexer into Vifm, which is kinda silly because it is a file manager. The compromise is to run Vifm inside terminal multiplexer and provide some integration between them (there is already some builtin support for GNU Screen and tmux in Vifm, e.g. `:screen`, `:ls`).
- However, there are several options to prevent the editor from blocking Vifm.
- ### Use Gvim
- A GUI editor opens in a new window, leaving Vifm's terminal free.
- :set vixcmd="gvim &"
- Note this option really needs to specify a Vi editor if you want external editor tasks to work. In other words, if you try, for example,
- :set vixcmd="xedit &"
- :set vixcmd="xterm -e nano &"
- that will work fine for normal file editing, but will break `q:` and `:rename`. The reason is explained in the [manual][2]:
- > **vicmd**
- >
- > Command used to edit files in various contexts. Ampersand sign at the end (regardless whether it's preceded by space or not) means backgrounding of command.
- >
- > Background flag is ignored in certain context where vifm waits for the editor to finish. Such contexts include any command that spawns editor to change list of file names or a command, with :rename being one example. ’-f’ is also appended to prevent forking in such cases, so the command needs to handle the flag.
- >
- > Additionally ’+{num}’ and ’+'call cursor()'’ arguments are used to position cursor when location is known.
[]()### Use a terminal multiplexer- If you run Vifm under Tmux or Screen and activate multiplexer integration with the `:screen!` command, then the files are opened in a new Tmux or Screen window.
- ### Open a new terminal for the editor
- Vifm supports binding different commands to different mime-types (as listed by `file -i filename`) or file patterns. For example,
- :filextype <text/*> xterm -e vim %f &
- opens files whose mime-type matches `text/*` in a new terminal with Vim, while
- :filextype *.txt xterm -e vim %f &
- does the same for all files with a `.txt` extension, and since the Vim terminal is put in the background, the Vifm terminal does not block.
- [1]: https://wiki.vifm.info/index.php/FAQ#Is_it_possible_to_embed_Vim_or_another_terminal_application_into_one_of_Vifm.27s_panes.3F
- [2]: https://vifm.info/manual.shtml#Commands
- From the [FAQ][1]:
- > No, unfortunately it's not possible. Allowing this would require embedding terminal multiplexer into Vifm, which is kinda silly because it is a file manager. The compromise is to run Vifm inside terminal multiplexer and provide some integration between them (there is already some builtin support for GNU Screen and tmux in Vifm, e.g. `:screen`, `:ls`).
- However, there are several options to prevent the editor from blocking Vifm.
- ### Use Gvim
- A GUI editor opens in a new window, leaving Vifm's terminal free.
- :set vixcmd="gvim &"
- Note this option really needs to specify a Vi editor if you want external editor tasks to work. In other words, if you try, for example,
- :set vixcmd="xedit &"
- :set vixcmd="xterm -e nano &"
- that will work fine for normal file editing, but will break `q:` and `:rename`. The reason is explained in the [manual][2]:
- > **vicmd**
- >
- > Command used to edit files in various contexts. Ampersand sign at the end (regardless whether it's preceded by space or not) means backgrounding of command.
- >
- > Background flag is ignored in certain context where vifm waits for the editor to finish. Such contexts include any command that spawns editor to change list of file names or a command, with :rename being one example. ’-f’ is also appended to prevent forking in such cases, so the command needs to handle the flag.
- >
- > Additionally ’+{num}’ and ’+'call cursor()'’ arguments are used to position cursor when location is known.
- ### Use a terminal multiplexer
- If you run Vifm under Tmux or Screen and activate multiplexer integration with the `:screen!` command, then the files are opened in a new Tmux or Screen window.
- ### Open a new terminal for the editor
- Vifm supports binding different commands to different mime-types (as listed by `file -i filename`) or file patterns. For example,
- :filextype <text/*> xterm -e vim %f &
- opens files whose mime-type matches `text/*` in a new terminal with Vim, while
- :filextype *.txt xterm -e vim %f &
- does the same for all files with a `.txt` extension, and since the Vim terminal is put in the background, the Vifm terminal does not block.
- [1]: https://wiki.vifm.info/index.php/FAQ#Is_it_possible_to_embed_Vim_or_another_terminal_application_into_one_of_Vifm.27s_panes.3F
- [2]: https://vifm.info/manual.shtml#Commands
#2: Post edited
- From the [FAQ][1]:
- > No, unfortunately it's not possible. Allowing this would require embedding terminal multiplexer into Vifm, which is kinda silly because it is a file manager. The compromise is to run Vifm inside terminal multiplexer and provide some integration between them (there is already some builtin support for GNU Screen and tmux in Vifm, e.g. `:screen`, `:ls`).
- However, there are several options to prevent the editor from blocking Vifm.
- ### Use Gvim
- A GUI editor opens in a new window, leaving Vifm's terminal free.
:set vixcmd=gvim### Use a terminal multiplexer- If you run Vifm under Tmux or Screen and activate multiplexer integration with the `:screen!` command, then the files are opened in a new Tmux or Screen window.
- ### Open a new terminal for the editor
- Vifm supports binding different commands to different mime-types (as listed by `file -i filename`) or file patterns. For example,
- :filextype <text/*> xterm -e vim %f &
- opens files whose mime-type matches `text/*` in a new terminal with Vim, while
- :filextype *.txt xterm -e vim %f &
- does the same for all files with a `.txt` extension, and since the Vim terminal is put in the background, the Vifm terminal does not block.
- [1]: https://wiki.vifm.info/index.php/FAQ#Is_it_possible_to_embed_Vim_or_another_terminal_application_into_one_of_Vifm.27s_panes.3F
- From the [FAQ][1]:
- > No, unfortunately it's not possible. Allowing this would require embedding terminal multiplexer into Vifm, which is kinda silly because it is a file manager. The compromise is to run Vifm inside terminal multiplexer and provide some integration between them (there is already some builtin support for GNU Screen and tmux in Vifm, e.g. `:screen`, `:ls`).
- However, there are several options to prevent the editor from blocking Vifm.
- ### Use Gvim
- A GUI editor opens in a new window, leaving Vifm's terminal free.
- :set vixcmd="gvim &"
- Note this option really needs to specify a Vi editor if you want external editor tasks to work. In other words, if you try, for example,
- :set vixcmd="xedit &"
- :set vixcmd="xterm -e nano &"
- that will work fine for normal file editing, but will break `q:` and `:rename`. The reason is explained in the [manual][2]:
- > **vicmd**
- >
- > Command used to edit files in various contexts. Ampersand sign at the end (regardless whether it's preceded by space or not) means backgrounding of command.
- >
- > Background flag is ignored in certain context where vifm waits for the editor to finish. Such contexts include any command that spawns editor to change list of file names or a command, with :rename being one example. ’-f’ is also appended to prevent forking in such cases, so the command needs to handle the flag.
- >
- > Additionally ’+{num}’ and ’+'call cursor()'’ arguments are used to position cursor when location is known.
- []()### Use a terminal multiplexer
- If you run Vifm under Tmux or Screen and activate multiplexer integration with the `:screen!` command, then the files are opened in a new Tmux or Screen window.
- ### Open a new terminal for the editor
- Vifm supports binding different commands to different mime-types (as listed by `file -i filename`) or file patterns. For example,
- :filextype <text/*> xterm -e vim %f &
- opens files whose mime-type matches `text/*` in a new terminal with Vim, while
- :filextype *.txt xterm -e vim %f &
- does the same for all files with a `.txt` extension, and since the Vim terminal is put in the background, the Vifm terminal does not block.
- [1]: https://wiki.vifm.info/index.php/FAQ#Is_it_possible_to_embed_Vim_or_another_terminal_application_into_one_of_Vifm.27s_panes.3F
- [2]: https://vifm.info/manual.shtml#Commands
#1: Initial revision
From the [FAQ][1]: > No, unfortunately it's not possible. Allowing this would require embedding terminal multiplexer into Vifm, which is kinda silly because it is a file manager. The compromise is to run Vifm inside terminal multiplexer and provide some integration between them (there is already some builtin support for GNU Screen and tmux in Vifm, e.g. `:screen`, `:ls`). However, there are several options to prevent the editor from blocking Vifm. ### Use Gvim A GUI editor opens in a new window, leaving Vifm's terminal free. :set vixcmd=gvim ### Use a terminal multiplexer If you run Vifm under Tmux or Screen and activate multiplexer integration with the `:screen!` command, then the files are opened in a new Tmux or Screen window. ### Open a new terminal for the editor Vifm supports binding different commands to different mime-types (as listed by `file -i filename`) or file patterns. For example, :filextype <text/*> xterm -e vim %f & opens files whose mime-type matches `text/*` in a new terminal with Vim, while :filextype *.txt xterm -e vim %f & does the same for all files with a `.txt` extension, and since the Vim terminal is put in the background, the Vifm terminal does not block. [1]: https://wiki.vifm.info/index.php/FAQ#Is_it_possible_to_embed_Vim_or_another_terminal_application_into_one_of_Vifm.27s_panes.3F