Edit 12 - How set icons in Remote Files, how hide Tabs lines?

  1. Why are missing directories icons there in ‘Open - Remote files’ window, as it was f.eg. in v. 7. ? I am working with files via FTP from devices, where it is really important for better orientation
    obrazek

  2. Why is not possible add ‘Open - Remote files’ as icone to any Toolbar ? Why I must still go to menu, when I am working via ftp ?

  3. Why is not possible - or where it can be foud - hide displayed Tabs ( ----> ) and spaces (.) ?
    obrazek

Hi @ims,

  1. Sounds like: https://github.com/Komodo/KomodoEdit/issues/2050. Unfortunately hasn’t been fixed.
  2. You could create a Userscript that opens the remote files dialog then create a Custom Toolbar Btn and assign the Userscript to it.
    ko.filepicker.browserForRemoteDir("blah") should do it.
  3. View menu > Show whitespace
  • Carey

PS. you can try that sample Javascript in View menu > Tabs & Sidebars > Console

ad 1 ) hmm … bug added in year 2016 is not fixed

ad 2) does not works for me … "‘ko.filepicker.browserForRemoteDir’ is not recognized as an internal or external command, operable program or batch file.
"
ad 3) if you turning it on and close Komodo with displayed whitespaces, then is impossible hide it. You must then turn off it in menu and close/open file again …

Hi @ims,

  1. Correct. And you’re the first person to notice it in 4 years :wink:

  2. It looks like I had a typo. It’s browse not browser. FYI there is completions in the console so you can try the code paths on your own if something doesn’t work correctly.

  3. I’m able to disable and enable show whitespace without issue and without close/opening the file. Not sure why you’re having issues. I restarted Komodo with it enabled and still don’t have an issue. Are you able to reproduce the issue? Maybe i’ve missed a step that you performed.

  • Carey

Yep I also noticed the icons where missing, there is a lot of that stuff lost with the redesign.
You can fix this by adding some custom less to you’re theme:

// Add folders and file icons to remote file/folder browser
#directoryTree {
	treechildren {
		&::-moz-tree-image {
		height: 12px;
		width: 12px;
		}
		treeitem[type="folder"] {
			background-image: url("koicon://ko-svg/chrome/icomoon/skin/folder2.svg?size=12") !important;
			background-size: 12px !important;
		}
	}
	treechildren::-moz-tree-image(remotefolder) {
		list-style-image: url('koicon://ko-svg/chrome/icomoon/skin/folder2.svg?size=12') !important;
	}
	
	treechildren::-moz-tree-image(remotefile) {
		list-style-image: url('koicon://ko-svg/chrome/icomoon/skin/file5.svg?size=11');
	}
}

You can add custom toolbars with buttons, that will trigger userscripts. From my own experience there are some issues with custom toolbars disappearing, so I wouldn’t point you at that direction.
The places widget has a cog menu where you can easily open a remote directory:

afbeelding

Also if you use this action a lot, you can add you’re custom key binding for this action.
Preferences > key bindings and search for remote:

afbeelding

This is because how the preferences are stored. If you enable or disable the show whitespace you’re editing the file preferences. So it’s correct when you say to a file it has to show white space, it’s stored as a file preference so after a reboot it will still honor you’re file settings.
You can also enable or disable whitespace on project level, but file preferences will always overrule project settings.

Looks like you’re executing it as command and not as userscript

1 Like

Ad 1) thanks - I added it , directories have icons, but missing any files in tree

Ad 2) I created own panel (right side) and put to script and it works well now (Only icone is not changed, but no matters)

I guess you’re using the “ko.filepicker.browserForRemoteDir” command.
This command if for selecting remote directories.

You can use the “ko.filepicker.remoteFileBrowser()” to pick a remote file, in this browser you will also see files. The other command only shows directories.

Thanks a lot … I do not know commands - it was adviced me…