Wednesday, January 8, 2014

Re: VIM loses syntax highlighting when using split command

I had the same issue, but is now solved with your solution.

Thanks, Christian!


On Sunday, February 3, 2013 4:56:22 AM UTC-8, Christian Brabandt wrote:
> Hi alijohnshaik!
>
> (redirecting to vim_use)
>
>
>
> On Sa, 02 Feb 2013, alijohnshaik@gmail.com wrote:
>
>
>
> > <quote author='Christian Brabandt'>
>
> > Hi naaj_ila!
>
> >
>
> > On Fr, 01 Feb 2013, naaj_ila wrote:
>
> >
>
> > > Its working fine
>
> > > i added these things in ~/.vim/syntax/filetype.vim
>
> >
>
> > This looks totally wrong.
>
> > >
>
> > > augroup filetypedetect
>
> > > au! BufRead,BufNewFile *.v so ~/.vim/syntax/verilog.vim
>
> > > augroup END
>
> >
>
> > I am wondering, why do you need this? Vim should automatically detect
>
> > *.v files as verilog files? Does yours not?
>
> >
>
> > Try this: vim -u NONE -N file.v
>
> >
>
> > What does Vim tell you, after entering:
>
> >
>
> > :filetype detect
>
> > :set ft?
>
> > --------------------------------------
>
> > Its coming like this after executing the command
>
> > filetype =
>
> > -----------------------------------
>
>
>
> Interesting. Your vim does not by default detect verilog files. What vim
>
> version is this?
>
>
>
> To make vim recognize .v files as verilog filetypes, put the following
>
> into your .vimrc:
>
> filetype plugin on
>
>
>
> Now create a file called ~/.vim/ftdetect/verilog.vim (create
>
> non-existing directories) and put in that file:
>
> ,----
>
> | au BufRead,BufNewFile *.v set filetype=verilog
>
> `----
>
>
>
> and then place your verilog.vim syntax file into
>
> ~/.vim/syntax/ (again, creating non-existent directories).
>
> (and make sure, your .vimrc contains:
>
> :syntax on
>
>
>
>
>
> See also the help at :h new-filetype and have a look at section 26 of
>
> the faq http://vimhelp.appspot.com/vim_faq.txt.html
>
>
>
> regards,
>
> Christian
>
> --
>
> Was kann an der Arbeit gut sein, wenn die Reichen sie den Armen �berlassen.

--
--
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: