Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Tabs v Spaces #211

Closed
mattpass opened this issue Mar 26, 2013 · 6 comments
Closed

Tabs v Spaces #211

mattpass opened this issue Mar 26, 2013 · 6 comments
Labels

Comments

@mattpass
Copy link
Collaborator

No one can agree on tabs v spaces. Fact! ICEcoder uses tabs as the unit because I prefer to code with them as the indent unit. However, many/most people use spaces (insane as that may be). ;-)

Still, I need to allow for both methods. So, add a new setting of 'indent type' and a dropdown with options for tabs or spaces. Rename tabWidth to indentWidth and make CodeMirror use this method of indentation.

I'm keeping the default as 'tabs' tho!! :D

@mattpass
Copy link
Collaborator Author

All done as detailed. Done & closed.

@layanto
Copy link

layanto commented Aug 31, 2014

What about settings to have tab as spaces? I am moving from Notepad++ to IceCoder and am missing the tab to spaces function where pressing the tab key will insert 4 spaces instead of a tab.

@mattpass mattpass reopened this Aug 31, 2014
@mattpass
Copy link
Collaborator Author

Didn't know that was a function but sounds useful. Will check & see if CodeMirror (the editing component of ICEcoder) provides that in some way, if not will add code to handle that. Reopened.

@layanto
Copy link

layanto commented Aug 31, 2014

From CodeMirror manual:

Common example: map the Tab key to insert spaces instead of a tab character.

{
Tab: function(cm) {
var spaces = Array(cm.getOption("indentUnit") + 1).join(" ");
cm.replaceSelection(spaces);
}
}

@mattpass
Copy link
Collaborator Author

mattpass commented Sep 2, 2014

Good spot, can look to implement that into editor.php.

@mattpass
Copy link
Collaborator Author

mattpass commented Jul 3, 2015

This now seems to be handled by CodeMirror as default I think as it's working in ICEcoder now and I haven't added any extra code. Done and closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants