On Dec 16, 9:58 am, jgord <jgord1...@gmail.com> wrote:
> Good catch. Thanks. I put a note on the site. While I try out
> workarounds like you suggest, I suggested that the output from 'gofmt'
> could be redirected to a new tab rather than the current one in Gedit.
you do realise that gofmt has an option to replace the files it
formats right ?
so you don't have to manually replace the file with the ouput of
gofmt.......
1. If the reformat is successful, with no errors, it outputs the
reformatted file with a commented datetime stamp at the bottom.
2. If the reformat produces errors, it outputs a commented error
list at the top of the original source file.
3. Any other condition, it outputs the original source file.
It is posted at www.gohelp.wordpress.com under Go Format V2.
On Dec 16, 8:50 pm, befelemepeseveze <befelemepesev...@gmail.com>
wrote:
* Comment (<Control>3)
-----------
#!/bin/bash
char='//'
sed "s|^|$char|"
-----------
Input: current line
Output: Replace current selection
Applicability: All documents
* Comment out (<Control>2)
-----------
#!/bin/bash
char='//'
sed "s|^$char||"
-----------
Input: current line
Output: Replace current selection
Applicability: All documents
* --------------------- *
It should there be an option in the Output to choose 'Replace current
line'.
Thanks, I will add this to the Howto.
AFAIK gofmt -w <file(s)> does overwrite the original <file(s)> IFF
there are no errors during the formating/converting/rewriting.
Otherwise it keeps the original untouched and only produces a error
list on stderr.
On Dec 17, 2:00 pm, jgord <jgord1...@gmail.com> wrote:
> Yes, but I wanted the safety of easy recovery in Gedit, so didn't want
> to overwrite the original file.
You still have that safety.
It'll just say the file has been modified from elsewhere and ask if
you want to refresh it....
Also, you should be relying on external version control for recovery
anyways.....
Also you can get the "gedit-plugins" package using our distro's pkg
manager (sudo apt-get gedit-plugins on Ubuntu for example) and enable
the commenting plugin in gedit.
On Dec 17, 4:43 pm, befelemepeseveze <befelemepesev...@gmail.com>
wrote:
Go Format, Go Build, Go Run and Go Doc all now have real scripts
behind them in Version 2. They can display to a Pop up Window, a Pop
up Terminal or in Gedit depending upon your needs. Go Format
especially now behaves much better, with the new format in the
original edit tab, if it succeeds, or the original file restored, if
it does not, with multiple options for the error display.
I hope my small contribution to the Go project is useful.
BTW, has anybody used tortoisehg on Linux? I am starting on version
control.
John
On Dec 15 2009, 5:29 pm, jgord <jgord1...@gmail.com> wrote:
> For anybody that is interested, I have created a tutorial about things
> you can do withGeditunder Linux Gnome to make it a basic IDE for
> Go. www.gohelp.wordpress.com