The indentation tag has no wiki summary.
11
votes
2answers
1k views
What's the standard for indentation in shell scripts?
Java community use 4 spaces as the unit of indentation. 1
Ruby community use 2 spaces that is generally agreed-upon. 2
What's the standard for indentation in shell scripts? 2 or 4 spaces or 1 tab?
6
votes
2answers
271 views
Indent the middle of multiple lines
I often run into situations like this:
title : Jekyll Bootstrap
tagline: Site Tagline
author :
name : Name Lastname
email : blah@email.test
github : username
twitter : username
feedburner : ...
5
votes
3answers
813 views
Change tab size of “cat” command
When I am in vim I can change the tab size with the following command:
:set ts=4
Is it possible to set tab size for cat command output too?
4
votes
2answers
168 views
Indenting multiple files
I want to indent multiple files which are poorly indented and indent them properly as would vim do when I type gg=G.
Is there someway to enter the = command or its alias in the command mode? i.e ...
4
votes
1answer
863 views
vim auto indenting even after setting noai option
I am using vim 7.2 from putty terminal.
Even if I run set noai it seems vim still trying to indent code.
I am copying my code from Notepad++ to vim.
following is from Notepad++
and following what I ...
3
votes
1answer
539 views
Emacs cperl mode - how to use tabs for indentation instead of spaces
Is there a way to make cperl mode in emacs use all tabs for indentation instead of spaces? I've tried setting indent-tabs-mode, and cperl-tab-always-indent. Here is my .emacs file:
(defalias ...
2
votes
3answers
149 views
Indent like first line
How can I indent a file such as its first line?
Example:
A file containing
x=1+2+3+4+
5+6+7+8
+9+10+12
should be converted to
x=1+2+3+4+
5+6+7+8
+9+10+12
I need this inside ...
1
vote
1answer
60 views
How do I keep 'indent' from moving curly braces to the next line?
I have several empty inline function definitions in C++ like so:
class C
{
void foo(){}
void bar(){}
};
now if I run indent -st -i4 -nut test.cc in order to just fix the indentation I get
...
1
vote
1answer
76 views
Use tabs for indentation in Python mode
I am using Emacs for Python developement. My team is using Tab indentation, so I must do the same. The problem is that I can't figure out how to make python-mode use tabs instead of spaces. I want ...
1
vote
2answers
638 views
How to configure Kate to always use 2 spaces for tabulation?
By default Kate inserts 2 spaces on Tab press but switches to real tabs starting from the fourth Tab level. Can I disable this and use spaces always, regardless to the depth?
I want this because I ...
1
vote
1answer
316 views
How to change vim auto-indent behavior?
By default vim aligns lines inside LI tags on the same position as the position of LI tag, but I want the contents of LI to have deeper indentation.
Current behaviour:
<LI>
first line
second ...
0
votes
1answer
84 views
In Vim, how can I automatically determine whether to use spaces or tabs for indentation?
Sometimes I edit others source code where the prevailing style is to use tabs. In this case, I want to keep the existing convention of using literal tabs.
For files I create myself, and files that ...