On Mon, 19 Apr 2010 16:37:56 +0100
Martin <[email protected]> wrote:

> On 19/04/2010 16:14, spir ☣ wrote:
> > * indentation
> > I set tab&  indent widths to 4 chars.
> > But pressing tab key seems to indent according to a logic I cannot catch, eg
> >
> > function ...
> >           tab stops here: 9 chars
> >    
> You may want to turn off "Smart tabs", they indent according to spaces, 
> in the line(s) above the cursor.
> 
> Also if you are looking at indent, when pressing return:
> - In the options dialog, go to (in the left hand site tree) 
> Codetools/General. There are 3 checkboxes regarding indentation here. 
> This intentations works by analyzing your source coed, and indent 
> depending on the
> context found (e.g indent after "begin" differs from indent on normal line)
> - in the Editor/General settings is  "Auto indent" which always copies 
> the indent of the previous line (this has a lower priority than the 
> codetool intend)

Right, I played with these settings & I think the guilty one is smart tabs 
(still don't get how it works).
(Cannot find anything related to ndent in Codetools/General.)

> > * selection highlight
> > I'm unable to have selected text highlighted. Cannot find proper class in 
> > syntax highlighting settings.
> > Worse, When I select more than one line, relevant parts of lines (down to 
> > the last char) are not highlighted, only empty parts (after last char) get 
> > different background color. This is visually disturbing.
> >    
> This sounds like you may have set the background color of all chars to a 
> fixed color (and maybe they overwrite selection color)?
> 
> Editor options / colors
> 
> In the tree view of colors, go to "Text" / "text block"
> 
> If that does not help, please send your editor options xml file.  
> C:\Users\<username>\AppData\Local\lazarus\editoroptions.xml\editoroptions.xml

Yes! The style class I was looking for is "text block". Now, I get a different 
bg color for the relevant parts and none for the rest of lines.

> > * duplication
> > Is there a "duplicate" feature (duplication current line or selection)?
> > For info: this replaces select + copy + move + paste + move up&  down (to 
> > unselect and come back) in one key press.
> >    
> If you do any action such as move caret, or paste... The selected text 
> should become unselected. unless you use "persistent selection"
> 
> without persistend selection this should work
> - select block
> - ctrl-c
> - ctrl-v
> - ctrl-v
> 
> with persistent block, I believe it is ctrl-K ctrl-C
> (actually that works for non persistent too)

All right, but what about this feature [geany fans constantly use it and can 
hardly leave without ;-)]

> you can assign your keys in "Editor"/"Key Mappings" => "Text Selection 
> Commands"

Right, did it already in fact. Just miss the feature to which assign ctrl+D 
(duplication!).

> > * place cursor at end of line
> > When I place the cursor on an empty part of line, the cursor weirdly stays 
> > in the middle of nowhere instead of moving to the end of the line (just 
> > after last char). Is there a way to change this (for any reason this 
> > behaviour gets on my nerves ;-)
> >    
> Editor/General:
> 
> Disable "caret past end of line"

Thank you! By me it's called "scroll past end of line", maybe the reason why I 
overlooked it... There is also "cursor beyond end of line" in 
Codetools/General: I unchecked it before but it does not seems to have any 
action.

> Note that you still can enter spaces at the end of line. You can enable 
> them to be trimmed automatically (by default this only happens if you 
> leave the line)
> http://wiki.lazarus.freepascal.org/IDE_Window:_Editor_Options#Trim_trailing_spaces

Right, I don't use this because I want blank lines in an indented block to be 
correctly indented as well. I need this feature not to apply to blank lines 
(meaning be smart enough not to remove *leading* spaces that just happen to be 
also *trailing*)... there is an option for this in a few editors.

Thank you for all these tips,
Denis
________________________________

vit esse estrany ☣

spir.wikidot.com

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to