So in Sublime Text 2, I can do control+shift+h to find something in all files, which is super helpful, but sometimes I kind of know what I need to find, but I don't know the exact name of it, so I thought it'd be helpful if I could do something like this:
Select * From table
WHERE colname ilike '%function%email%'
How do I do that?
It is not perfectly clear from your question what you want.
You can search regular expression over multiple files by right-clicking a folder in the sidebar. More info http://opensourcehacker.com/2012/05/11/sublime-text-2-tips-for-python-and-web-developers/#Searching_multiple_files
You can do Go to anywhere autocompletion by typing the first letters of filename and function name (CMD+T on OSX). More info http://opensourcehacker.com/2012/05/11/sublime-text-2-tips-for-python-and-web-developers/#Go_to_anywhere_shortcut
You can browse the functions in the current file with CMD+R OSX.
You can enhance autocompletion with SublimeCodeintel depending on your programming language:
https://github.com/Kronuz/SublimeCodeIntel
Related
I'm using Doxygen to create documentation to my project.
This tool is wonderful except an issue I have with the searching function.
When I try to use the search box he find files and function that starting with the letters I wrote.
I will explain..
I have 3 files in my project:
BaseTemplate.java
RegularTemplate.java
CustomTemplate.java
when I write 'Template' in the search box he didn't find anything. This because he search items(function, files, etc.) only by prefix.
Is there a solution to this issue?
Thanks
In a php File I have a class, which methods do not have PHPDoc comments.
PhpStorm suggests that I add them. I do Alt + Enter on each one, and I was wondering if there were a way to bulk fix all similar warnings like these.
Run the needed inspection (Code -> Run inspection by name -> i.e "Missing PHPDoc comment"), then in the "Inspections" tool window right-click on the inspection name and select quick fix, i.e "Generate PHPDoc comment".
I have a program that uses a file called user.cfg to get its user defined configuration settings. The odd thing is that they chose the syntax for this file to be Tcl (it's not odd that it is Tcl, it's odd they chose the .cfg extension instead of .tcl). So, when I open this file in Sublime Text, it doesn't know what syntax highlighting scheme to choose.
What I would like to do is set the syntax highlighting for user.cfg to Tcl, but not all .cfg files to Tcl.
I have seen this question which is very similar to mine, except in that case the special file name had no extension so Sublime Text knew to assign Ruby highlighting to only that one file. Unfortunately, I have an extension so the solution given there will not work for me.
Is there any known way to get Sublime Text base a highlighting scheme on the full filename?
Take a look at the ApplySyntax plugin.
The previous answer is completely true; however, I thought it would be better to have it here all in one place rather than going on another webpage to find the list of procedure to apply it
Sublime text 3
This is found here
Ensure Package Control is installed. Instructions are found here.
In Sublime Text, press Ctrl+Shift+P (Win, Linux) or Cmd+Shift+P (macOS) to bring up the quick panel and start typing Package Control: Install Package.
Select the command and it will show a list of installable plugins.
Start typing ApplySyntax; when you see it, select it.
Restart to be sure everything is loaded proper.
Enjoy!
Notepad++ is my go to editor for most things. I would like to develop a new command(keyboard shortcut) for doing something unique. Anybody has any pointers regarding how I can do this?
I would like to create a command which arranges selected text in certain order based on the characters found. I would also like create a keyboard shortcut for running the same command.
You have several options:
develop a macro - examine Macros dropdown menu in Notepad++
use AutoHotKey which can send keystrokes/mouseclicks, run apps/DLL's, work with clipboard, read any system settings, take values from input boxes and many more. Please see here for its sample usage with Notepad++
use JN plugin for Notepad++ and script your functionality in JavaScript - example. Similarly, there is a Python scripting plugin, too.
write your own N++ plugin. You get the best control, but without experience this is the most difficult option.
I'd like to create a package containing a series of snippets that incorporate user-definable variables. For example, I'd like the user to be able to provide a value for a variable called HOSTNAME and have the snippets include that user's value.
The Sublime Text Unofficial Documentation explains:
Snippets have access to contextual information in the form of environment variables. Sublime Text automatically sets the values of the variables listed below.
You can also add your own variables to provide extra information. These custom variables are defined in .sublime-options files.
I've had no luck finding any information on the syntax for a .sublime-options file, however, and Sublime does not seem to try to read a file with that extension when I save it anywhere under the Packages directory. Is this a typo?
Using a .tmPreferences file seems to do what I'm looking for. Is this the only method of getting user-defined values into a snippet? Is it possible to use a .sublime-settings file?
The .sublime-options, actually, is the .sublime-settings. .sublime-options were the ST1 files and the docs got outdated, BUT you use the wrong link, you should always check and switch in the sidebar on the left to your version - ST2, ST3.
And to answer your question, you need to put the variables in .tmPreferences as may be seen here