3

PEP 8 says:

Python accepts the control-L (i.e. ^L) form feed character as whitespace; Many tools treat these characters as page separators, so you may use them to separate pages of related sections of your file

This look like a great idea for me, but in the text editor I use(kate) "control+L" is for save all files. Someone have any solution?

... or I'm losing something here?

remosu
  • 5,039
  • 1
  • 23
  • 16

3 Answers3

2

As a Kate developer, I unfortunately have to tell you that such control sequences are not supported. In fact, Kate often treats these files as binary files, since such characters are not human readable text. So in short: Try to avoid ^L.

dhaumann
  • 1,590
  • 13
  • 25
2

Ctrl-L simply refers to the character with ASCII code 12 (form feed, new page). It is called Ctrl-L only because some editors allow you to enter it with Ctrl-L. (For instance, in vim, one can type Ctrl-Q Ctrl-L to enter that character, and it also appears as ^L). In Kate, Ctrl-L is a shortcut for saving all files, so you cannot type it that way and I'm not sure there is any way of entering that character easily.

Tamás
  • 47,239
  • 12
  • 105
  • 124
  • It works for me in `gvim` in insert mode (not in command mode, though). I don't know if this is because of some configuration option I lazily copied from someone else's `.vimrc`, or this is the default behaviour. Anyway, sorry for the confusion if it doesn't work for you. – Tamás May 06 '10 at 11:16
  • ups... I was trying this in vim command mode. In insert mode works OK. thanks for your answer. – remosu May 07 '10 at 09:21
0

You can create a plugin, and disable the shortcut Ctrl + L from the menu: Settings -> Configure shortcuts

Goin
  • 3,856
  • 26
  • 44