Friday, September 27, 2013

Re: Something to wrap a selection

Paul Isambert <zappathustra@free.fr> writes:

> The code relies on an analysis of the "comments" option, which is
> normally set by filetype. For .conf files, I can see that the option
> is ambiguous (for our purpose), as it contains several characters for
> one-line comments, and the code picked up the wrong one (the first
> encountered).

Thanks for your efforts. The script is doing what I wanted alright
but it appears not to know any comment char other than //.

I named the input file:
some.conf
some.rc
some.bash
some.pl

And every case it inserts '//'.

Finally I opened a real, honest to god, perl script and tried it
there. And still it inserts '//'

I wonder if there is a way to make vim tell me what kind of file it
thinks its editing?

Or maybe better still a way for me to tell vim what kind of file I
want it to be editing (temporarily at least)

My googling keeps getting tangled up with piles of *.vim files,
echoing $RUNTIME blah blah and so on and so on. Not finding a definitive
way to choke it out of vim for the current file.

Just typing :Filetype lets me know:
filetype detection:ON plugin:ON indent:ON

But how can I coax vim into telling me what the current filetype is?

Or barring all that maybe just make the script insert octathorps in
all cases. At least that would be useful most of the time.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: