Vim Tips Wiki

Ampersand in freebsd shell commands to view LaTeX files

Redirected from VimTip846

1,625pages on
this wiki
Add New Page
Talk0 Share
Tip 846 Printable Monobook Previous Next

created January 9, 2005 · complexity basic · author Rabee Tourky · version 6.0

Could not execute shell commands ending with ampersand (&) in gvim running under FreeBSD. Commands like:

:!xdvi &
:!xterm &

did not work. This meant that I couldn't use vim-latex to view documents dvi since by default vim-latex sends a command ending with &. The problem does not occur in vim.

Hint: Check the parameters gvim is started with! In the KDE menu gvim is started with -f option which can cause this problem.

+ The problem is solved if the shell is changed to ksh from the default sh or bash.

Install pdksh:

$ su (su to root)
# cd /usr/ports/shells/pdksh/
#make install cleanset

Change the shell to ksh in .vimrc. Add:

set sh=ksh



Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.