473,786 Members | 2,420 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

special editor support for indentation needed.

in trying to make programming in Python more accessible to disabled programmers
(specifically mobility impaired speech recognition users), and hitting a bit of
a wall. The wall (for today) is indentation. I need a method of getting the
"right indentation" without having to speak a bunch of unnecessary commands.
For example, depth specified by the previous line. But, frequently you need to
go to a more arbitrary indentation for example the right level of indentation
for a method definition or class definition. This indentation should be
something you could get by typing/speaking the right command with your eyes closed.

For example if I was to give the command "new method", I should be able to spit
out a template (contained within the speech recognition environment) and through
a command embedded in the template, force indentation to the right level for
"def" and then the editor would control indentation for the rest of the text
injection.

I prefer are working in Emacs because that's where I have a lot of my speech
grammars set up but I'm not averse to trying another editor. The only condition
is that the editor must run a Windows and have remote editing mode (like tramp)
so I can edit on remote machines.

ideas?
Nov 14 '08 #1
1 1686
On Nov 14, 11:41*am, "Eric S. Johansson" <e...@harvee.or gwrote:
in trying to make programming in Python more accessible to disabled programmers
(specifically mobility impaired speech recognition users), and hitting a bit of
a wall. *The wall (for today) is indentation. *I need a method of getting the
"right indentation" without having to speak a bunch of unnecessary commands.
For example, depth specified by the previous line. *But, frequently youneed to
go to a more arbitrary indentation for example the right level of indentation
for a method definition or class definition. *This indentation should be
something you could get by typing/speaking the right command with your eyes closed.

For example if I was to give the command "new method", I should be able to spit
out a template (contained within the speech recognition environment) and through
a command embedded in the template, force indentation to the right level for
"def" and then the editor would control indentation for the rest of the text
injection.

I prefer are working in Emacs because that's where I have a lot of my speech
grammars set up but I'm not averse to trying another editor. *The only condition
is that the editor must run a Windows and have remote editing mode (like tramp)
so I can edit on remote machines.

ideas?
You could make use of something like 'pindent.py' (comes with python
in windows under the \Python2x\Tools \Scripts folder). Which allows you
to put in block delimiters as comments, and then fixes the code to
align itself correctly to those blocks:

def foobar(a, b):
if a == b:
a = a+1
elif a < b:
b = b-1
if b a: a = a-1
# end if
else:
print 'oops!'
# end if
# end def foobar

Funny though. I always saw this tool as a sort of joke response to
people who missed their block delimiters. "You want block delimiters?
Use this." And see how long before they decide it is silly.

Matt
Nov 14 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3006
by: Chris Cioffi | last post by:
I started writing this list because I wanted to have definite points to base a comparison on and as the starting point of writing something myself. After looking around, I think it would be a waste of time to start writing yet another IDE and so am now thinking in terms of new features/plug-ins for existing systems. Right now I mostly use Komodo Personal and it's pretty close to being what I want. They don't currently support plug-ins,...
6
7752
by: sushant.bhatia | last post by:
Hi Folks. I would like to find a control or code for use with an app I am writing. We need to load a XML document. This XML document has a DTD and we want to allow a user to edit the plain text in the editor. Then the changes should be saved back to the xml file. The idea is very much akin to the HTML Editors which use WYSIWIG. However, we need to be able to extend the functionality of these editors to support functionality that we will...
8
3713
by: david.lindsay.green | last post by:
Hello all, I am quite new a web scripting and making web pages in general and I have stumbled across a problem I have as yet been unable to solve. I am trying to take the contents of a textarea box and save it to a file. This step is not to hard however the contents of the textarea is mostly latex source so it contains just about every special character you can imagine. My question is this, how do I save an exact copy of the textarea...
19
2175
by: saurabh.ss | last post by:
I want a C++ editor for Linux that resembles Microsoft Visual Studio's integrated editor. I mean it should have features like auto-completion, auto-indentation and syntax highlighting. Also it should support windows like hotkeys like Ctrl-C, Ctrl-V. Please do not recomment vi or emacs. I know that those are best out there but it will take me some time to learn them to use them efficiently and I do not have that luxury. I am unsatisfied...
15
2440
by: dreen1 | last post by:
Hello! Does any one of you know about some kind of PHP IDE (or at least an editor with syntax highlighting) that works online? It would be absolutely great if there was something like Google Docs, but for programmers with at least some features normal IDEs provide (support for JS and HTML would be great too). Reason for such need (at least in my case) is I change computers often. I have all my stuff on USB stick, but each time I go...
0
1720
by: Rick King | last post by:
Hi everyone, The editor in spe on my system (win XP home sp2) does not do automatic indentation..... I can't figure out why - it used to. I'm set up with subversion so I have the very latest stuff from Stani. It's amazing how not having automatic indentation can make working in the ide such a pain. This has been going on for a while (like a few years), and the situation is deteriorating - used to be that the indentation would work for a...
8
5027
by: Red | last post by:
If auto-format is turned off in VS2008, there is apparently no way to indent a line. Under Tools->Options->Text Editor->C#->Formatting, there are three checkboxes. Unchecking those seems to cause this behavior. I'd simply like to have the tab key insert a tab at the beginning of a line. I believe that there were publlished macros for doing this in earlier VS versions, but I expected this to be 'fixed' in VS2008. Yes, I realize someone...
18
2860
by: Nick Keighley | last post by:
On 4 Jul, 15:26, Hallvard B Furuseth <h.b.furus...@usit.uio.nowrote: what's wrong with that?! wouldn't replacing spaces with tabs do that? Were disks ever *that* small? I've worked on old mini-computers and even then we didn't try to save space at the *source* level.
0
1216
by: Almar Klein | last post by:
Hi Eric, First of all, I like your initiative. I'm not sure if I undestand you correctly, but can't you just increase indentation after each line that ends with a colon? That's how I do it in my editor. The user would then only need to specify when to decrease indentation. Cheers, Almar
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10164
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9961
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4066
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.