File: reverse.lua

package info (click to toggle)
geany-plugins 2.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,832 kB
  • sloc: ansic: 107,883; sh: 5,567; makefile: 1,531; sed: 16
file content (17 lines) | stat: -rw-r--r-- 262 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--[[
  Silly example script that reverses the text of
  the current document or selection.
--]]


local s=geany.selection()

if (s)
then
  if ( s ~= "" )
  then
    geany.selection(string.reverse(s))
  else
    geany.text(string.reverse(geany.text()))
  end
end