In the worksheet, each time command is executed, it's output is added to "script output" page.
But the result from last executions is not cleared and it is very confusing.
Is there any way to auto clear all other outputs except the last one (instead clear manually each time)?
I did searched for solution but didn't find anything I can try.
Thanks
Attached the screens after first command and second command
First run:
Second run:
As far as I can tell, there's no such option. If you go to "Preferences" and search the whole list, there's nothing like that in there. Or, at least, I don't know it.
What you could do is to type
clear screen
(or even shorter, cl scr) in Worksheet.
Or, if you type fast and don't make much mistakes, press combination of
Alt + PgDn to navigate to script output
Ctrl + Shift + D to clear contents
Alt + PgUp to return up
Or, simply push the eraser icon in the toolbar.
Related
Good Day.
I am a hobby programmer, and am just looking for creative ways to get things done.
In particular, closing a tab or tabs in sublimetext3 through a cmd line method.
The even cooler thing would be, if so, is there a way to decide in cmd which tab to close e.g. 3rd from left/right etc?
In keeping with the idea that this is mostly curiosity and preference than anything else, so creative replies are definitely appreciated as well.
You can execute any command* from the command line, so this is very much possible.
For example, to close the active tab of the most recently used Sublime Text window, you can run subl --command close.
To close a specific tab, for example the 18th tab, which will have index 17 because it is zero-based:
subl --command 'close_by_index {"group": 0, "index": 17}'
(This is assuming bash syntax - for Windows cmd syntax, you may need to do some creative escaping because the command arguments have to be valid JSON and quoted as part of the same argument as the name of the command you want to execute.)
This is exactly the same command that would be run when right-clicking on the tab and picking Close Tab in the context menu. This command can be seen by inspecting Packages/Default/Tab Context.sublime-menu using the built-in View Package File functionality in the Command Palette. You can check this file to see other pre-defined entries like closing all other tabs, or tabs to the right etc.
*: Caveats being if ST is not already running, then it tries to run the command before plugins are loaded.
When I'm in project search (Shift + CMD + F) I can search the whole project for a specific word or expression. I can also enter a word I would like to replace it with.
If I click on one of the search results, it shows me the current version and the replacement version side by side. However, I can't find a way to confirm the replacement instance by instance! I only see a button to replace ALL instances, which is usually not what I want to do.
The reason is that certain words might be used in different context throughout the project, so usually not all search results shall be replaced.
How can I confirm the replacement instance by instance?
The replace one is on the each item that showing when mouse moved on each item.
As an alternative approach, you can press CMD + D repeatedly to select successive instances of a match, and CMD + SHIFT + D to skip any instance you do not want to include, and in this way case by case include each match in your find \ replace.
Also useful is CMD + U to undo the last selection action, in case you screw up during this process so you don't need to start over. Note, your shortcuts may be vary per operating system, but the procedure is the same.
I already got used to intellisense failing (cant really blame it, sql is weird per design) and I know I can "resfresh" it with (CTRL + SHIFT + R) - which sometimes even works.
What makes me mad is the "parameters peek" when I start writing a funktion call. It lists all parameters and highlights (bold) the parameter that is expected at that position.
As soon as something goes "wrong" the "parameter peek" disappears and never shows itself again. (i.e. dbo.SomeFunc(#val1 int , #val2 int) ... start writing "dbo.SomeFunc " and the "peek" will show up. Now insert "-1" instead of "1" and see it fail.)
This drives me crazy, is there a way to bring it up again? (Alt + Space or so?)
I dont know what that "parameter peek" is called and if it is part of intellisense or not. If its not possible to show it again, it would be nice to deactivate without the other intellisense funktions. I tend to rely on it when it pops up and go mad when it disappers again. >:(
SSMS v17.3 (14.0.17199.0)
Thanks in advance for any hint
Jan
Retyping the opening parentheses ( for the parameters does the trick for me in SSMS 2017.6
Until recently, when I typed
x=1;
2*x;
x
into the command window (without pressing enter after x) and pressed the arrow up key, the line was completed with the last command in the history that started with the already typed part, here the first line. Recently, the behavior changed to replacing it with the last command that contains the already typed part, i.e. the second line in the example, without me knowingly changing any setting.
How do I get the old behaviour back? In "Perferences->Keyboard->Shortcuts" (as per this question) the up key is associated with "Cursor up" and "Previous History Command", but the description of the latter is ambiguous regarding the expected behaviour when something is already typed into the command line.
First, make sure that the command history window is docked (If you have a floating window every time you press up then it is not docked. There is a drop-down menu - little circle with a triangle inside. Open the menu and select "Dock").
Once\if the window is docked, open the menu again and make sure that "Match Beginning" is selected and not "Match Anywhere".
I was trying to learn all the eclipse shortcuts... I couldn't find anything useful.
There are some shortcuts available for easy ones, like Find, Find in Files, Comment, Uncomment etc.
Is there any way to view all the eclipse shortcuts?
Clicking Ctrl+Shift+L from eclipse, will list all the shortcuts. This is pretty useful, as you don't need to switch to another window... You can do your work without any interruption.. :-)
Open Windows->Preferences->General->Keys. Now you can use the filter to find your shortcut and change its binding.
CTRL + SHIFT + L
Shows you a list of your currently defined shortcut keys.
However this will only show you custom short cuts that user have added therefore, Please find useful eclipse short-cuts below
CTRL + /
In line Comment
CTRL + SHIFT + /
Block Comment
CTRL + D
Delete row. Try it! You no longer need to grab the mouse and select the line, or select Home, Shift + End, Delete. Quick and clean.
ALT + Up/Down Arrow
Move the row (or the entire selection) up or down. Very useful when rearranging code. You can even select more rows and move them all at once. Notice, that it will be always correctly indented.
ALT + Left/Right Arrow
Move to the last location you edited. Imagine you just created a class "Foo", and now you are working on a class "Boo". Now, if you need to look at the "Foo" class, just press Alt+Left Arrow. Alt+Right Arrow brings you back to "Boo".
CTRL+SHIFT+O
Organize imports. What happens when you first use a class you have not yet imported? You will see an error. But when you press this magical combination, all your missing classes will be imported, and the unused imports will vanish.
CTRL+1
Probably the most useful one. It activates the quick fix. Imagine you create a class, which implements some interface. You will get an error, because the inherited methods are not yet implemented. While you are on line where the error occurs, press this combination to activate the quick fix. Now, select the "Add unimplemented methods" option. You can use the quick fix at every error you ever receive.
Quick fix comes in handy in other situations too. My favorite is the "Split variable declaration". Sometimes I need to broaden the scope of a variable. I activate the quick fix, split declaration, and use alt + arrow to put it where it belongs. You can find even more uses: Convert local variable to field, rename in file, inline local variable, etc...
You could use the "Split variable declaration" on the bar variable, and then move it with Alt+Arrows above the try block..
Or you could use the "Add unimplemented methods" fix here.
The best thing you can do if you see an error is to use the quick fix.
CTRL+SHIFT+T
Open Type. Imagine, that you need to have a look at the "Foo" class. But, where is the "Foo" class? Is it in the "Boo" project and in the "foo.bar" package? Or somewhere else? With this shortcut, you don't need to know. Just press it, type "Foo" and you are in.
CTRL+E
Shows you a list of all open editors.
CTRL+F6
Use to move between open editors. This is a slower alternative to Ctrl + E. It comes in handy in a situation when you want to periodically switch between two editors, something that is nearly impossible with Ctrl+E as it sorts entries quite randomly. Or you might just use Alt+Arrows...
CTRL+F7
Move between views. When in the editor, press Ctrl+F7 to switch to the Package Explorer, or hold Ctrl and press F7 multiple times to switch to other views.
CTRL+F8
Move between perspectives. The same as the previous.
CTRL + F11
Runs the application. What gets launched depends on your settings. It will either launch the last launched class (my preferred way) or it will launch the currently selected resource (the default way). If you want to change its behavior read the previous post.
CTL + N
Open new type wizard. This is not very quick because you have to select the wizard type (whether you want to create new class, jsp, xml or something else) in the next step. A much faster way would be if you could just hit the shortcut and invoke the particular wizard. It is possible, just keep reading...
CTRL + M
Maximize or umaximize current tab.
CTRL + I
Corrects indentation.
CTRL + SHIFT + F
Formats code. You can make beautiful looking code out of a mess with this. It requires a bit of setup, but it is well worth it. You can find its settings under Window->Preferences->Java->Code style->Formatter
CTRL + J
Incremental search. Similar to the search in firefox, it shows you results as you type. Don't be surprised if when you hit this combination nothing happens - at the first glance. Just start typing and eclipse will move your cursor to the first occurence.
CTRL+SHIFT+G
Bind this to "Generate getters and setters". This is a "must have".
ALT+C
Bind this to SVN/CVS "Commit".
ALT+U
Bind this to SVN/CVS "Update".
yes, you can go Window - Preferencee - General - Keys and see all available shortcuts. Also you can reorder keys here.
Also you can read more about eclipse shortcuts here