Here you can find solutions for some common tasks.
How does one repeat a command several times?
Use for builtin and seq command from gnu coreutils (usually installed by default):
for i in (seq 10)
echo Hello!
end
Of course, you can refer to variable i inside the loop:
for i in (seq 10)
echo Hello, number $i!
end
When working interactively you will probably want to put it all on one line:
for i in (seq 10); echo Hello, number $i!; end
Why does VIM give error messages when started from fish?
(Thanks to James Vega for this solution)
When run from the fish shell, VIM gives error messages like: "E484: Can't open file /tmp/v916556/0"
The problem occurs because VIM expects to be run from a POSIX shell, although this is not mentioned anywhere in the documentation. A workaround is to add the following lines to the your local ~/.vimrc or global /etc/vimrc file:
if $SHELL =~ 'bin/fish'
set shell=/bin/sh
endif
Assuming /bin/sh is a link to a POSIX compliant shell - even minimal shells like 'ash' or 'dash' will do.