jEdit Community - Resources for users of the jEdit Text Editor
Indent problem
Submitted by Edijs on Friday, 9 January, 2009 - 11:25
Hello! Just recently I had to change form developing on a Mac to Windows. Well, on Mac I had this cool editor, called TextWrangler. I searched the web and found Jedit to be the most look-and-fell-alike to TextWrangler out there and that's awesome. Even the shortcuts are similar Smiling ; anyways, I managed to do all the setup and even my own syntax highlighting, but my only problem now is - I need to get rid of that automatic indentation. The language I program in has so many built in functions and procedures, that there are some files, that contain logical blocks of code consisting only of outer functions, thus the automatic indentation is working in the wrong place and throws my lines of code all over the place.

The only thing that I have not been able to shut down is the indentation when I type. I could shut off the auto indent when I press TAB or ENTER, but where can I shut the auto indend upon typing?

BIG thanks! Smiling
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
Indentation width?
by shlomy on Sun, 11/01/2009 - 15:29
Hi,
Have you tried setting the indentation width to 0 for the edit mode of your language? You do this using Global Options -> Editing.
I don't know if it works, just an idea.
Shlomy
 
yes, that works! :) thanks!
by Edijs on Mon, 12/01/2009 - 09:30
nope. not working that way. Sad
 
You could also try fiddling a
by elberry on Tue, 13/01/2009 - 01:19
You could also try fiddling around with the mode file for that language.

What is the language you are using? We can tell you how to reassociate it in jEdit so you can modify the language syntax for yourself.

Learn from the past. Live in the present. Plan for the future.
11101000
Blog
 
I use a specific programming
by Edijs on Tue, 13/01/2009 - 07:15
I use a specific programming language which has only procedures and functions (well, of course all the standart if, for, +, - a.s.o. Smiling ) and utilizes several built-in functions (for example - a window is entirely being defined by a bunch of function calls). All I need is to disable all auto indent, but keep the coloring (basically 3 colors - gray for comments, red for strings, blue for keywords like then, begin,end, integer, and, or, all the built-in function names a.s.o.)...
 
Ah. Ok, then you are familiar
by elberry on Tue, 13/01/2009 - 17:49
Ah. Ok, then you are familiar with setting up your own edit mode.

You should take a look at the section regarding the edit mode props.
http://jedit.org/users-guide/mode-tag-props.html

I'm not sure how your edit mode is set up, and if it delegates to other modes, but take a look at that section. I think you can override some of those properties to achieve what you desire, although I've never tried to remove the indenting. Smiling

Worst case, you should bring this up in the user's and/or developer's mailing lists, since they get more traffic.


Learn from the past. Live in the present. Plan for the future.
11101000
Blog
 
Cool. :D I found where the au
by Edijs on Wed, 14/01/2009 - 07:14
Cool. Laughing out loud I found where the auto indenting triggers are being defined in the language file (originally, I took the C++ mode file as an example and edited that one Eye-wink ) and removed them. Now I got a plain text editor very much like TextWrangler on MAC. Awesome Smiling. I suppose that this was the last auto indent thing... it would be cool to have a checkbox which disables the properties triggering nature, but that's probably specific.
User login
Browse archives
« November 2024  
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   101634
Context Free Art (*.cfdg)   0.31   46062
BBEdit scheme   1.0   18601
JBuilder scheme   .001   18502
ColdFusion scheme   1.0   18031
R Edit Mode - extensive version   0.1   17481
Advanced HTML edit mode   1.0   16213
Matlab Edit Mode   1.0   16075
jEdit XP icons   1.0   15236
XP icons for jEdit   1.1   14300