Change Syntax : Simple script for changing the current buffer's syntax language
| script karma |
Rating 1/3,
Downloaded by 42
|
Comments, bugs, improvements
|
Vim wiki
|
| created by |
| Eduan Lavaque |
| |
| script type |
| utility |
| |
| description |
NOTICE!
I no longer support this as a plugin/script, instead I have it as a Gist: https://gist.github.com/4158274
If you want the latest version then go there, however, you can still download the script from this page, but it will probably be outdated.
====================
Usage
To use this script you simply need to run {:ChangeSyntax syntax-name} and you would replace 'syntax-name' with the actual syntax name, for example 'php', 'css', 'text' etc.
That would set the current buffer's syntax to whatever you specified, as long as it exists, otherwise it'll just try to change it to what you said, fail, and not give you any kind of output currently. This is in the making for a future version.
====================
Mappings
Since I made this script using a function, you can use the following format to change the default mappings
:nnoremap <Leader>cs :ChangeSyntax<Space>
So you would of course change the mapping, nothing else OK, don't change anything after the ':'. The mapping above is the default BTW. Just so you know.
====================
Contributing
In order to contribute to this script, all you have to do is go to my Gist (https://gist.github.com/4158274) and comment on what could be improved, and I'll add or change or remove that. ;)
====================
License
"Change Syntax" is released under the MIT license. See: http://eduan.mit-license.org/ |
| |
| install details |
I recommend using Pathogen (https://github.com/tpope/vim-pathogen) or Vundle (https://github.com/gmarik/vundle) to install this script.
If you use Pathogen, then you probably already know the routine, you can download the latest version of this script here: https://github.com/Greduan/vim-change-syntax/archive/master.zip
If you use Vundle, then you just need to run {:BundleInstall} after sourcing your .vimrc file, which should contain the following
Bundle 'Greduan/vim-change-syntax' |
| |
script versions (upload new version)
Click on the package to download.
ip used for rating: 72.44.48.122
|