jEdit Community - Resources for users of the jEdit Text Editor
Buffer options - syntax highligting not preserved on reload
Submitted by Cheruvim on Thursday, 15 March, 2012 - 15:14
Hey all,

I'm not sure if this is a bug or not, so I will open up a discussion here to point it out.

It seems that if you change the buffer option, specifically, syntax highlighting and then an external program (like say svn or git) changes the physical file on the file system, jedit will ask you if you want to reload the file. When you do, the highlighting reverts back to whatever the global settings are. Shouldn't it preserve what the buffer settings are if they are meant to override the global?

To reproduce this.

1) open a file type that uses a specific syntax highlighting (like C++ or PHP)
2) change the buffer options to use a different highlighting (Java or Perl)
3) change the file outside of Jedit
4) Bring Jedit back into focus and either agree to have it reload the file (I have it set to prompt) or watch it reload (if you set it up to do so automatically [haven't tried this]) and you should see the highlighting revert back to the global options.


Thoughts?
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
ways
by Robert Schwenn on Thu, 15/03/2012 - 21:12
Hi, I'm pretty sure it's not a bug.

I believe after You've saved the buffer, jedit remembers this setting - at least as long the file stays in the recent files list.

A second way would be to write a Buffer-Local Property into the file.

A third way is to have a look at the "BufferLocal" plugin.

Robert
User login
Browse archives
« April 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   82348
Context Free Art (*.cfdg)   0.31   46055
JBuilder scheme   .001   18495
BBEdit scheme   1.0   18116
ColdFusion scheme   1.0   18024
R Edit Mode - extensive version   0.1   17473
Advanced HTML edit mode   1.0   16206
Matlab Edit Mode   1.0   16068
jEdit XP icons   1.0   15229
XP icons for jEdit   1.1   14293