How can I find a file by name in Visual Studio Code?
A Visual Studio shortcut I'm used to is CTRL+,, but it does not work here.
When you have opened a folder in a workspace you can do Ctrl+P (Cmd+P on Mac) and start typing the filename, or extension to filter the list of filenames
if you have:
plugin.ts
page.css
plugger.ts
You can type css and press enter and it will open the page.css. If you type .ts the list is filtered and contains two items.
Press Ctl+T will open a search box. Delete # symbol and enter your file name.
I believe the action name is "workbench.action.quickOpen".
It is CMD + P (or CTRL + P) by default. However the keyboard bindings may differ according to your preferences.
To know your bindings go to the "Keyboard Shortcuts" settings and search for "Go to File"
It's Ctrl+Shift+O / Cmd+Shift+O on mac.
You can see it if you close all tabs
According to this Github page, it's now a simple Cmd+F inside the File Explorer tree on Mac (and presumably Ctrl+F on Windows). Found and highlighted all the README.md files I've been working on:
file search results in vscode file explorer pane
Caveat: The tree has to be fully expanded for this to work.
Related
The Mingw binary installation instructions (such as these) tells me to change the PATH environment variable in Windows, in order to use the gcc/g++ etc commands anywhere. This might also be necessary for some programming IDE to find the compiler. Failing to do so yields errors such as this:
'gcc' is not recognized as an internal or external command, operable program or batch file.
How do I do this specifically in newer versions of Windows (10/11) and which path should I use?
Right-click "My Computer"/"This PC" from Windows explorer and pick properties. Alternatively Windows key + X and click "System". An "About" window appears.
Scroll down to "Advanced system settings" and click on it.
Click on the "Environment Variables" button.
Select "Path" in the window that appears and click the edit button.
Click on "Edit text" (not on "Edit"!).
Before modifying anything, I strongly recommend to copy the text there and save it in a text file for backup, so that you can restore the PATH in case of mistakes.
Write a semicolon ; at the end of the text there unless already present. Then after the semicolon add the full path to your Mingw installation's bin folder. For example ;c:\mingw_w64\bin.
Important: if you installed Mingw under for example C:\program files\mingw_w64, then the path must be ;C:\Program Files\mingw-w64\bin; without any surrounding " ... ". If using the "Edit" command available in this window, then the " ... " will get added and this may break the gcc path from working. (It just happened to me and that's the reason why I decided to write this Q&A.)
Click OK for each open window.
Reboot Windows.
Now you should be able to type gcc from the command line or use it from your programming IDE.
Alternatively, for CLI users:
Open cmd.
Type PATH.
Add the absolute path to the bin folder to it.
Place a semi-colon at the end.
Press enter.
Reboot.
And you're done.
Edit: For the full path to the bin folder:
cd your way to Mingw installation's bin folder, or alternatively, press windows key + e.
Open mingw -> bin.
Copy the full path present in the search bar.
As #Lundin said, you should first make a copy of the original PATH and save it, just in case something goes wrong.
How can I set TextMate as default text editor on Mac OS X?
I've tried it with
ln -s /Applications/TextMate.app/Contents/Resources/mate ~/bin/mate
export EDITOR='mate -w'
but that doesn't work.
Just right (or control) click a file of the type you want to change and:
"Get Info" -> "Open with:" -> (Select TextMate) -> "Change All"
The method through Finder is not practical. If you're a developer, your files likely include .profile, .gitconfig, .bashrc, .bash_profile, .htdocs, etc.
The best way to do this is in Bash (for Sublime Text 3):
defaults write com.apple.LaunchServices LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}'
For other text editors, I assume you can replace 'com.sublimetext.3' with the proper string. You could probably Google for your text editor's name + "LSHandlerContentType=public.plain-text" to figure out what your app's string would be.
For me, this changed the defaults for both Finder, and
$ open ~/.bashrc
Have you modified your shell PATH environment variable to include ~/bin? That directory is usually not included in PATH by default on OS X. It might be simpler to create the symlink in /usr/local/bin which is usually included in PATH. Try:
echo $PATH
This worked for me on OS X v10.11 (El Capitan):
defaults write com.apple.LaunchServices/com.apple.launchservices.secure LSHandlers -array-add \
'{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.macromates.textmate.preview;}'
For TextMate 2:
defaults write com.apple.LaunchServices LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.macromates.TextMate;}'
And you need to restart after that.
To change the default text editor across the board, use the aforementioned method (i.e., "Get Info" → "Open with:" → (editor of choice) → "Change All") on .txt files. Then it will be used as the default editor for any text-based file that doesn't yet have an application preference for its extension.
For instance, if you use the terminal, the command open -t will use your preferred text editor, which is whatever application is associated with .txt files. By default this is (you guessed it) TextEdit, unless you explicitly specify otherwise.
I found Replace Text Edit as the default text editor on apple.stackexchange which works really well.
For developer-type files like .gitignore, use the last option provided:
duti -s com.macromates.TextMate public.data all
Substitute your editor's CFBundleIdentifier as needed. To find it, locate the application file, right-click and choose Show Package Contents, then open Info.plist in the Contents folder. CFBundleIdentifier should be near the top...
This work on Catalina. I'll update my answer if/when I update my OS.
I am new to php and cake php. I am attempting to bake up some cakephp code in the Windows Command Prompt. When I do the command "cake bake" within C:\xampp\htdocs\cake\lib\Cake\Console, I get no result, just a blinking cursor. Has anyone else ever had this happen or have any suggestions that might be helpful?
Go to the dir C:\xampp\htdocs\cake\app.
I don't know which version of Windows you have. However, you must access Environment Variables Access it by any mean.
In Windows7:
Right Click on Mycomputer-> Properties -> click on Advanced System Settings -> The last button Environment Variables is there, click on it From System Variables list select Path and then press Edit button. You will see a line of code, at its end add something like the following:
;C:\xampp\htdocs\cakephp\cake\console\;C:\xampp\php
The first path is the path in-which cake.bat file is found
The second path is the path in-which php.exe is found.
Restart your coputer and you will find cake bake works fine at any directory you want.
I am trying to figure out how to start using SASS files in Dreamweaver.
The error message I get when trying to open is: "Can't find a valid editor for this file extension".
All my SASS files are valid and open well with Eclipse.
Thanks in advance to anyone who could post any tips on this one.
OK. I have found the answer.
All you need to do is open Dreamweaver, go to Edit> Preferences> File Types / Editors
and in the top text box ("Open in code view:") listing various files extensions add .sass.
That's it. Rest is down to haml and compass.
I hope this post will help anyone having similar problem.
To go even further and make Dreamweaver treat .scss files as .css files (applying code coloring and indentation), just follow the instructions on this Adobe TechNote
The visual28 link no longer works. Here is a quick rundown from here
DreamweaverCS?/Configuration/DocumentTypes/MMDocumentTypes.xml
If Windows change winfileextension="css" to winfileextension="css,scss"
If Mac change macfileextension="css" to macfileextension="css,scss"
For older Dreamweaver:
http://www.visual28.com/articles/less-scss-syntax-highlighting-in-dreamweaver
For Dreamweaver 5.5 and above:
http://forums.adobe.com/thread/861133
instead to go in your installation directory to find the 'MMDocumentTypes.xml' file, GO to
C:\Users\\AppData\Roaming\Adobe\Dreamweaver
CS5?\en_US\Configuration\DocumentTypes\MMDocumentTypes.xml
and then find winfileextension="css" and change it to winfileextension="css,scss"...
That would definitely work..
Update to the latest version of Dreamweaver
Ensure that ‘Show hidden files’ is enabled in Control Panel > Folder options
Open your user folder eg C:\users\Dylan\ replacing with your name
Then open AppData/Roaming/Adobe/Dreamweaver CS6/en_US/Configuration/
Open the file Extensions.txt
Replace the first line with the following:
HTM,HTML,SHTM,SHTML,HTA,HTC,XHTML,STM,SSI,JS,JSON,AS,ASC,ASR,XML,XSL,XSD,DTD,XSLT,RSS,RDF,LBI,DWT,ASP,ASA,ASPX,ASCX,ASMX,CONFIG,CS,CSS,LESS,SCSS,CFM,CFML,CFC,TLD,TXT,PHP,PHP3,PHP4,PHP5,PHP-DIST,PHTML,JSP,WML,TPL,LASSO,JSF,VB,VBS,VTM,VTML,INC,SQL,JAVA,EDML,MASTER,INFO,INSTALL,THEME,CONFIG,MODULE,PROFILE,ENGINE,SVG:All
Documents
Replace the following line:
CSS:Style Sheets
With
CSS,LESS,SCSS:Style Sheets
Save and exit the file
Go to the folder DocumentTypes
Open the file named MMDocumentTypes.xml
Replace the line beginning with:
=>documenttype id="CSS"
with
<documenttype id="CSS" internaltype="Text"
winfileextension="css,less,sass,scss" macfileextension="css"
file="Default.css" writebyteordermark="false" mimetype="text/css" >
Save and exit the file, and restart Dreamweaver
Syntax highlighting now works
Could someone can explain me why can't I see a file copied to C:?
Note that if I try to copy it again to the same location, the system ask me if I want to override it.
Not a matter of weird attributes, or common stuffs ;)
Hope I can find an answer here...
Solved,
I noted there was a magic "Compatibility files" link in the tool bar. Just clicked on it and the files I had copied suddenly showed up their faces.
Thanks anyway,
Maybe you've set the file of that extension to be hidden? Does it appear with the 'dir /H' command?
Sounds like you may need to refresh the folder - use F5.
Alternatively, if the file is hidden, you may need to "show hidden files".
To do that, hold down alt -> Tools menu -> Folder options -> View -> Show hidden files and folders.