How to preserve whitespace indentation of text enclosed in HTML tags excluding the current indentation level of the tag in the document?

Indenting With Comments Since browsers ignore comments, you can use them to indent your pre tag contents. Solution <html> <body> <main> Here is my code with hack: <pre> <!– –>def some_function <!– –> return ‘Hello, World!’ <!– –>end </pre> Here is my code without hack: <pre> def some_function return ‘Hello, World!’ end </pre> </main> <body> … Read more

Indenting in VIM with all the files in Folder

Much simpler than scripting vim from the bash command line is to use vimscript from inside of vim (or perhaps a much simpler one-liner for scripting vim from the command line). I personally prefer using the arg list for all multi-file manipulation. For example: :args ~/src/myproject/**/*.ttl | argdo execute “normal gg=G” | update args sets … Read more

Set 4 Space Indent in Emacs in Text Mode

Short answer: The key point is to tell emacs to insert whatever you want when indenting, this is done by changing the indent-line-function. It is easier to change it to insert a tab and then change tabs into 4 spaces than change it to insert 4 spaces. The following configuration will solve your problem: (setq-default … Read more