vim

Syntax Highlighting in HTML mit VIM

Sven Bachmann
Hin und wieder möchte ich ein Stück Quellcode online stellen und dies nach Möglichkeit auch mit Syntax Highlighting. Unter Wordpress gibt es dafür Plugins, jedoch für meine normale Website hatte ich dafür noch kein PHP Tool und so machte ich mich auf die Suche nach statischen Renderern, obwohl die Lösung zum Greifen nah lag.Mein bevorzugter Editor VIM besitzt selbst ja ein sehr gut funktionierendes Syntax Highlighting - also müsste man dieses jetzt noch in HTML-Form bringen.

Hardkill VIMs Indentation

Sven Bachmann
Hi there, I’m using the ftplugin to switch highlighting, indentation and some other filetype specific settings. Today I just wanted to get rid of the autoindentation feature for HTML files. Simply putting the following lines in the html specific file didn’t work, because VIM reset the “indentexpr” variable back to default: setlocal nocindent setlocal noautoindent setlocal nosmartindent setlocal indentexpr= So I googled around and found some other lines: filetype indent off filetype plugin indent off After adding these also to the html-file it worked.

[VIM] Tip

Sven Bachmann
Hi there, guess you have a python file, filled up with tabstops and now someone comes in and tells you, that tabstops are uncool and overall indenting should only use 4 spaces. With vim no problem: :set tabstop=4 :set expandtab :retab Done! Greetings to PhiBo ;-) Bye Sven