indent

Can someone add fundamental reasons why appending html markup to field variables is wrong

html += '<tr style="display:none;"><td class="leftval">ID:</td><td><span id="' + _uniqueId + '-id">' + one + '</span></td></tr>'; html += '<tr><td class="leftval"><label for="' + _uniqueId + '-itemdesc" title="This is the descriptive text that will actually appear in the email.">Description: </label></td>'; html += '<td><input...

foldmethod=indent gets confused

Normally a great boon to humanity, on occasion vim's indent-based folding will get confused and need a reset via :set foldmethod=indent. Symptoms include the appearance of consecutive folded lines in the window. Is there a way to avoid having this happen? Is it just me? update Although I'm pretty sure at this point that I've ID'd a ...

What is the preferred way to indent cases in a switch?

Hey there, As I was writing another switch in Eclipse, I once again came across a rather weird (to me, at least) default indentation, which is applied to 'switch' statements: switch (i) { case 1: ... case n: ... } I tend to prefer another way: switch (i) { case 1: ... case n: ... } Which way is more...

Backspace, if chars from cursor to begin of line are tabs/spaces, go back one indent level.

I'm using Vim for Python development. Sometimes, after an expression in an if clause: (suppose | is cursor). if test: pass | ...I press enter, and want to go to the if identation level. I know I can go back to command mode and just press <, but I would like to know if it's possble to, when Vim knows all characters behind the...

html indenting in vim

I don't know if this is possible, but does anyone know of an indent script that will support this scenario? (| is cursor) given <div>|<div> if I press enter, I want to see <div> | </div> instead of <div> |<div> ...

Indenting all lines inside textarea..

Is it possible to text indent each line in a textarea? I'm using a handwritten font and the first letter on each line is getting cut off slightly. I've already used padding and margin, but this does not work. Many thanks. Erik ...

Is it possible to modify the cindent rules for one case in vim?

I am currently using vim as my editor for programming in D. The indent rules are pretty much identical to C, but I've run into a case that vim doesn't handle by default. In D, case statements can take strings which are not properly handled by cindent. For instance, this works: switch(blah) { case 1: // something case some_variabl...

Indentation in WPF TextFormatter

Hi everybody! I'm making a WPF text-editor using TextFormatter. I need to indent some paragraphs, so I'm using the Indent property from the TextParagraphProperties class. This works great in this scenario: Regular text without any indentation.     This paragraph has a uniform     indentation so everything is     ok. But I also need th...

Indent, pretty-print code including Django template tags, HTML, CSS, and JavaScript

In dealing with a bunch of crufty Django template files, I want to indent them. The files contain: HTML, the bulk of the file. Maybe a pre tag or two. JavaScript, inside script tags. CSS inside the style tags Django template directives inside {% ... %} pairs. Surely there is a tool to do this. Most of the tools do silly things whe...

Text-Indent vs Position for SEO

What's the best way to hide a text element and replace it with an image while still maintaining good SEO. I've seen negative text-indent, but I prefer absolute positioning with negative top. So what I'd like to know is which is better for SEO. Do most search engines consider text elements with negative top with absolute positioning; lik...

How do I indent a single line multiple times in vi or vim?

I've found several answers on how to indent multiple lines in vim, I want to know how to take a single line and indent it more than once. In effect, I want a shorter version of the following command: ">>>>>>>>>>" (That is 10 right bracket "greater-than" signs.) ...

Can't indent UITableViewCell subclass

I have subclassed UITableViewCell to create a custom cell with a button and 2 labels. The cell definition is loaded from a xib using the pattern outlined in Dave Mark's Beginning iPhone Development. Here's the essential code: NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"MarketItemCustomCell" owner:self options:nil]; fo...

Is there a version of GNU indent which supports Objective C?

If so where can I get it? ...

I think this is a bug in emacs indent mode...

I happened to be writing something like this: int main( int nargs, char **args ) { int i, j; if ( i > 0 && NEAR( i-1, j ).dist == INFINITY ) { NEAR( i-1, j ).dist = 1.0; NEAR( i-1, j ).X = i; NEAR( i-1, j ).Y = j; newWorkPoints.push_back( IPoint( i-1, j )); } if ( j > 0 && NEAR( i, j-1...