You are not logged in.
Pages: 1
This is really weird; vim was working beautifully for me, but now it's not.
If I put the following into an executable file using e.g. nano:
#!/bin/bash
grep fruit ./food.txt
then it works fine when run.
However, doing the same thing with vim gives me
: bad interpreter: No such file or directory
which is usually a sign that you've got ^M endlines left over from DOS or XP. However, I'm writing the file myself, so can't understand why this is happening. Doing a :%s/^M//g produces a Pattern not found message in vim, yet simply going to the start of the second line of the above script in nano and pressing backspace then enter solves the problem (the script will then run).
This is seriously odd; I haven't added anything to my .vimrc, and the only thing I've changed recently is my .screenrc, but the changes were only key bindings... I've tried vim in urxvt without screen running, and still the same problem arises.
What gives?
.oO Komodo Dave Oo.
Offline
maybe a binary option problem, check [url=http://vimdoc.sourceforge.net/cgi-bin/vimfaq2html3.pl#5.4] here
[/url]
Offline
You were completely correct Kern; that's solved the problem.
Thanks loads
.oO Komodo Dave Oo.
Offline
Pages: 1