Questions tagged [filetype-html]

The tag has no usage guidance.

13 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
0answers
647 views

Mixed PHP and HTML indenting

Is there a way to have mixed indenting more like Sublime Text (left) than Vim does it? I would like the nested UL to follow the (line 10) to follow along the (main indentation).
3
votes
0answers
225 views

Is there a way to add handlebars to html.vim?

I'm working with handlebars right now and I'd like to get tags like: {{#component 'whatever'}} {{/component}} and {{#if}} {{else}} {{/if}} to increase the indent count. Unfortunately, it doesn'...
1
vote
0answers
50 views

How to indent HTML5 with omitted closing tags properly?

I try writing some HTML5 with omitted closing tags in NVIM v0.3.4, and get this: <ol> <li>3 <li>4 <li>8 <li>9 </ol> This ...
1
vote
0answers
164 views

How to get html tag auto completion?

I can't seem to figure out how to implement auto tag completion for html. Is there a plug-in or something else you guys use that works? Is there just one thing I can download that will handle ...
1
vote
0answers
47 views

Automatically create files based on expanding snippets?

when developing for web (in Vim) I'm always using the BEM methodology. I have identified that I always go through the same steps when adding a new block element, and I'm looking for ways to automate ...
1
vote
0answers
973 views

vim autoindent not working correctly

This is what I have in my vimrc: if empty(glob('~/.vim/autoload/plug.vim')) silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/...
1
vote
0answers
353 views

How to select unclosed tag and close it automatically?

Here is my html file already edited,there are two errors in it. <!DOCTYPE html> <html lang="zh-Hans"> <head> <meta charset="utf-8"> <link rel="stylesheet" type="...
1
vote
0answers
296 views

Fix indentation after a multiline HTML tag

I have the following in .vimrc: set tabstop=2 softtabstop=-1 shiftwidth=0 expandtab filetype plugin indent on When I type the following in an HTML file: <html id="somethingverylong" > <...
0
votes
0answers
34 views

`filetype plugin indent on` with `filetype=html` over-indents <script>

Since my last system update (I think), I have noticed this very annoying behavior. # vim foo.html # I go to insert mode, I type (no whitespace except newlines) <html> <head> ...
0
votes
0answers
36 views

How to configure ALE plugin to use Tidy to lint HTML files?

I have the Vim ALE plugin installed, and can run tidy successfully on the command line (installed via brew install tidy on macOS). However, in vim, it is not running tidy against html files (e.g., ...
0
votes
0answers
71 views

Vim formatting in css

I am having a very difficult time formatting css in an html file. For example, here is how vim 'thinks' it should be formatted: That is, after the above css section, it gives it 8 indentations (??), ...
0
votes
0answers
22 views

Emmet expand only HTML tags

Hi I'm trying to make emmet expand only Html tags. For example div<c-y>, should be expanded to <div></div> But abc<c-y>, should not be expanded. By default emmet expands ...
0
votes
0answers
43 views

vim disable behavior special tags (eg script)

When editing html, vim applies different rules when inside certain tags (like script/pre/style). I want to have the normal html rules when inside a script tag (using handlebars, and I don't write any ...