Module jEdit

Class Abbrevs

java.lang.Object
org.gjt.sp.jedit.Abbrevs

public class Abbrevs extends Object
Abbreviation manager.
Version:
$Id: Abbrevs.java 24211 2015-12-10 03:33:28Z daleanson $
Author:
Slava Pestov
  • Field Details

  • Method Details

    • getExpandOnInput

      public static boolean getExpandOnInput()
      Returns:
      if abbreviations should be expanded after the user finishes typing a word.
    • setExpandOnInput

      public static void setExpandOnInput(boolean expandOnInput)
      Sets if abbreviations should be expanded after the user finishes typing a word.
      Parameters:
      expandOnInput - If true, typing a non-alphanumeric character will automatically attempt to expand the current abbrev
    • expandAbbrev

      public static boolean expandAbbrev(View view, boolean add)
      Expands the abbrev at the caret position in the specified view.
      Parameters:
      view - The view
      add - If true and abbrev not found, will ask user if it should be added
      Returns:
      if expanded
      Since:
      jEdit 2.6pre4
    • getGlobalAbbrevs

      public static Hashtable<String,String> getGlobalAbbrevs()
      Returns:
      the global abbreviation set.
      Since:
      jEdit 2.3pre1
    • setGlobalAbbrevs

      public static void setGlobalAbbrevs(Hashtable<String,String> globalAbbrevs)
      Sets the global abbreviation set.
      Parameters:
      globalAbbrevs - The new global abbrev set
      Since:
      jEdit 2.3pre1
    • getModeAbbrevs

      public static Hashtable<String,Hashtable<String,String>> getModeAbbrevs()
      Returns:
      the mode-specific abbreviation set.
      Since:
      jEdit 2.3pre1
    • setModeAbbrevs

      public static void setModeAbbrevs(Hashtable<String,Hashtable<String,String>> modes)
      Sets the mode-specific abbreviation set.
      Parameters:
      modes - The new mode abbrev set
      Since:
      jEdit 2.3pre1
    • addGlobalAbbrev

      public static void addGlobalAbbrev(String abbrev, String expansion)
      Adds an abbreviation to the global abbreviation list.
      Parameters:
      abbrev - The abbreviation
      expansion - The expansion
      Since:
      jEdit 3.1pre1
    • addModeAbbrev

      public static void addModeAbbrev(String mode, String abbrev, String expansion)
      Adds a mode-specific abbrev.
      Parameters:
      mode - The edit mode
      abbrev - The abbrev
      expansion - The expansion
      Since:
      jEdit 3.1pre1