		Keyboard shortcuts:
		
		If key-sequence is like: Cmd-c
		It means: while holding Cmd-key down, press c-key.
		
		If key-sequence is like: Cmd-c-f
		It means: while holding Cmd-key down, press first
		c-key then f-key. It can be quite fast, more like: Cmd-cf
		 
		Cmd-Return		Open file
		Ctrl-BackSpace  Show and select next occurence of last search.
						If got too far, press arrowleft to go to last
						cursor position. Search again in short.
						To search backwards press
						Ctrl-Shift-BackSpace
						
		Cmd-f  Search
		Cmd-r  Replace
		Cmd-R  Replace all
		Cmd-g  Gotoline:	-1 and empty goes to file-end.
							-20 goes to 20 lines before file-end etc.
		Shift-Tab  Unindent
		Tab        Indent, complete word
		Ctrl-Tab   Insert Tab
		
		Shift-Return	Comment
		Shift-BackSpace	Uncomment
		
		Cmd-c  Copy		Try this: Cmd-c-f
		Cmd-v  Paste
		Cmd-x  Cut
		Cmd-y  Copy current line without newline, (yank line)
		Cmd-z  Undo
		Cmd-Z  Redo
		
		Ctrl-l   Toggle linenumbers
		Ctrl-x   Toggle syntax highlight
		
		Alt-f   Font setting
		Alt-s   Color setting
		Alt-t   Toggle color setting
		
		Cmd-n   Open new tab			Try this: Cmd-n-Return
		
		Ctrl-d  Close current tab and save it
		Ctrl-Q  Close current tab without saving it
		Cmd-q   Close editor and save files and configuration.
		
		Cmd-right  Walk tabs forward
		Cmd-left   Walk tabs backwards
		
		Cmd-e  Move cursor to lineend
		Cmd-a  Move cursor to linestart
		
		Cmd-shift-right  Select from cursor to lineend
		Cmd-shift-left   Select from cursor to linestart
		
		Ctrl-j  Scroll down without moving cursor
		Ctrl-u  Scroll up without moving cursor
		
		Shift-up		Select one more line up
		Shift-down		Select one more line down
		Cmd-Shift-up	Select 10 more line up
		Cmd-Shift-down	Select 10 more line down
		Cmd-up			Move 10 more line up
		Cmd-down		Move 10 more line down
		
		Alt-left  		Move cursor one word left
		Alt-right 		Move cursor one word right
		Alt-shift-left 	Select one more word to left
		Alt-shift-right	Select one more word to right
		
		
		# Not often needed:
		Ctrl-plus 	Increase scrollbar-width
		Ctrl-minus	Decrease scrollbar-width
		
		Ctrl-t  	Change indentation of selected lines to current setting
		
		
		While searching:
			Ctrl-n  Next match
			Ctrl-p  Prev match
			-	Copying text to clipboard is possible with yank-line etc.
			-	Changing the replacement string is possible while replacing.
			-	1: Press Space to exit search to focus.
				2: Double-click to exit to cursor.
				3: Press Esc to exit to cursor position at the start of the search.
				Press arrow-key to refresh view back to cursor, if necessary.
		
		While replacing:
			Return does what is expected.
		
		Default bindings: https://tcl.tk/man/tcl9.0/TkCmd/text.html#M192
	
	
	When is my file Saved to Disk?
	
		All tabs are saved to disk when:
		  - closing program, also configurations
		  - running file
		
		Current tab is saved to disk when:
		  - closing tab, if it had filename.
			New tabs get filename by pressing save.
		  
		  - opening file from disk when there already was another file opened
			in tab.
		
		Otherwise, changes are saved in memory
		
		This means that if you want to cancel all changes:
		  - do not run file
		  - do not close editor
		  - do not close tab with a filename
		  - do not open file in a tab which has already a file opened
		  
		  - instead close python-console with ctrl-d
		
		
	Editor
	  - Editor configuration is related to python-environment (sys.prefix)
		in which python console was launched. So if you have say two
		different envs in the same directory, they will have separate confs.
		
	  - Configuration is not saved if editor was not launched from
		virtual environment.
		
	  - If editor was launched inside a directory what is being
		version-controlled with git, the current git-branch will be shown
		in top-left corner.
		
	  - If you do something in python-console that waits for user input,
		Editor will be freezed during that time, like when viewing help
		of some function.
		
			
	Undo
	  - Undo is only partly functional due to lack of motivation. But it
		usually works just fine. Undo is reset when ever view is changed.
	
	
	Save-button
	  - To create a new file, add filename to entry and press save.
	  	This creates an empty file like 'touch'. This is done to
		ensure filepath is ok. Contents will be saved to disk in
		above mentioned situations.
	  
	  - If a file was already open and user changed filename in entry,
		old file is first saved (but not to disk) and then new file with
		same content is created in a new tab (its contents are not yet in disk).
	  
	  - Pressing save in tab which exists in disk does not do anything.
	  - Contents of tabs without filename are not saved when closing tab,
		or program, but tabs are still kept as placeholders.
			
		
	Open-button
	  - When in tab without filename, files can be opened from entry
		or by pressing button.
	  
	  - If tab had filename and user changed filename in entry and
		user presses enter: old file is first saved to disk and closed,
		then filepath in entry is opened in the same tab.
		
	  - If entered filename in entry and pressed open, entry is ignored.
	
	
	How to: copy-paste code-blocks in editor
	  - When copying, select additional empty line before block.
		This ensures indentation of whole block. If you do not do this,
		and select for example from 'def' - word, which has indentation,
		then indentation of this first line is wrong when pasted, compared
		to other lines. But editor moves cursor at the start of block so
		you can start fixing indentation of that line.
	
	
	How to: Execute part of the code from editor in Python-console
	  - Remember to put import-lines before the desired code-blocks. Then
		just select whole thing, copy and paste to console. You may have
		to press Return before last block executes. This is very useful,
		compared to writing all that in console is much more difficult.
		You might need to reduce indentation.
		
	
	How to: expand word
	  - When starting to write object-name that has already been used
		somewhere in contents like:
		
			self.at
		
		then when hitting TAB, editor searches all matches in contents which
		starts with self.at and shows them one by one when pressing again TAB
		until all matches have been showed.
			
			self.attribute1
			
	
	How to: change indent-depth
		For all files:
	  - If you started editor with: import henxel and e=henxel.Editor(),
		then to change indent-depth in python-console:
		e.change_indentation_width(8)
		
		For code-snippet:
	  - If you copied something to your editor that has different indentation
		than rest of the file:
		(Note that you don't have to do anything if it is indented with normal
		4 spaces and you have indent-depth the normal 4 )
		1: Make sure you copied the block starting with one empty line.
		2: Click cursor to start of empty line and paste.
		
		Then select that code and press Control-t, and
		it should then be indented as you wanted and you can then continue
		indenting the pasted code to the right place.
		
		(Note that you don't have to do anything if you open a file that has
		different indentation than your setting, it is changed automatically
		and saved with tabbed indentation after you for example close it.)
	
	
	Running file
	  - input from stdin does not work, so use test-data for that.
	  
	  - Editor freezes when running a program. So if you are testing
		for possible runtime-errors, keep that in mind. You should
		be able to terminate your program with ctrl-c from python-console.
	
	  - If you know where in your code that runtime-error occurs, put
		breakpoint() there, exit editor and python-console and run
		from terminal:
		
		python program_with_error.py
		
		and it will exit to python debugger after your breakpoint.
		

	Inspecting objects:
	  - Just write the name of the module, like tkinter.font in the editor,
		select it and choose inspect from popup-menu. Then search.
				
	
	Homepage: https://github.com/SamuelKos/henxel
	
	