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

Use specific icons for each file type #153

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

gwenzek
Copy link

@gwenzek gwenzek commented Nov 29, 2019

Hi, this PR is more a proof of concept right now I haven't properly tested it, particularly with ST2.
I'm opening this to check the interest and get early feedback on how this should be implemented and what can possibly go wrong.

The idea is to replace the generic file prefix with something that depends on the file extension.
Using this with Nerd fonts it can results in a menu like this:

Screen Shot 2019-11-29 at 16 35 11

Here is what my settings file looks like (which render as garbage unless you have the correct font):

{
	"color_scheme": "Packages/User/scalaSublimeSyntax/Espresso2.tmTheme",
	"dired_icons":
	{
		"gitignore": "",
		"hidden-tmLanguage": "謹",
		"json": "",
		"LICENSE": "",
		"md": "",
		"py": "",
		"sublime-keymap": "\ue7aa",
		"sublime-menu": "\ue7aa",
		"sublime-settings": "\ue7aa",
		"sublime-syntax": "\ue7aa",
		"tmLanguage": "謹",
		"tmPreferences": "謹",
		"txt": "",
		"xml": "謹",
		"zip": ""
	},
	"font_face": "FuraCode Nerd Font Mono"
}

The mixed unicode characters and escape is because settings files are overriden by FileBrowser plugin in a way that doesn't preserved the escaping. I'm not sure what the best way to share this.
You can find unicode for an icon with the Nerd Fonts search tool.

@gwenzek
Copy link
Author

gwenzek commented Mar 11, 2020

I fixed a bug that was happening in the rename mode.
I accidentally changed how the space after the icon was scoped which make the rename mode go crazy.
I also updated the regex in the backspace keybinding to prevent the users from deleting the icon.

@gwenzek
Copy link
Author

gwenzek commented Mar 28, 2020

I had an issue where folding folder didn't work as expected in some specific circumstances.
Sometimes _get_name_point returns the folder icon instead of the start of the file name.
I added a specific test for that.

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

Successfully merging this pull request may close these issues.

1 participant