indentation

Can't change Emacs's default indentation between HTML tags

扶醉桌前 提交于 2019-12-03 12:03:11
问题 I'm confused about the Emacs indentation paradigm. I have this in my .emacs file: (setq-default tab-width 4) If I press TAB in the following situation <ul> (caret) </ul> it end up like this <ul> (caret) </ul> (with 2 spaces indentation between the HTML tags.) It should end up like this: <ul> (caret) </ul> I tried everything: (setq-default tab-width 4) (setq-default indent-tabs-mode t) (setq tab-stop-list '(4 8 12 16)) I've set every possible Emacs setting about indentation to 4 but that 2

UITableViewCell in ios7 now has gaps on left and right

久未见 提交于 2019-12-03 11:55:47
I have a UITableView where, in ios6, my custom cell stretched completely to the left and right sides of the screen. So my square image on the left of the cell was hard up against the phone screen. However, now in ios7, there is a small gap appearing on the left hand side so the image is now away from the side and slightly overlaps my text within the cell. This also seems to be happening in other apps I have that I am now viewing in ios7 - all have a gap on the left and perhaps the right as well. My Custom cell is set to a size of 320 according to Interface Builder - ios 7 hasnt changed this

Eclipse html: Doesn't indent on some tags

坚强是说给别人听的谎言 提交于 2019-12-03 11:25:20
问题 For some reason, Eclipse seems to think that e.g. <div> and <td> tags aren't indenting-worthy. Ctrl+Shift+F indents the following HTML as such: <div> <div> <table> <tr> <td>test<br /> test2 <h1>test 2</h1> <div>testing<br /> test2</div> <table> <tr> <td> <h1>again</h1> </td> </tr> </table> </td> </tr> </table> </div> </div> Anyone have any idea of how to turn this logic off (I want all tags to indent!), or customize it? 回答1: I'll give you an example of how to do it in Aptana. Since it's based

Indentation not working on Custom UITableViewCell

陌路散爱 提交于 2019-12-03 11:04:00
问题 I have a simple Custom UITableViewCell in my project, and just added an Edit action to the table. Everything seems fine, but indentation is not working when editing, and edit Icons overlap the content. (Not to mention the delete button) The custom cell is created in interface builder, with the standard constraints as usual and I have already tried to ovverride the layoutSubviews method in the class, as mentioned in other places with no luck as follows; (void)layoutSubviews { [super

How do you make Git ignore spaces and tabs?

风流意气都作罢 提交于 2019-12-03 10:57:06
I have a small scripting project that consists of five different source files in one directory called "Droid XX-XX-XX". Each time I created a new backup copy of the source directory, I put the date in the X's. So there are about 15 different versions from different dates. I want to add each of these to my bare new Git repository starting from the earliest. However I have run into several problems. One problem is that some of the files use tabs for indentation, while others use spaces -- but Git treats a whole line as different even when the only difference is the tab vs. space issue. How can I

indent python file (with pydev) in eclipse

寵の児 提交于 2019-12-03 10:31:20
I'm a newbie in eclipse. I want to indent all the lines of my code and formatting the open file by pressing a shortcut or something like that... I know the CTRL+SHIFT+F (as it actually doesn't work in pydev!!) I've been searching for hours with no success. Is there any way to do that in eclipse. kind of like CTRL+K,D in visual studio, which formats and indents all the source code lines automatically? I ... don't think this question makes sense. Indentation is syntax in Python. It doesn't make sense to have your IDE auto-indent your code. If it's not indented properly already, it doesn't work,

Indentation in VS Code

∥☆過路亽.° 提交于 2019-12-03 10:11:54
I'm a long time Emacs user. I've been trying out VS Code and i like it so far. One thing i love about Emacs is that it always indents the code correctly when i press tab. I've looked but i can't seem to get that behavior in VS Code. I've tried looking in the settings and searching for an extension but have had no luck. Can anyone help me on this please? Is there an extension i can/have to install to get it to do what i want? I code mostly in PHP, HTML, CSS and Javascript. Thanks in advance. A couple things: To format (make "pretty") all the code in a given file you can use Shift + Alt + F on

Eclipse: Lining up function arguments vertically

半城伤御伤魂 提交于 2019-12-03 09:40:59
I'm running Eclipse 3.7.2 on Windows 7 professional. If I type a method declaration like this: private void processCode(String codename, boolean doSomethingElse, int num_of_repeats){ } Then hit Ctrl + I with the whole file selected, Eclipse will mess up the alignment of the function arguments like this private void processCode(String codename, boolean doSomethingElse, int num_of_repeats){ } How can I get Eclipse to stop doing that? Follow these steps to achieve what you want: Open the preferences dialog (located in Windows -> Preferences on Windows/Linux or in the Eclipse menu on Mac). Go to

Javascript indentation in VIM

独自空忆成欢 提交于 2019-12-03 08:58:36
问题 I'm trying to get VIM to indent Javascript with the '=' and related commands. When I try to auto indent the following, for example: new function($) { $.fn.setCursorPosition = function(pos) { if ($(this).setSelectionRange) { $(this).setSelectionRange(pos, pos); } else if ($(this).createTextRange) { var range = $(this).createTextRange(); range.collapse(true); range.moveEnd('character', pos); range.moveStart('character', pos); range.select(); } The result is the rather absurd: new function($) {

Shift a region or line in emacs

孤街浪徒 提交于 2019-12-03 07:30:26
问题 I'm looking for a way in emacs to shift text to the right or to the left by n spaces. A similar functionality that it in vim << or >> . It should work on a region or if no region is selected on a current line and not move the cursor from its current location. The solution from EmacsWiki does not work very well as the M-x indent-rigidly since it somewhat remembers the last region used and shifts that one instead. The closest seems to be the one here but I did not managed to make it work. I'm