Page 2 of 2
Re: IDE question
Posted: Sun May 27, 2012 8:24 am
by Danilo
ssb wrote:This might sound silly, but what is the keyboard shortcut to delete current line in IDE?
Scintilla's standard "line-delete" combination (Ctrl+Shift+L) does nothing and Ctrl+Shift-Del only erase from cursor position to EOL, not the whole line.
Thanks!
Make this an IDE tool ("Delete current line") with keyboard shortcut Ctrl+Shift+L:
Code: Select all
Scintilla = Val( GetEnvironmentVariable("PB_TOOL_Scintilla") )
If Scintilla
SendMessageTimeout_(Scintilla,#SCI_LINEDELETE,0,0,#SMTO_ABORTIFHUNG,2000,@result)
EndIf
You can do this with all
Scintilla Keyboard Commands
Re: IDE question
Posted: Sun May 27, 2012 3:18 pm
by ssb
This is an excellent example of what can be achieved using an IDE extension (aka IDE tool).
Thanks for your invaluable help, Danilo!

Re: IDE question
Posted: Sun May 27, 2012 4:49 pm
by skywalk
MachineCode wrote:skywalk wrote:I know [Ctrl+L] = goto last line, but that is almost useless since it is not directional
What do you mean? It goes both backwards and forwards for me.

Can you explain? How do you make the IDE goto recent line in reverse?
[Ctrl+Shift+L] does nothing for me...And successive [Ctrl+L]'s eventually runs out of the list and stops.
Danilo wrote:You can do this with all Scintilla Keyboard Commands
Thanks Danilo...I would really love this to be native, cause we're talking dozens of small tools and modifying shortcuts and keeping track.
Given PureBasic's IDE uses Scintilla, then it makes sense to inherit most of its built-in functions.
Almost like a standard.
Re: IDE question
Posted: Sun May 27, 2012 5:16 pm
by ssb
skywalk wrote:Given PureBasic's IDE uses Scintilla, then it makes sense to inherit most of its built-in functions.
Almost like a standard.
Well said, skywalk!
Re: IDE question
Posted: Mon May 28, 2012 12:09 am
by MachineCode
skywalk wrote:
Can you explain? How do you make the IDE goto recent line in reverse?
Maybe I don't understand what you mean by "reverse". What I mean, is that it will go back and forth in my source, depending on where I've moved the cursor.
So if I'm at line 500 of a 1000-line program, and I do a "Find" to go to line 250, and then I go to line 750; then doing Ctrl+L will jump me back to line 250 (since that was the previous cursor location). That's what I meant. And forwards in my source like that, too.
Re: IDE question
Posted: Mon May 28, 2012 4:50 am
by Danilo
skywalk wrote:Thanks Danilo...I would really love this to be native, cause we're talking dozens of small tools and modifying shortcuts and keeping track.
Given PureBasic's IDE uses Scintilla, then it makes sense to inherit most of its built-in functions.
Almost like a standard.
Of course you are right and I fully agree that it should be added to the PureBasic IDE, defining
own shortcuts for everything that's possible. Minimalistic coding may be good if you code for
end users, but not if you make products for experts or programmers.
You know the situation with feature requests, it can take years or it never happens, so do it yourself
is the only real solution. Now - instantly. Life's to short for awaiting things to be done by others.

Re: IDE question
Posted: Mon May 28, 2012 1:23 pm
by ssb
Danilo wrote:You know the situation with feature requests, it can take years or it never happens, so do it yourself
is the only real solution. Now - instantly. Life's to short for awaiting things to be done by others.

Big truth!

Re: IDE question
Posted: Mon May 28, 2012 4:37 pm
by skywalk
MachineCode wrote:skywalk wrote:
Can you explain? How do you make the IDE goto recent line in reverse?
Maybe I don't understand what you mean by "reverse". What I mean, is that it will go back and forth in my source, depending on where I've moved the cursor.
So if I'm at line 500 of a 1000-line program, and I do a "Find" to go to line 250, and then I go to line 750; then doing Ctrl+L will jump me back to line 250 (since that was the previous cursor location). That's what I meant. And forwards in my source like that, too.
Hard to explain, but in Visual Studio, you can step through previous lines no matter what file you were in and return using the opposite keystroke. In my case I use the Shift key as an opposite. Much like [F3] will find next occurrence forward and [Shift+F3] will find the next occurrence backwards. (Which we also cannot do in PB IDE

)
Re: IDE question
Posted: Thu May 31, 2012 4:15 am
by skywalk
Hi Danilo,
While I can get LineDelete, UCase & LCase tools to work using your snippet modified for the specific actions, my next favorite Scintilla/NotePad++ keystroke is thwarted in the PB IDE.
Code: Select all
; This doesn't work in PB IDE :(
; Compile & assign ct_sci_kybd_mvSelLinesDown.exe --> Shorcut = [Ctrl+Shift+Down]
; This becomes the opposite of ct_sci_kybd_mvSelLinesUp.exe via Shorcut = [Ctrl+Shift+UP]
#SCI_MOVESELECTEDLINESUP = 2620
#SCI_MOVESELECTEDLINESDOWN = 2621
Define.i ri, hSci = Val(GetEnvironmentVariable("PB_TOOL_Scintilla"))
If hSci
SendMessageTimeout_(hSci,#SCI_MOVESELECTEDLINESDOWN,0,0,#SMTO_ABORTIFHUNG,2000,@ri)
EndIf
Re: IDE question
Posted: Fri Jun 01, 2012 10:39 am
by Danilo
skywalk wrote:Hi Danilo,
While I can get LineDelete, UCase & LCase tools to work using your snippet modified for the specific actions, my next favorite Scintilla/NotePad++ keystroke is thwarted in the PB IDE.
Code: Select all
; This doesn't work in PB IDE :(
; Compile & assign ct_sci_kybd_mvSelLinesDown.exe --> Shorcut = [Ctrl+Shift+Down]
; This becomes the opposite of ct_sci_kybd_mvSelLinesUp.exe via Shorcut = [Ctrl+Shift+UP]
#SCI_MOVESELECTEDLINESUP = 2620
#SCI_MOVESELECTEDLINESDOWN = 2621
Define.i ri, hSci = Val(GetEnvironmentVariable("PB_TOOL_Scintilla"))
If hSci
SendMessageTimeout_(hSci,#SCI_MOVESELECTEDLINESDOWN,0,0,#SMTO_ABORTIFHUNG,2000,@ri)
EndIf
Works fine here with a new
Scintilla.dll
Re: IDE question
Posted: Fri Jun 01, 2012 2:40 pm
by skywalk

...
Great, will it work with Fred's next Scintilla include? think he said the next pb beta will have v3.1.0.