[ale] creating tags file

David S. Jackson dsj at sylvester.dsj.net
Fri Nov 10 20:08:19 EST 2000


Hi,

I'm trying to create a script that generates a ctags file for for
LaTeX files for vim.  (I'll spiff it up later, after it works
right.)  Here's the simple version so far:

*********** SNIP ************
#!/bin/sh

# This script makes a ctags file for vi for LaTeX files in the
# current directory.  Please redirect STDOUT to your desired
# ctags file.

# Set up variables...
suffix="tex"
files="$(ls *.$suffix)"
regexp='/^\begin{document}$/'

# Output the values for the ctags file . . . 
for i in $files; do
  echo -en "$(basename $i .$suffix)\t$i\t"
  echo "$regexp"
done
************ SNIP *************


This script seems to create a somewhat valid tags file.  Problem
is, when I invoke vi with -t "name", I get this error from vi
(vim 5.6 in this case):

"name.tex" 137L, 6972C
Can't find tag pattern
Press RETURN or enter command to continue

And then I press RETURN, and the correct file is open (name.tex).
I would really prefer to not get the error, even though the
correct file is opened.  How can I avoid getting this "Can't find
tag pattern" error?

TIA!

--
David S. Jackson                        dsj at dsj.net
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
It isn't necessary to have relatives in Kansas City
in order to be unhappy.  -- Groucho Marx
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list