The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
3answers
51 views

Shifting command output to the right

Say I'm writing a .bashrc file to give me some useful information in my login terminals and I'm telling it to run the cal command (a nice one). How would I go about shifting the calendar produced to ...
0
votes
0answers
32 views

Force “indent” utility to ignore namespaces

I didn't found a mention about a namespaces in the man at all. The problem is that the utility inserts a whitespaces before the code that inside a braces of a namespace keyword. I guess the reason is ...
0
votes
1answer
51 views

(Vim) How to use TAB for indentation in all file types?

I'm using only TAB for indent, so I configure Vim for using only them: set autoindent set noexpandtab set tabstop=4 set shiftwidth=4 But some files (.py) still using spaces. I've search for it and ...
1
vote
1answer
488 views

How to indent multiple lines in nano

Selecting lines in nano can be achieved using Esc+A. With multiple lines selected, how do I then indent all those lines at once?
2
votes
1answer
73 views

Disable GNU Indent backup files

I am using GNU Indent to format C code in my project. By default backup files are created ending with a ~. I don't want to have any backup files created, is there a way to disable it?
1
vote
1answer
327 views

Kate replaces alignment spaces by tabs

When indenting a block of code in Kate (3.11.2), spaces used for alignment are replaced by tabs, ruining all alignments and putting me in the hell of restoring all these spaces. Example: if (true) { ...
3
votes
1answer
164 views

How do I make Kate indent with spaces on Python files but use tabs for text files and other files?

My goal is to set Kate up to work properly on Python files but to use different settings (tabs not spaces) on other documents. I'm sure others are doing this, but I can't figure out a convenient ...
1
vote
1answer
366 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 ...
2
votes
1answer
162 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 ...
1
vote
1answer
89 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 ...
2
votes
3answers
200 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 ...
21
votes
3answers
4k 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
352 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 : ...
10
votes
5answers
2k 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?
1
vote
1answer
502 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 ...
4
votes
2answers
225 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 ...
3
votes
1answer
739 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 ...
1
vote
2answers
2k 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 ...
5
votes
1answer
1k 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 ...