from http://tips.webdesign10.com/vim/vim-syntax-highlighting
Vim Syntax Highlighting
<!-- Added Block Region on 1 Feb 2010 -->
<!-- End Added Block Region -->
2007, October 27 - 2:38pm — Webmaster Tips
If you are working on files with unusual extensions and want to
have vim add a certain type of syntax highlighting, you can edit your .vimrc file
to recognize new file extensions.
First, be sure that your vim has syntax highlighting enabled. You
can add this to your .vimrc file to always turn on syntax highlighting:
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
Example: CakePHP Syntax Highlighting in Vim
Here is an example from CakePHP
,
which uses PHP in files with the extension .thtml:
You could add the following line to have vim highlight .thtml files
as XML files. I like having Vim treat .thtml files as XML files because
much of the content of the files is XML (XHTML):
au BufNewFile,BufRead *.thtml setfiletype xml
I prefer the XML settings because the xmledit
plugin for vim gives you extra features when editing xml (or xhtml)
files.
分享到:
相关推荐
erics_vim_syntax_and_color_highlighting, Nick nacks thingamabobs whatsits evolving进化 这是什么?关 你 什么 事 。https://www.youtube.com/watch?v=OdH1-1OJmFI&list=RDMMOdH1-1OJmFI Lay it, lay it down, ...
Also, many runtime files have been improved, syntax highlighting and indenting works better. To find out the details, do ":help version7.4" after installing it. Direct link to the MS-Windows ...
" syntax highlighting hi Comment cterm=NONE ctermfg=DarkRed gui=NONE guifg=LightRed hi Constant cterm=NONE ctermfg=DarkGreen gui=NONE guifg=green3 hi Identifier cterm=NONE ctermfg=DarkCyan gui=NONE ...
vim-log-highlighting:VIM中通用日志文件的语法突出显示
VIM会根据文件的后缀名,如:*.c、*.cpp、*.cc,等,自动设置语法制导(Syntax Highlighting)。C/C++中的一些保留字,如:if、for、include,等等,就会有不同的颜色,这样就会减少程序员犯错的可能,阅读程序的...
Vim的Python语法突出显示 这是Neil Schemenauer着重强调python.vim的原始Vim 6.1 Python语法的增强版本。 产品特点 增强的突出显示功能: 弦乐 字符串中的特殊符号 数值常数 增加了对以下内容的支持: Python 3 ...
help, multiple windows, syntax highlighting, programmer support, and HTML support. All of the books published to date focus on vi alone not the expanded vim shipping with every major Linux ...
您也可以通过将文件复制到~/.vim/syntax目录中来手动安装插件。 如果该目录不存在,请创建它。 用法 在Vim中打开的反汇编时,执行:set ft=retdecdsm以启用语法突出显示。 另外,您可以在.vimrc放置以下自动命令: ...
Many new features have been added: multi-level undo, syntax highlighting, command line history, on-line help, spell checking, filename completion, block operations, script language, etc. There is ...
vim的数据库连接插件,便于数据库SQL调试,支持几乎所有的常见数据库, For instructions on ... function can be used to do anything, for example, syntax highlighting the result set in the result window.
vim8和nextup neovim,这是一个桅杆,您可以看看吗? 它就像喷气发动机,像大脑,像艺术品。 vim8 / neovim着色,用于逗号分隔的文件,仅数字和井号标签列分隔的标题 Python2和python3颜色 使用nerdcommenter ,cc和,...
vim-systemd-syntax:Vim中突出显示systemd服务文件的语法
Syntax Highlighting 270 Compiling and Checking Errors with Vim 279 Some Final Thoughts on Vim for Writing Programs 284 Table of Contents | ix 15. Other Cool Stuff in Vim . . . . . . . . . . . . . . . ...
Odin.vim 编程语言 Odin 的语法高亮显示。 源自 。 它看起来像什么。 (无论如何,在 cmd.exe 中。) 安装 只需将存储库克隆到 Vim 的包目录中即可。 (Vim 必须从安装。)如果使用 ,请将其克隆到 Vim 包目录中的...
Atom-chestnut.vim.zip,Minimal syntax highlighting for 16-color terminals.16个彩色终端的最小语法突出显示。,atom是一个用web技术构建的开源文本编辑器。
# Enable syntax highlighting syntax enable # Associate files named TODO with the todo filetype au BufRead,BufNewFile TODO set filetype=todo # Associate files named *.todo with the todo filetype au ...
requirements.txt.vim 对Vim 语法支持。 目录 安装 插件管理器(推荐) 例如) , , , " vim-plug Plug ' raimon49/requirements.txt.vim ' " vim-plug with on-demand Plug ' raimon49/requirements.txt.vim '...
Vim的组织模式和大纲模式语法突出显示Org.vim是的最小和插件,仅提供语法突出显示和折叠。 该插件旨在在组织模式(和大纲模式)文件上复制Vim编辑经验,而不是试图成为功能齐全的组织模式插件,这就是Emacs的目的。 ...
Vim reStructuredText运行时 这是Vim的reStructuredText语法文件的开发库。
brew.vim:自制方法的Vim语法