IDE question

Everything else that doesn't fall into one of the other PB categories.
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: IDE question

Post 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
ssb
User
User
Posts: 44
Joined: Wed Jun 21, 2006 11:09 am

Re: IDE question

Post 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! :)
User avatar
skywalk
Addict
Addict
Posts: 4318
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: IDE question

Post 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.
:shock: 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.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
ssb
User
User
Posts: 44
Joined: Wed Jun 21, 2006 11:09 am

Re: IDE question

Post 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!
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Re: IDE question

Post by MachineCode »

skywalk wrote::shock: 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.
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: IDE question

Post 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. ;)
ssb
User
User
Posts: 44
Joined: Wed Jun 21, 2006 11:09 am

Re: IDE question

Post 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! :|
User avatar
skywalk
Addict
Addict
Posts: 4318
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: IDE question

Post by skywalk »

MachineCode wrote:
skywalk wrote::shock: 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 :evil: )
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
skywalk
Addict
Addict
Posts: 4318
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: IDE question

Post 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
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: IDE question

Post 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
User avatar
skywalk
Addict
Addict
Posts: 4318
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: IDE question

Post by skywalk »

:oops: ... :lol:
Great, will it work with Fred's next Scintilla include? think he said the next pb beta will have v3.1.0.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Post Reply