Sublime Forum

Extensions remembered incorrectly for project

#1

I’m using Version 3.1.1, Build 3176 with the sFTP package.

I’m working with a project that syncs several directories. Recently, when I click on a file to edit it, it will come up as a CSS document despite the fact the extension clearly labels it .php,.js,.pl, etc.

I can set the document to the appropriate type, but it forgets it the moment I close the file.

Here is a redacted copy of my sftp-config.json for the project.

 "type": "sftp",
"sync_down_on_open": true,
"sync_same_age": true,
"host": "example.com",
"user": "root",
"password": "MySecretPass",
"remote_path": "/var/www/htdocs/",
"connect_timeout": 30,
"keepalive": 120,
"allow_config_upload": true,

"save_before_upload": true,
"upload_on_save": true,
"sync_down_on_open": true,
"sync_skip_deletes": false,
"sync_same_age": true,
"confirm_downloads": false,
"confirm_sync": true,
"confirm_overwrite_newer": false,

"remote_path": "/var/www/htdocs/my_project/",
"ignore_regexes": [
    "\\.sublime-(project|workspace)", "sftp-config(-alt\\d?)?\\.json",
    "sftp-settings\\.json", "/venv/", "\\.svn/", "\\.hg/", "\\.git/",
    "\\.bzr", "_darcs", "CVS", "\\.DS_Store", "Thumbs\\.db", "desktop\\.ini", "php_errors.log"
],
0 Likes

#2

Bumping hoping somebody will look at this. If it matters, I have a paid license for Sublime.

0 Likes

#3

I’ve never used the SFTP package, but wouldn’t expect it to be a fault of that plugin.
have you got any other packages installed which could be influencing this?
or a syntax specific setting that tells ST to open everything as CSS?

0 Likes

#4

Hello Keith,

Thanks for responding. I don’t suspect it is the sFTP package either, but the project is using it so I included it.

I went through all of the different settings and couldn’t find anything related to the selection of languages for loaded files. I could post my settings files here, but I would need to redact an awful lot of stuff first since it has history and recent documents.

I don’t have a ton of packages installed. Just the core Package Manager, and listing the installed packages with it:

  1. Color scheme spectral
  2. color scheme selector
  3. Compare Side-by-Side
  4. FileZilla sFTP Import
  5. Keyboard spell check
  6. ModernPerl - Language support
  7. Package Control
  8. PerlSubs - Language support
  9. PerlTidy - Formatter
  10. Simple Print Function

I don’t have this problem outside of a project. If I open a file directly, it correctly opens as Perl. as well as using sFTP.

0 Likes

#5

Hi Keith,

On an unrelated note, I was having problems with my sFTP settings. Would really like to figure out a way to turn off publickey on a per host basis without having to use my own config file in ~/.ssh. While looking in /Packages/User to review my sFTP settings, I noticed one file out of place with odd permissions, ‘CSS.sublime-settings’.

After CAT’n the file I noticed my problem right away:
{
“extensions”:
[
“css”,
“js”
]
}

I didn’t know these files existed before, and don’t seem readily available from Preferences anywhere that I can see. Removing the “js” solved the problem. The other files I was testing before were all Perl/PHP files so I couldn’t see the connection yet.

What is bizarre though is the strange permissions (everything else is 700) and how “js” got added to it in the first place. I certainly didn’t do it on purpose :slight_smile:

Thanks for helping. You were right about what was causing it, but it was deeper down than Preferences.

0 Likes