Sublime Text Won't Find htdocs - sublimetext2

I'm trying to open a file in htdocs directory which is on my desktop but when I click on open folder on Sublime Text 2 it doesn't show htdocs as a directory. However I can open a file in htdocs using Sublime Text by simply clicking on it. I tried to display the path of an index.php in a browser but it only shows "." instead of the path.
I appreciate any help, thanks in advance.

Try to add the folder project at your Sublime Text, just go to Project/Add folder to Project and browse it, add a whole project or just add htdocs folder if you want, so you also can see your folder project, just go to View/Side bar/Show side bar and you can find a file search it by name with the shortcut Ctrl + P

I found that even if I create a shortcut of htdocs on my desktop the path stays the same. So for example "C:\xampp\htdocs..". I had to find that directory. In case if anyone else has the same problem.

Related

Inserting index.html file into Github Repository

I've created a very simple website in a Codecademy exercise that I'd like to upload to the Internet using Github Pages. Because you are unable to export your index.html and main.css files from Codecademy, I copy and pasted them into a word document, with the intent to get them in their proper file formats. However, I have been unable to find a source to convert these plain text files to .html and .css formats. Also, I've created an account on Github and a new repository, but the tutorial doesn't cover how to insert these two files into this repository.
How do I convert code from text in a document to .html and .css file format, and then insert these files into a Github repository? Thanks!
You don't need any special tools to convert plain text files to html or css.
You simply do it yourself as well.
Follow the steps to change .txt files to .html or .css:
Right-click on your index.txt or main.txt
Click on Rename from the list of options shown
Then it will take you to editing the file name
Navigate the cursor and delete txt
Type html in txt's place
Press Enter
Then you might receive a prompt asking if you are sure. Click on Yes/use .html whichever is appropriate for your prompt.
Voila! you have your file extension changed
Follow a similar approach to change the files to css as well
*Please note that my screenshots are from Mac OS and may look different from yours depending on the Operating system you are using
Hosting Webpages on Github:
Github pages website gives you a step by step guide with visual illustrations on how to do it.
If you are looking for a more comprehensive guide, then please refer to this page.
Seems nonsense, but after struggling a lot with Github Pages I have tested (and worked):
duplicate your first html file and rename it as index.html
drag and drop it into the /docs folder
drag and drop the remaining html files to the /docs folder (including the one you
have duplicated, of course with it´s original name)
commit changes
Goto Settings / Github pages and
Go down till “Github Pages”
Clic on the down arrow in [None] and select “main”
Clic on the down arrow in [/root] and select “/docs”
Clic on [Save]
After a few minutes you will see in [Settings] / “Github Pages”
Your site is published at
https://your_account_name.github.io/your_repo_name/

How can I let people download a file

I have a download link, which mysite.com/files/game.jar and that will download. But now I want people to download a folder with a text file and the jar file and a video. How can I do this?
PS: I have upload all the files to my site, but when I do mysite.com/files/game it just shows me all the files inside the 'game' folder.
Thanks!
I would suggest zipping / tarballing it up the folder and linking to that?
Would that not work?
As per my experience I have not seen a way to download a whole directory. You would have to dynamically zip the folder and make the resulting zip downloadable.
You can download single file like:
<a href="/images/test.jpg" download="logo">
Hope, this gives you right path.

Relative Link To Local File

I have a local HTML file that we are using as a USB Menu - when the USB device is plugged in the webpage will automatically open and show our menu.
In our menu we have a link to our installer. When the user clicks the link it opens our installer window.
The code is:
Install Our Plugins
The link works fine but we want to make the link to the file relative. Ie, make it;
Install Our Plugins
But when I change this the file no longer opens when I click the link. Any ideas what I am doing wrong? Is it possible to have relative paths for files?
The folder structure is like so:
- Root USB
- AUTORUN.html
- src
- Company Plugins.exe
I think you just want to remove the prefix scheme. Try:
Install Our Plugins
You could also try a . operator to signify the current directory:
Install Our Plugins

How to add icon for different file type in sublime 2

I want to switch my text editor to Sublime text 2 but the only issue cant let me do it.
I work with big projects and need very quick to navigate between files. ST2 sidebar doesnt support icon packs on such files .css, .html, ,php, .js etc. I found some article where the one guy explains how to do that - https://sublimetext.userecho.com/topic/19274-theming-of-the-sidebar/ I tried it but nothing happens. I tried do changes on the user-settings file. I suppose I do something wrong
If somebody knows how to do this please help
The newest stable version of Sublime Text 3 has sidebar themeing and many themes (not colour schemes) have added support for custom icons.
So upgrade to this: http://www.sublimetext.com/3
and then either use the default theme, or something like Soda theme to get custom sidebar icons.
For ST3 users. Adding icons for different file types and folders to default theme:
Download archive with icons. Or this one.
Go to Preferences > Browse Packages (In Windows find the Browse packages button to open the packages folder)
Copy(extract) folder from archive to packages folder. If you already have a
Theme - Default folder then just merge them.
Done. Thanks to Xavi Esteve

In Sublime Text 2, search for a folder

I'm using Sublime Text 2, and I'm looking for an entire folder within my currently loaded directory, which is pretty large.
I understand there are many effective ways to search for files with specific folders or the whole directory, but I'm searching for the folder itself, not any specific files in it. I've tried using the GoTo Anything feature, but it only seems to look for files, not folders.
Go "Project->Add Folder to Project". Select your folder and then appears a col in left. Only right click in your parent folder and: "Find in Folder..."
Hope helps ;)