jEdit Community - Resources for users of the jEdit Text Editor

Caret

Macros that move the caret or change the selection


Find First Unmatched Brace (Find_First_Unmatched_Brace.bsh v0.1 by Sune Simonsen)
Submitted by sune_simonsen on Sunday, 14 January, 2007 - 20:02
This macro places the caret before the first brace that does not have a matching brace.

Updated on 01/14/2007 - 20:02
Downloads: 1236

Select_Word_or_Enclosed.bsh v1.0 by Tomek Peszor
Submitted by takeshin on Wednesday, 2 July, 2008 - 12:16
This macro is ment for fast selecting text with one keyboard shortcut. It selects word when no selection is set. When selection is set (second run), it looks outside selection for pairs of characters like parenthesis ()[]{}<> or quotations "" '' or line separator and selects text beetween. Just assign shortcut to this macro (I use CTRL+ALT+UP ARROW) and you are able to select word no matter if caret is on the begginig, inside or at the end of word. Then hit this keyboard shortcut again to select text between characters described above. Hit once more to extend selection to select enclosing characters too, and once more to expand selection to next pairs. This macro is useful for selecting words, syntax keywords, strings, function values, HTML attribute values and many more. See it in action on the screencast.

Updated on 07/02/2008 - 12:22
Downloads: 1239

WikiWord (WikiWord.bsh v1.7 by Peter Theobald)
Submitted by turtlecove on Friday, 17 March, 2006 - 18:52
Find the word the cursor is on and open a file by that name.

Can find [Filename in brackets] or wordsSeparatedBySpaces or words-separated-by-tabs.
Can also jump to specific locations within the current file or other files by using text anchors like this: [myfile#this-anchor] or [myfile:this-anchor] or MyFile:This-anchor or MyFile#this-anchor . Anchors are searched for as [this-anchor] or if that isn't found just the anchor text anywhere in the file.
Configuration options can be specified in the text file to use filename patterns and search paths.

I use this to set up a directory full of hyperlinked text. Attach a keyboard shortcut to the macro for quick jumping. I use control-TAB because it's next to control-` (previous file). So I can put the cursor inside a [WikiWord] and bounce back and forth to the file with control-TAB and control-`

New features added in V1.7, 2009-10-19

You can add the directives [path:xyz] or [rpath:xyz] anywhere in the document to set up search paths for documents. For example, the WikiLink [books-wanted.txt] will look in the current directory first, then in each directory in the path. rpath means 'recursive', which will search in that directory and all sub-directories under it.
You can also add the directives [filepattern:xyz] anywhere in the document to set up file name patterns, for example: [books-wanted] with [filepattern:$-notes.txt] will try to open 'books-wanted' and 'books-wanted-notes.txt' in the current directory and any directories in the path set up by [path:] and [rpath:]s. By default the given [WikiWord] itself ($) and WikiWord.txt ($.txt) are found first.
Note: I usually put all of my [path:][rpath:][filepattern:] directives at the end of my file.

Personally, I keep all of my life's information in text files, and I use this to set up indexes, tables of contents, cross-references, etc. between my documents.
I use this as follows: I have a main-index.txt file I always keep open. It has a line for each project I am working on with a WikiLink like this: Human Genome Project: decoding human genome [genome] due 1/15/2008 -and at the bottom of the main-index.txt file I have: [rpath:D:\Docs\Projects][filepattern:project notes $.txt] so it will look in my entire projects tree and find 'project notes genome.txt' when I click on [genome] and hit ctrl-TAB.

(This is my first jEdit macro. Enjoy.)

Updated on 03/22/2011 - 19:35
Downloads: 2144

There are 480 downloads in our database
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