Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Ability to set default highlighting for extension-less files. #10753

Closed
nextgenthemes opened this issue Mar 17, 2015 · 10 comments
Closed

Ability to set default highlighting for extension-less files. #10753

nextgenthemes opened this issue Mar 17, 2015 · 10 comments

Comments

@nextgenthemes
Copy link

Because of this #10141 and playing around I just got too the unfortunate fact that we can not set a default highlighting for extension-less files.

Steps to reproduce:

  1. Open a text/bash/any file without a extension
  2. Select a highlighting language
  3. At this point the top of the menu becomes available and says "Set as Default for .-Files" (I guessed the wording because my brackets is German)

Expected:
4. Make the grey "(default)" text actually move to what was selected.
5. Open a new extension-less file and have it highlighted with the previous "as default" selected highlighting language.

@prksingh
Copy link
Contributor

This makes sense to me. Adding to backlog for prioritization.

@ryanstewart
Copy link
Contributor

We don't do this with any extensions (we do it per file). So basically it looks like we need to bring this card back - https://trello.com/c/fH2JF9S6/338-101-user-selected-language-syntax-mode-per-file-extension-2

I'll move this from the icebox to the backlog and close the issue.

@marcelgerber
Copy link
Contributor

@ryanstewart I'm sorry, but actually, languages can already be set per file extension using the Language Chooser.
image

As soon as you click Set as default for .less files, the selected mode is always going to be used when opening a .less file.

@nextgenthemes
Copy link
Author

@marcelgerber @ryanstewart
The thing is I already made comments about him being wrong, then deleting them because I was testing it and it seems this actually not works as you expect it from the menu. Its not even working per file. I set a php file to HTML highlighting then switched project and back and its displayed with php highlighting.

@marcelgerber
Copy link
Contributor

It definitely works fine for me.
I changed a .less file to C highlighting, switched projects, restarted Brackets, and it's still highlighted as C.

@prksingh
Copy link
Contributor

prksingh commented Apr 1, 2015

Switching Less files highlighting to C does appear to work as mentioned. But I can reproduce the issue for extensionless files. This is what I did (windows):

Created a new file and saved it with no extension.
Switched mode from dropdown to Javascript and set it as default (Drop down still erroneously shows 'Text' as default)
Refresh brackets and the file opens as text

This aside however, I understood the original bug to also be about not having to explicitly set as default for a file with unknown mode -- So whatever mode is chosen for an unknown file becomes the mode by default.

@efmeeks
Copy link

efmeeks commented Jan 13, 2016

Hello everyone. I'm having an issue with this and was wondering if anyone knew the status or a workaround.

Steps to reproduce

  1. Open .bash_profile in Brackets
  2. Select language: Bash
  3. Select "Set as Default for . Files"
  4. Close Brackets
  5. Re-open .bash_profile

The default language for . Files has not been retained🤔

@sprintr
Copy link
Contributor

sprintr commented Jan 13, 2016

@meeksdoteric I have fixed it, I haven't been free for a while to write some unit tests for it. It should come in 1.7.

@nextgenthemes
Copy link
Author

Easy fix I did a while ago: Switch to Atom, awesome editor.

Also I think its a bit rude from @ryanstewart to close this legit issue hasty with false assumptions / claims. If I remember this correctly.

@efmeeks
Copy link

efmeeks commented Jan 14, 2016

@nextgenthemes well that's funny, I just deleted Atom today in favor of Brackets ;)

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

No branches or pull requests

7 participants
@ryanstewart @prksingh @nextgenthemes @marcelgerber @sprintr @efmeeks and others