Is it possible to launch tests on save using gogland jetbrains? - goland

The question is quite simple: Is it possible to launch tests on save using gogland jetbrains?
I know that I can launch go fmt or go imports from the Settings => Go => On Save panel. Is there a way to add other actions ?

Yes, it is possible.
In the picture below of the test runner
Click on the third button from top to bottom on the left side and that will trigger the last test configuration used after you save your changes.

Related

Jupyter notebook markdown without mouse click

For markdown there is a shortcut like typing a number(1,2,3,4..) in command mode (Esc) and then giving an Enter
The thing is that your cursor gets before the "###" (if you used 3) where you also need to click the End key to be able to write.
Is there a way to overcome the last action as it is very annoying.
What you already have is a one click solution, which is going to be hard to beat. The only improvement I can think of is to override the functionality that's inserting the markdown headings for you. You could extend it to also place the cell in edit mode and move the cursor to the end. This would be placed in your custom.js file, which you place here: ~/.jupyter/custom/custom.js.

Is it possible to use "Quick Export as PNG" in a Photoshop action?

This function seems particularly buggy in PS CC. Insert Menu Item calls it "Quick Export as Gif" and only imports it as "Select Menu Item".
Yes, it's possible to run a script from an action.
With an image open
Start a new action,call it "save as PNG".
Press record on the actions menu.
Run the script from the file menu.
Press "stop" on the actions menu
Please note: The script referenced by the action, needs to be in the same place for the action to work ach time - so make a copy before hand or make the action look for it in the scripts folder.
I've not looked at the script in question, so where it'll save, the file and under what name is anyone's guess. But the principle is sound.

Can't see tasks in aptana

I wonder why I can't see my // TODO: descriptions in my Task View in Aptana.
When I rightclick at the line number and choose Add Task it works and I can see my task in the
Window > Show View > Tasks
But when I just write a comment like this //TODO: fix this line as soon as possible.
Then it doesn't show up in the Task list.
When I check my preferences Window > Preferences > Aptana Studio > Tasks, there's TODO, XXX and FIXME in that list, so it looks like it should work, but it doesn't.
The code I'm working at is an Aptana Project Aswell.
The problem were that I had to change the type of the project in aptana.
The project was a Web project first, and WEB projects doesn't support TODO's in default.
Change the project to a PHP project and it works.
Maybe you can fix this somehow to make Web projects support todo's but I fixed it by changing the project type.
My current project is web based and you can create comments like
/**
* TODO do some stuff here
*/
Aptana will recognize "TODO" keyword and will put colored rectangle(color is dependent on the editing theme set in preferences) on the right side of the screen next to the scrollbar.
To create task, right click on the line numbers vertical bar and context menu will appear. Click the Add task menu item. Once you do this it will appear in the tasks panel window.
Plus you can mark the task as completed or set priority, high, normal and low.
If you want to define your own task type, you must first add it in preferences Window > Preferences > Aptana Studio > Tasks, then you can add a new configuration on Configure content in task view.

visual studio shortcut for MyFile.aspx "View in Browser"

I often need to display MyFile.aspx in the browser while it's not the actual file I'm working on: I might be working on a .js file that's referenced in Myfile.aspx file, or some back-end library.
So I have to switch from the tab I'm on the MyFile.aspx tab and then click the View In Browser button. Is there a way to avoid this extra step? I know I could set MyPage.aspx as the default start page and hit the Play button but then the whole site would be rebuilt and it would take even longer than finding and switching tabs constantly.
How can I add a button to the toolbar that directly previews MyFile.aspx in the browser?
I'm using VS2012 RC (really cool BTW)
Thanks for your suggestions.
Yes. You just should:
Go to Tools->Customize
Select the tab "Commands", click on the "Keyboard" button.
In the "Show command containing" textbox, type the following: file.viewinbrowser
Set a hot key for this
well your easy answer is to just keep that page open in the browser and just refresh the browser
a more complicated answer would be to add a external tool' command to do this. Go to Tools -> External Tools... and a new entry with the Command being C:\Program Files (x86)\Internet Explorer\iexplore.exe or whatever your browser of choice it and then put your URL in the Arguments field. If you want to assign this to a keyboard shortcut, follow the instrucutions at http://msdn.microsoft.com/en-us/library/80cb6ks3.aspx

How to bookmark code in XCode 4?

I couldn't find a way to put a bookmark inside the code in XCode 4. I know about the #pragma mark thing but it's not what I'm looking for. What I need is something that I can put and remove with a mouse click and navigate amongst with next and previous, like in VS.
Is there anything that I'm missing?
Bookmarks seem to have gone the way of the dinosaur in Xcode 4. This wouldn't have been so bad had the jump-to-bookmark popup above the editor in previous versions not also disappeared. The best replacement currently seems to be to use breakpoints (disabled individually, of course) and navigate with the Breakpoint Navigator.
Shortcut to breakpoints is Cmd + 8. Once there use arrow keys
File a bug report at http://bugreporter.apple.com if you feel something like this should be brought back.
Write below comment in your source file that you want bookmarked.
//<##>
And you can navigate to next / previous with: '^/' or '^?'
<##> means "placeholder of code snippet"
^/ means "jump to next placeholder"
^? means "jump to previous placeholder"
thanks
Another option, if anyone is still interested. The following directives will both produce a compiler warning that you can use as a bookmark:
#pragma message "<# message #>"
or
#warning <# message #>
If you want to place bookmarks using your mouse: create a code snippet with one of the 2 directives above. Drag & drop it to the line in your source file that you want bookmarked.
Navigate to next/previous with: Cmd-' and Cmd-Shift-'
In Xcode 4.4, if you leave a comment with this format:
// TODO: Your text here
it will be added as a listing in the jump bar alongside the list of methods in your current file, and then you can jump straight to that comment from that menu.
The simplest technique is to use a comment prepended by // TODO and then search, which allows you to jump through the issues from the navigator. Pretty hard to beat that technique.
I personally don't like using break points for bookmarks because it is not easy to enter notes. I use breakpoints as breakpoints, and prefer not to mix them up with bookmarks.
Anyhow, if you want to get a bit fancier you could get xcode to generate warnings // TODO: some message or // FIXME: some message that can be navigated in the issue navigator. I took the instructions below from this site:
Instructions
Head over to your project's item in the Project Navigator (usually at the very top)
Find your target in the list of targets on the left, select it
Head over to the "Build Phases" tab.
Click the "Add Build Phase" in the bottom right of this screen.
In the editor that appears insert the bash script shown below.
Now just build and you'll see all your //TODO: and //FIXME: comments have become warnings. I love this technique, it might not be right for everyone, but hope it helps someone.
Bash Script For "Run Script" Build Phase
KEYWORDS="TODO:|FIXME:|\?\?\?:|!!!:"
find "${SRCROOT}" ( -name ".h" -or -name ".m" ) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($KEYWORDS).*\$" | perl -p -e "s/($KEYWORDS)/ warning: \$1/"
You'll also be able to click on each of the warnings in the issue navigator to go right to the file and point in your code where you left the original //TODO: or //FIXME:
Extra pro tip: Make sure you're using phrases to describe your //TODO: comments like //TODO: Handle this error gracefully, and things like that. The phrases will show up in the issues list beside each warning.
Credit for the little tidbit should go to "Tim" on the Cocos2D forums, (found after Googling for a bit), I believe his solution originally was intended for Xcode 3 and didn't work if you had spaces in your path name, my script here doesn't have those restrictions, still he should get full credit here's his original post.
Like npellow's answer to this question of mine, appCode by JetBrains has also made this possible. So, this may be another reason to use appCode instead of Xcode4, except that it won't be free later in time.
My method:
type in grammar error code in the previous line.....
After changing something in other place, I can go back to the previous place because the grammer error line will show a red line in the right side scroll bar. It indicate the place.
It is not elegant but unless there is a bookmark feature, this is the way i am using at the moment
You can install an Xcode plugin called "XBookmark".
This plugin provide features below :
Toggle Bookmark
Show Bookmarks
Next Bookmark
Previous Bookmark
How to install XBookmark:
Install Alcatraz.
Search XBookmark from Window->Package Manager and click Install.
Restart Xcode.
Now, you can see menus about bookmarks in the Edit Menu.
PS : This plugin is open source.

Resources