How to set a local syntax file?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to set a local syntax file?

Fabio D'Alfonso
Hi,
I am using nasm, and made the change in syntax to nasm in the global
config, both to highlight and snippets.
Could you tell me where I could make a local setting?
Also I am using ti amix/vimrc .
Thanks

--

Fabio D'Alfonso

'Enabling Business Through IT'

cell. +39.348.059.40.22 *

web: www​.​fabiodalfonso​.​com

email: [hidden email]

fax: +39.06.874.599.581

BlackBerry® Wireless Enabled Address.

* Hidden numbers are automatically rejected by the phone


--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to set a local syntax file?

Charles E Campbell Jr
Fabio D'Alfonso wrote:
> Hi,
> I am using nasm, and made the change in syntax to nasm in the global
> config, both to highlight and snippets.
> Could you tell me where I could make a local setting?
> Also I am using ti amix/vimrc .
IF: you've taken nasm.vim and modified it, but its a complete syntax
file...  put it in $HOME/.vim/syntax
IF: you've just modified a rule or two, added something,  and have a
small changes file: put it in $HOME/.vim/after/syntax

I'm not sure what you mean by using it amix/vimrc . If you have a
specific filetype that you want it used on (abc.amix?): in a file called
$HOME/.vim/filetype.vim:

 au BufNewFile,BufReadPost *.amix                                      
                            setf amix

assuming that you've called the syntax file amix.vim .

Regards,
Chip Campbell

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to set a local syntax file?

Fabio D'Alfonso-2

On 2017-01-31 14:44, Charles E Campbell wrote:

Fabio D'Alfonso wrote:
Hi,
I am using nasm, and made the change in syntax to nasm in the global
config, both to highlight and snippets.
Could you tell me where I could make a local setting?
Also I am using ti amix/vimrc .
IF: you've taken nasm.vim and modified it, but its a complete syntax
file...  put it in $HOME/.vim/syntax
IF: you've just modified a rule or two, added something,  and have a
small changes file: put it in $HOME/.vim/after/syntax

I'm not sure what you mean by using it amix/vimrc . If you have a
specific filetype that you want it used on (abc.amix?): in a file called
$HOME/.vim/filetype.vim:

 au BufNewFile,BufReadPost *.amix                                      
                            setf amix

assuming that you've called the syntax file amix.vim .

Regards,
Chip Campbell

-- 

I did this in the global  filetype.vim, I would know where I could put this in a local setting.

Thanks

Fabio

Changing the default syntax to nasm

sudo vi /usr/share/vim/vim74/filetype.vim

” if b:asmsyntax still isn’t set, default to asmsyntax or NASM (was GNU)
if b:asmsyntax == “”
if exists(“g:asmsyntax”)
let b:asmsyntax = g:asmsyntax
else
let b:asmsyntax = “nasm”  (was “asm”)
endif
endif

Look for “asm” and change to “nasm”

 

--

Fabio D'Alfonso

Network Analysis And VMware Enterprise Solutions

cell. +39.348.059.40.22

web: http://www​.​fabiodalfonso​.​com

email: [hidden email]

Linkedin:   https://it.linkedin.com/in/fabiodalfonso

Twitter:    https://twitter.com/fabio_dalfonso

FB Page: https://www.facebook.com/dalfonsoco/
fax: +39.06.874.599.581

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.