Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] Ability to set default highlighting for extension-less files. #9466

Open
core-ai-bot opened this issue Aug 30, 2021 · 10 comments
Open

Comments

@core-ai-bot
Copy link
Member

Issue by nextgenthemes
Tuesday Mar 17, 2015 at 06:32 GMT
Originally opened as adobe/brackets#10753


Because of this adobe/brackets#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.

@core-ai-bot
Copy link
Member Author

Comment by prksingh
Wednesday Mar 18, 2015 at 06:22 GMT


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

@core-ai-bot
Copy link
Member Author

Comment by ryanstewart
Tuesday Mar 24, 2015 at 07:43 GMT


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.

@core-ai-bot
Copy link
Member Author

Comment by MarcelGerber
Sunday Mar 29, 2015 at 18:00 GMT


@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.

@core-ai-bot
Copy link
Member Author

Comment by nextgenthemes
Sunday Mar 29, 2015 at 18:10 GMT


@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.

@core-ai-bot
Copy link
Member Author

Comment by MarcelGerber
Sunday Mar 29, 2015 at 18:59 GMT


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.

@core-ai-bot
Copy link
Member Author

Comment by prksingh
Wednesday Apr 01, 2015 at 12:05 GMT


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.

@core-ai-bot
Copy link
Member Author

Comment by efmeeks
Wednesday Jan 13, 2016 at 21:11 GMT


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🤔

@core-ai-bot
Copy link
Member Author

Comment by sprintr
Wednesday Jan 13, 2016 at 21:17 GMT


@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.

@core-ai-bot
Copy link
Member Author

Comment by nextgenthemes
Thursday Jan 14, 2016 at 08:05 GMT


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.

@core-ai-bot
Copy link
Member Author

Comment by efmeeks
Thursday Jan 14, 2016 at 08:30 GMT


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

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

No branches or pull requests

1 participant