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. Mehr…
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.
Bye
Sven
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
Letzte Kommentare