Skip to content

Commit

Permalink
Updated readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris2011 committed Oct 9, 2017
1 parent 0be3207 commit cdf61ba
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
#Scratch Files for Netbeans
###With this plugin you can create scratch files which will be created in memory. You don't need a project for this. After typing Ctrl + Alt + Shift + N you can select File -> Save as... to save the file to any location wherever you want.
# Scratch Files for Netbeans
### With this plugin you can create scratch files which will be saved on disk. You don't need a project for this. After typing `Ctrl + Alt + Shift + N` you can choose a language and the file will be saved to your user dir: `/userDir/.netbeans/scratches`

The idea came me while using Sublime Text 2, where you can type Ctrl + N to creates an empty file. IntelliJ has such behaviour too: <a href="http://blog.jetbrains.com/idea/2014/09/intellij-idea-14-eap-138-2210-brings-scratch-files-and-better-mercurial-integration/">IntelliJ IDEA 14 eap 138.2210 brings scratch files...</a>.
It is not full functional but you can create new in memory files with Ctrl + Alt + Shift + N and Save as... wherever you want.
The idea came up while using Sublime Text 2, where you can type `Ctrl + N` to creates an empty file.
This is really simple, it will open a new tab with a Untitled file. Nothins special.

I found this little example, which I implemented: <a href="http://blogs.kiyut.com/tonny/2007/09/01/netbeans-platform-and-memory-file-system/">Netbeans platform and memory file system</a>
IntelliJ has a similar but more powerful functionalty too: <a href="http://blog.jetbrains.com/idea/2014/09/intellij-idea-14-eap-138-2210-brings-scratch-files-and-better-mercurial-integration/">IntelliJ IDEA 14 eap 138.2210 brings scratch files...</a>.

~~Next part is to implement the response from <a href="http://www.kiyut.com/">Tonny Kohar</a> to save this file the first time with a location popup, after~~
Unfortunately it is not possible to have 2 different functionalities for the
normal save logic. So that means, that you have to add a shortcut to Save As
for me Ctrl + Alt + S; Ctrl + Alt + S and then you can save the file whereever
you want and change the name and extension.
So my plugin is more like the IntelliJ functionaliy, because you will choose the target language after hitting `Ctrl + Shift + Alt + N` and it will open and automatically
save the file to your user `/userDir/.netbeans/scratches`. You can see all the saved scratches as nodes at `Services -> Scratches`

![Alt text](/screenshots/NbScratchFile.png?raw=true)
## Screenshots
### `File -> New Scratch File` or `Ctrl + Alt + Shift + N`
![Alt text](/screenshots/NbScratchFile.jpg?raw=true)


### Choose target language
![Alt text](/screenshots/ChooseLanguage.gif?raw=true)


### Service node integration
![Alt text](/screenshots/ServiceNodeIntegration.gif?raw=true)

0 comments on commit cdf61ba

Please sign in to comment.