This is what I get in MultiEdit if I press ALT-C, and then moving to the opposite corner with the arrow-keys
The blue background is the selected area, this I can copy, or delete...
Antonio Linares wrote:Cristobal,
Pero no podriamos activar el modo columna y que solo tenga que usarse las flechas ?
me suena haber visto algo de este modo en la documentación de Scintilla
Code: Select all | Expand
METHOD nModColumn() CLASS TEdtScintLocal nSw := ::SendEditor( SCI_GETMOUSESELECTIONRECTANGULARSWITCH, 0, 0 )if Empty( nSw ) ::SendEditor( SCI_SETMOUSESELECTIONRECTANGULARSWITCH, 1 , 0 ) ::SendEditor( SCI_SETSELECTIONMODE, SC_SEL_RECTANGLE , 0 )else ::SendEditor( SCI_SETMOUSESELECTIONRECTANGULARSWITCH, 0 , 0 ) ::SendEditor( SCI_SETSELECTIONMODE, SC_SEL_STREAM , 0 )endifReturn nil
Marc Vanzegbroeck wrote:Antonio,
This is what I get in MultiEdit if I press ALT-C, and then moving to the opposite corner with the arrow-keys
The blue background is the selected area, this I can copy, or delete...
Rick Lipkin wrote:Antonio
Just a quick thought .. I do not see a reason to show the entire path of the file you have open .. just the file (.prg ) name should be enough. That would shorten the tab size and be easier to read if you have several files open.
Thanks
Rick Lipkin
ps .. ctrl-y to delete a line would be also nice
Antonio Linares wrote:Cristobal,
What about Colin's smart indenting request ?
Have you reviewed it already ? many thanks
Code: Select all | Expand
METHOD AutoIndent() CLASS TScintilla local nCurLine := ::GetCurrentLineNumber() local nIndentation := ::GetLineIndentation( nCurLine ) local nPos := ::GetCurrentPos() ::PostMsg( SCI_SETLINEINDENTATION, nCurLine + 1, nIndentation ) ::PostMsg( SCI_GOTOPOS, nPos + nIndentation )return nil
Code: Select all | Expand
::oEditor:bKeyDown = { | nKey | If( nKey == VK_RETURN .or. ; nKey == VK_UP .or. nKey == VK_DOWN,; ::FillFuncList(),),; If( nKey == VK_RETURN,; ::oEditor:AutoIndent(),) }
Code: Select all | Expand
METHOD AutoIndent() CLASS TEdtScintLocal nCurLine := ::GetCurrentLine()Local nIndentation := ::SendEditor( SCI_GETLINEINDENTATION, nCurLine-1 , 0 ) if ::GetLineCount() > nCurLine ::GoToLine( nCurLine+1 ) endif ::SendEditor( SCI_SETLINEINDENTATION, nCurLine, nIndentation ) ::GotoPos( ::GetCurrentPos() + nIndentation )return nil
Code: Select all | Expand
case nCode == SCN_CHARADDED // 2001 cLine := ::GetLine( nLine - 1 ) Do Case Case cChar = 13 .../... ::AutoIndent( cLine )
Code: Select all | Expand
METHOD AutoIndent( cLine ) CLASS TEdtScintLocal nCurLine := ::GetCurrentLine()Local nIndentation := ::SendEditor( SCI_GETLINEINDENTATION, nCurLine-1 , 0 )Local xLocal nPos := 0Local nInd := ::SendEditor( SCI_GETINDENT, 0, 0 )Local aCad1 := {"for ", "while ", "if ", "with ", "case " }Local aCad2 := {"next ", "enddo ", "endif ", "end ", "endcase ", ; "endwhile ", "endwith ", "else ", "otherwise " }//loop switch "Local nPosInd := ::SendEditor( SCI_GETLINEINDENTPOSITION, nCurLine, )DEFAULT cLine := "" //::GetLine( nCurLine - 1 ) // OJO con el nCurLine - 1 For x = 1 to Len( aCad1 ) nPos := At( aCad1[ x ], Lower( cLine ) ) if !Empty( nPos ) x := Len( aCad1 ) + 1 endif Next x if Empty( nPos ) For x = 1 to Len( aCad2 ) nPos := At( aCad2[ x ], Lower( cLine ) ) if !Empty( nPos ) x := Len( aCad2 ) + 1 endif Next x if !Empty( nPos ) nIndentation := nIndentation - nInd endif else nIndentation := nIndentation + nInd endif if ::GetLineCount() > nCurLine ::GoLine( nCurLine+1 ) endif ::SendEditor( SCI_SETLINEINDENTATION, nCurLine, nIndentation ) //::GotoPos( ::GetCurrentPos() + nIndentation ) ::GotoPos( nPosInd + nIndentation )return nil
Antonio Linares wrote:Rick,
Both requests implemented
Mark,
Alt-C is working now
Colin,
We are working to properly implement Method AutoIndent(), thanks
new version:
https://bitbucket.org/fivetech/fivewin-contributions/downloads/fivedit.zip
Code: Select all | Expand
//-- Browse created \%D \%T by \%W \%1 := TXBrowse():New( \%3 ) \%1:CreateFromResource( \%2 ) //-- Definir matriz de itens \%1:SetArray( \%4,.T. ) //-- Definir estilo xBrowseStyle(\%1) \%1:lHScroll := .F. \%1:nDataType := DATATYPE_ARRAY //2 se não estiver com o xBrowse.CH //-- Definir cabeçalhos \%1:aCols[1]:cHeader := "" \< //-- Definir tamanho das colunas \%1:aCols[1]:nWidth := 0 //-- Definir alinhamento dos itens \%1:aCols[1]:nDataStrAlign := AL_LEFT
Code: Select all | Expand
METHOD SysCommand( nType, nLoWord, nHiWord ) CLASS TScintilla local oWnd do case case nType == SC_KEYMENU do case case nLoWord == Asc( "i" ) oWnd = WndMain() if oWnd:oMsgBar != nil .and. ; oWnd:oMsgBar:oKeyIns != nil oWnd:oMsgBar:oKeyIns:lActive = ; ( ::Send( SCI_GETOVERTYPE ) == 1 ) oWnd:oMsgBar:oKeyIns:bMsg = nil oWnd:oMsgBar:Refresh() endif ::Send( SCI_EDITTOGGLEOVERTYPE ) case nLoWord == Asc( "l" ) if ::GetSelectionEnd() - ::GetSelectionStart() > 0 ::SetSel( ::nCurrentPos, ::nCurrentPos ) else ::nCurrentPos = ::GetCurrentPos() ::SetSel( ::PositionFromLine( ::nLine() - 1 ),; ::PositionFromLine( ::nLine() + 1 ) - 1 ) endif case nLoWord == Asc( "c" ) if Empty( ::Send( SCI_GETMOUSESELECTIONRECTANGULARSWITCH ) ) ::Send( SCI_SETMOUSESELECTIONRECTANGULARSWITCH, 1, 0 ) ::Send( SCI_SETSELECTIONMODE, SC_SEL_RECTANGLE, 0 ) else ::Send( SCI_SETMOUSESELECTIONRECTANGULARSWITCH ) ::Send( SCI_SETSELECTIONMODE, SC_SEL_STREAM, 0 ) endif otherwise // MsgInfo( nLoWord ) endcase endcase return nil
Code: Select all | Expand
case nCode == SCN_CHARADDED // 2001 cLine := ::GetLine( nLine - 1 ) Do Case Case cChar = 13 .../... ::AutoIndent( cLine )