Komodo / KomodoEdit

Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
http://www.komodoide.com/komodo-edit
Other
2.16k stars 302 forks source link

Makefile should force tabs (spaces aren't supported in make) #3167

Open sgeard opened 7 years ago

sgeard commented 7 years ago

Short Summary

When editing a Makefile (which is interpreted as Makefile) tabs are always converted to spaces

Steps to Reproduce

Open a Makefile and try to add a new rule

Expected results

### Actual results which means the rule's action is invalid ### Platform Information *Komodo IDE* *10.2.3* *Linux localhost 4.9.50-desktop-1.mga6 Komodo/KomodoEdit#1 SMP Wed Sep 13 23:14:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux* ### Additional Information Tabs are significant and not the same as spaces in makefiles. It should never be possible make spaces override tabs for these files.
Naatan commented 7 years ago

You likely have your indentation preferences set to spaces. Check out Preferences > Editor > Indentation. Also check the same preferences via right clicking the file tab and hitting "File Preferences".

Komodo has three levels of preferences: Files > Project > Global. If a preference is set on eg. a file then the global preference is not used for that file.

I'm not sure what you mean by "add a new rule".

sgeard commented 7 years ago

I just tried the following: 1) File > New > New File 2) Set the filetype to Makefile in the drop-down list on the far right 3) Enter the following: PHONY: all

all:

@echo "Building target all" (The above should read tab-at-echo but the markdown screws that up) 4) Save as _mkfile_ 5) Open a console where the file has been created and type _**make -f mkfile**_ Result: mkfile:4: *** missing separator. Stop. This is incorrect. For a Makefile the ability to override the tab settings with spaces is crazy. Setting the filetype to Makefile should be enough to ensure that tabs at column 0 are always tabs and never spaces. I can get the correct behaviour by changing the Current File Preferences but that shouldn't be necessary. Perhaps the syntax analyzer for makefiles if broken because I don't get any highlighting either. The rule in a makefile is what you tell make to do so the only rule in this file how to build the 'all' target. The action is preceded by a at the beginning of the next line, a space in that position is never valid.
Naatan commented 7 years ago

Thanks @sgeard, I'll look into forcing tabs for Makefiles.

sgeard commented 7 years ago

Thanks for your prompt response.