What is the difference between empty space (>> >> >>) and empty space(......) in eclipse ide? - eclipse

I know that,empty space (>> >> >>) in eclipse occurs due to use of keyboard(Tab) and empty space(......) occurs in eclipse due to use of Keyboards(Space bar) in the java editor.
What is the significance of it in programming and in the editors? Why is it shown differently in the Eclipse editors? What is the actual use of it and where it helps?
Can it allow to represent in the same way for, characters like new line(\n),vertical tab (\v),form feed (\f) etc.?

There are three ways of indenting: spaces, tabs and hybrid.
Spaces are environment-invariant: if you are indenting by two spaces, it will be two spaces in every terminal, every editor. Different programming languages have different coding style mores. E.g. Ruby is usually written with two-space indents, Python with four-space ones. Some people like space-based indentation, and can be very vocal about it.
Tabs will usually see people indenting by exactly one tab. It is up to the environment how to display it. The default is usually one tab in every 8th column, but editors will usually be able to adjust this. That way, if you disagree with a colleague about how many spaces are best, each can set their own environment as they wish. Some people like tab-based indentation, and can be very vocal about it.
Hybrid is a nightmare. If you mix spaces and tabs, expect trouble, as it will typically happen that you will encounter pieces of code that are horribly misformatted, wherever that colleague touches it. Avoid hybrid indentation at all costs. The only people who don't absolutely hate hybrid indentation are those who haven't dealt with it yet, or don't understand why any of this is happening.
Now, it is very hard to avoid the hybrid indentation if you don't know which indentation method is actually present in the file, especially if your editor is helpfully emulating tabs when you have space indentation, e.g. by deleting the whole indentation level when you press a single backspace (as is normal in most editors).
Furthermore, there are some horrible programming languages (such as Whitespace and Makefile) that semantically distinguish spaces and tabs, and it is thus critically important to see what each character actually is.

Related

How to add support for a custom non-unicode font in VSCode?

I have a custom fantasy script which looks like this (just the text portion):
It is a monospaced font built with FontForge. How can I add support for it to VSCode, so I can type in ASCII (like the left side here), and it outputs the random UTF-8 symbol mapped to the custom font in VSCode? So I can then save the file and have it be either a bunch of gobbledygook characters or the ASCII characters I originally typed?
Ideally this could be a plugin, so if you know of an open source VSCode plugin which I could use as inspiration, that would be a perfect answer as well.
I see how to set a custom font in VSCode, but (a) that is globally, and (b) it doesn't necessarily solve the typing problem. I just really would like to know how to do this, not necessarily requiring an answer to implement it.
Recommended UX is to have a "separate keyboard" for it, meaning typing the keys on the keyboard would result in different values. Maybe something like that can be done on a per-file basis?

How to put tap space in my code while using prettier in vscode

Prettier is useful in most times. But, sometimes I want to put tap space in my code for enhanced reading of the code. Is there any way for put tap space in my code intentionally while using Prettier?
I think you mean tab spaces with a b not a p. if that's correct, then no, in general prettier does not allow for discretionary tabs, because it is what is known as an opinionated formatter, meaning that it has its own opinions about the way code should look.
If you want more control over your formatting, you can uninstall prettier and choose a different formatting extension instead, like beautify - or even just use the built-in VS code language features, which provide formatting and are fairly customizable.
In the settings section of VS code, you can search for terms like tab and white space to customize the behavior.

What to do with the inconvenient tab suggestions of Matlab

Why doesn't Matlab put your variable's names on the top of it's suggestion like Eclipse. It's not smart to put everything in alphabetical order. Scrolling down to the function/variable you are looking for sometimes takes more time than typing it yourself. Besides it should also complete a function by writing the parenthesis and placing the courser in the middle of the parenthesis. Is there any way I can change the preferences to that it would act like Eclipse?
In short: No.
Matlab is not eclipse and it will never be. M-code is not Java code.
If you want to you can use eclipse to edit your m-files, however it will not behave as you describe in your question. This is because m-code is not as strict as for example Java, this is on one side the downside of Matlab as you describe above, however the positive side of this is that it offers flexibility during development.
Using a tab after typing some characters would narrow the possibilities for auto-fill, if you have selected this property in the Preferences-Keyboard window.

Tab vs Space indenting (Dreamweaver vs NetBeans) problem

I use Dreamweaver at work and NetBeans IDE at home, but in both cases project is stored at github. My problem is that NetBeans seems to be constructing code indenting out of spaces and when opened in dreamweaver or exported to github, indenting here and there breaks (moves unexpectedly further then it was intended or vice versa), although when opened again in NetBeans, goes back to normal. It has been pain for some time already. Is there any resolution to this?
I should say that we at work (and me including) prefer tab indenting.
It depends on the IDE's definition of a TAB. There are usually options within the IDE to indent using a TAB but turn the TAB into a given number of SPACES. I usually indent using TAB but have the IDE turn that into 3 SPACES. This means that it doesn't matter what I (or anyone else) use to read my code later the indets are always the same.
In NetBeans you need to look in the Code Editor options but I have no idea where to find the settings in Dreamweaver.
Its been known that one should use double space rather than tab, because that fact that different IDEs define how the tab button works DIFFERENTLY.
For example, emberjs team require contributor to use double-space rather than tab for formatting the code.
It make sense that to use something recognized in common without an IDE, so that the code structure will not be a problem in a highly collaborated coding team environment.
HOWEVER, if customization of how a tab works in an IDE is enabled, tab will be a great time saver in this case-- Press twice the button cost 200% of the time to press one obviously :)
Hope that helps!

Setting up your editor: indentation and encoding

I'm developing a small project with some friends and we're facing some indentation issues. Each of us is using a different editor (we all have different favorites :) and we also are on different operating systems.
What is the best solution to be able to all develop together and set our programming editors so indentation and encoding is the same? What settings do you recommend and why?
You should have your version control system handle the line ending problems. In SVN, the "svn:eol-style" property can be set to "native" to handle auto-converting the line endings. I assume your code is ASCII or UTF8 so you don't have problems with character encoding.
As far as formatting goes, you'll have to choose roughly some style, such as where to put the braces, but there's no reason you have to have the same indent style, provided you use the same number of indents. That's a confusing statement, so allow me to explain: nearly every IDE ever has the ability to set tab widths to any value you want. If one team member likes to indent 2 character widths, another 4, that's fine. One tab character stored in the file can display either way based on IDE settings. Just configure your IDE to indent with tabs and then set the tab widths per your desires.
(at the risk of starting a flame war, this is why I am solidly in the camp of tabs in the tabs vs spaces war. strangely, the spaces folks seem to consider this very feature the reason to use spaces... I will never understand them).
If you are all insistent to have your own indentation settings, then you will need to use exclusively the tab character to indent the code. (Provided your various editors support this).
This approach is counter to the general consensus of using spaces and only spaces for indenting purposes.
Whatever you do, I recommend converting tabs to a common number of spaces. I know Eclipse can do this on the fly, but I'm not sure if edits like gvim can. In any case, with all spaces it is not up to the individual editors/IDEs to interpret how many spaces make up a tab. Also, if anyone's using a Windows editor/IDE, set it to use Unix-style newlines, so that you don't get the annoying ^M at the end of every line when you edit in a different OS.