0
votes
1answer
38 views

The Vim documentation illustrates a “wrong way” to add comments to HTML. What's wrong with it?

The "syntax.txt" chapter in the official Vim documentation says: HTML comments are rather special (see an HTML reference document for the details), and the syntax coloring scheme will highlight all ...
1
vote
1answer
26 views

Insert a line of text before lines matching a regex in vim

I'm attempting to add a column to an HTML table using vim so I need to add a pair of <td> tags the line before each </tr>. So far I have :186,$s/ <\/tr>/<td><\/td> \n ...
0
votes
3answers
53 views

Does ultisnips support html?

Ultisnips works fine with python and c, but when edit html files, it never insert the snippet at all. While youcomplete me suggest there is a snippet by the prompt. Does ultisnips support other ...
0
votes
1answer
71 views

VIM - How to change color of if, else, endif, for and endfor statements

I just Django html so I have the normal html tags as well as the if, else, endif, for and endfor statements. I use a customized version of the colorscheme called slate. There is a line in the ...
1
vote
1answer
178 views

VIM - how to open .html files with django html syntax rather than just html syntax?

I use Django a lot and I just want to open all .html files with the htmldjango syntax rather than html syntax. Is there a way for me to tell vim to open all html files with a htmldjango syntax? ...
1
vote
1answer
25 views

Editing the htmldjango.vim file

I like htmldjango.vim syntax highlighting except for a few things. 1) It highlights all variables (whatever starts with {{ or {% and ends with }} or %}) white and gives it a red font. I want all ...
0
votes
2answers
25 views

creating a basic html vim syntax file

I use vim and type a lot of Django html code and I don't like the htmldjango.vim or html.vim highlighting syntax. I decided I should just create my own basic syntax highlighting for Django html. All I ...
0
votes
2answers
83 views

Is it possible to have per file type key mapping in Vim

I just discovered lately that when you enter a non breaking space(nbsp) in an HTML document and set the encoding to utf-8, you wont' have to enter nbsp; repeatedly to format text. I at first thought, ...
0
votes
1answer
289 views

How to re-indent HTML snippets in vim?

I'm aware of tidy for re-indenting an entire HTML page, but I work with templates and often want to re-indent just parts of an HTML document from vim. I can't see an example of how to do this ...
2
votes
2answers
116 views

Vim regex for wrapping visually selected digits with HTML tags

I have a bunch of text I need to format via HTML, my main problem being that there's a bunch of digits at the beginning of certain words that I need to wrap with HTML tags. I'm trying to think up a ...
0
votes
1answer
152 views

Moving html table columns in vim

I have an HTML table with rows like this: <tr> <td>DATE</td> <td>NUMBER</td> <td>DESCRIPTION</td> <td>DEADLINE</td> </tr> <tr> ...
1
vote
2answers
97 views

Vim pattern for replacing ftp links with local

Question I'm going to be sorting through a large mass of html files and replacing links to an ftp site with local links. I am using vim and I am trying to figure out a pattern to use with ...
10
votes
1answer
451 views

Different background color for multiple filetypes in vim

Is it possible to have different background colors in vim (ie. one light, one dark) when dealing with files with multiple filetypes (ie. :set ft=html.php)? In PHP code with HTML embedded, it can be ...
4
votes
2answers
274 views

Enclose paragraphs with <p> tags in vim

I tried to create a mapping in order to enclose the visually selected paragraphs in tags: vnoremap <silent> _p ...
3
votes
2answers
396 views

Change <li> autoindent options in VIM

By default Vim seems to not want to indent the contents inside of <li> tags, though it autoindents properly for most other HTML tags. For example, if I start with this code: <ul> ...
6
votes
1answer
2k views

Vim syntax highlighting: how to stop the automatic underlining of <a href=..>?

When I type a HTML element a, there is always a underline. I want to stop this, but do not know how? I'm talking about the vim syntax highlight.
1
vote
2answers
2k views

Vim: How to indent html code correctly in php file?

In php file : <?php ... ?> <html> </html> I could not indent the html source code with operator =. How could I indent it?
1
vote
1answer
1k views

Vim: How to navigate between begin and end html tag?

For example, if I want to jump to the close form tag. how could I do this?
4
votes
2answers
3k views

Auto formatting in VIM

I have a HTML like this: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Index - feedman</title> <link rel="stylesheet" ...
3
votes
3answers
1k views

Vim Hotkeys For Specific File

Is it possible to set hotkey for specific file types in vim. For example, if I am editing a .java file, I'd like vim to run javac .java when I press 5. Is this possible?