Weird string appears in Sublime text filenames - sublimetext2

Today when I started my work with Sublime Text I just discovered that a weird string appears in my filenames that is added dynamically by Sublime. It doesn't matter if it's a newly created project or saved file. (I have a paid license, however I don't think it's about that)
This is how it looks like:
What causes this and is it something I should worried about or not?

I'm assuming that you're opening files on a remote (S)FTP server with FileZilla 3. As pointed out in the comment, the name in brackets is the folder/project name. In this case the folder is a temporary folder created by FileZilla, hence the fz3- prefix.

Related

CSS file either deleted or is hidden in atom

I have been learning for just over a month now and I started my first project and I was coming to a close with it and literally last sec the CSS file is blank. I am using chrome and atom text editor. I did not have my git acc linked to it so history is not saved on it. The only thing showing on the file for the class is "
1
*
*
*
*
*
"
When I hit backspace it takes forever to delete because I'm pretty sure my code is just hidden there or something. I have no idea what happened. I spent some hours trying to fix it but no dice.
Have you tried opening the file in explorer?
If you right click on your project folder there is an option to open in file explorer. (This may say "Show in file manager" if you're using the latest version of Atom)
Check if the file is there, if it is, try opening it notepad or another simple text editor.
If it's not there it may have been corrupted, I've used atom quite a bit and never encountered this problem.
If it is, you can always just delete the file in your project folder and make a new one, pasting the contents in from when you opened it in notepad.

Saving sublime text snippets in a directory for reuse on different pc

Hey guys i am new to Sublime. I read in documentation how to create snippets. Now my question is how to save them in to a directory and then maybe reuse them on another PC.
Thanks.
You should save snippets in your Packages/User directory, where Packages is the directory opened by selecting Preferences -> Browse Packages.... You can then copy the .sublime-snippet files to your other PC by whatever means you prefer.
Save the file. When you do, you'll need to determine two things: its file name & where to save it.
File name: The file must end with .sublime-snippet, like this: foo.sublime-snippet. What goes in front of .sublime-snippet is up to you. I like to use the tabTrigger if at all possible, along with the main part of the scope in front of the tabTrigger, giving me this: html-p.sublime-snippet.
Where to save it: When you press Save, Sublime Text should automatically try to save the file in the right folder.
You shouldn't have to worry about the location, as Sublime Text should take care of it for you, but if for some weird reason you're not in the right place, then you'll need to navigate to the right location.

Sublime Text 2 - writing a script to process multimarkdown

There is an excellent package to preview markdown written using sublime text. I wanted to know how I might modify it, or perhaps use it as the basis for writing one that could process multi-markdown.
I'm using Linux (Ubuntu) and I'm currently calling multimarkdown in the terminal on each file.
One of the issues I think I might face is that multimarkdown refuses to parse an open file for some reason.
Any thoughts on how I might begin this or if an alternative solution exists would be very gratefully received.
There is a MultiMarkdown option in the syntax list - View > Syntax > Markdown > MultiMarkdown. Isn't that working? By the way the syntax (and almost any other) files are in packages folder of Sublime Text 2. This is the syntax file:
/Users/[username]/Library/Application Support/Sublime Text 2/Packages/Markdown/Markdown.tmLanguage
And MultiMarkdown file is in the same directory.
I'm intrigued by your statement that "multimarkdown refuses to parse an open file". Can you provide more information, or email me, or open an issue on github? MultiMarkdown doesn't check to see whether a file is open or not --- it simply reads the file and processes it. So if there's a problem, then the OS is not allowing MMD to proceed for some reason...
I don't have Sublime Text installed on Ubuntu (I generally use a command line only version of Ubuntu for testing MMD), so I can't test this situation exactly. I haven't had any other reports of difficulties parsing files (open or not). I don't have any trouble with Sublime Text 2 on Mac OS X and MMD.
As an alternative, you could try using one of the support scripts (e.g. mmd if you want MMD->HTML) and see if that has the same problem with open files.
PS> Are you using the latest build of MultiMarkdown, e.g. 4.2+?? (Though it shouldn't change anything related to open files)

Hard link to a file not working as expected on OS X

I've a file in a folder and I don't know anything about this file (how it's generated and updated) because it comes from an application running on my system of which I don't have the source code.
The file format is clearly json and I successfully created an hard link to it (using the shell command ln file hardLinkToFile) and placed it on another directory.
At this point I check the "2" files and they are exactly the same as expected, but when I perform an action in the application that cause an update of the original file the hard link doesn't get updated.
Any idea on how I can solve this problem?
UPDATE: As pointed out by both Vlad Lazarenko and mvds the file probably get deleted and a new one is created, is there something I can do to obtain a solution equivalent to the hard-link one I thought initially about?
If a hard link is not getting updated, it means that application is removing the old file and creates a new one. Thus, you still have a hard copy of the previous file, but new file has a totally different inode, though path is still the same. You can verify it simply by changing the content of that file yourself - the link should get updated.
I am getting the same behavior in TextEdit, but not in TextMate. I would suspect this is due to the revision control built in to OS X Lions document architecture. TextEdit uses versioning, while TextMate does not. Most likely this function replaces the file instead of changing it, as described by #Vlad Lazarenko.
#Vlad and Francesco. It's really in this way. I verified that vi leaves the inode unchanged and the src and dest file are both changed, while e.g. the kate editor doesn't and I was getting mad to understand why the changes I made in the src file weren't also in the dest file.
You can easily check this with the command ls -li srcfile destfile before editing one of them with each editor I mentioned.
By the way it's not nice that the hard link are application dependent
I guess it is a bit too late...
Anyways, accidentally I found that, if you change the default app for the file, the hard link gets separated from original file. Even if you click on change all and do not relate to that specific file.

How to edit preference file for Notepad++?

My open source project uses spaces, not tabs, in its code.
A contributor to the project has his own website which uses tabs, not spaces.
He uses Notepad++ in Windows to edit files for both projects, and is frustrated when he forgets to manually set the Preferences correctly and thus inserts tabs into my project's files.
Is there a way to edit this Preference via a script? That way he could click one icon to start Notepad++ in mode 1 (running a batch script to modify the Preferences file and then start the program) or click another to start in mode 2.
Or if there's any other way to make him not have to remember this chore, that would work too. Maybe having a Preferences setting that depends on what folder the edited file is inside of?
Any help would be appreciated. Thanks!
The notepad++ setting for replacing tabs with spaces is stored in following xml file
%USERPROFILE%\Application Data\Notepad++\config.xml
The following is the line that needs to be changed
<GUIConfig name="TabSetting" size="4" replaceBySpace="yes" />
Now I don't know how we can edit a file by batch script in windows, but if it is not possible, then he can keep two config files config-tabs.xml and config-spaces.xml. And in the script you can copy appropriate file depending on what he needs to work on.