jueves, 25 de noviembre de 2010

Personal preferences using JEdit

These are some personal notes to help me configure JEdit according to my own preferences. JEdit is a very powerful editor; it has many plugins, but many plugins have overlapping functionality; you have to decide how to use it and configure it according to your preferences. It is not like Eclipse where you automatically get everything configured. 

Favorite plugins:

  1. Editor Scheme .- Choose nice colors. I prefer dark backgrounds.
  2. File Browser .- Open new files.
  3. Buffer List .- Show open buffers.
  4. JDiff .- Compare text files.
  5. Whitespace
    • check "remove trailing white spaces"
    • check "tabify/untabify according to soft tabs setting"
  6. Text tools - sorting lines.
  7. Error list - View compile errors.
  8. Console
    The console is mainly used to compile code. Errors in the console are sent to ErrorList.

    cd ${d}  # cd to the directory of the current buffer.
    make all # You can also create adhoc scripts 
             # in the current directory.
      
    If you see '???' characters you may need to change encoding to UTF-8. Go to Plugin Options-> Console -> General -> Character encoding.
  9. CTagsSideKick - C++ Runs on top sidekick to browse the code in the current buffer. Similar to outline in Eclipse.

Global options:

  •   Docking: 
    • Buffer List - left
    • File Browser - left
    • Sidekick - left
    • Error List - down
    • Console - down
  •   Editing: set "tab width", "indent width" and "soft tabs".
  •   Gutter: check "line numbers".
  •   Proxy server.
  •   Text area: For ubuntu  you may need to set "Anti Aliased smooth text: subpixel"

Custom macros:

saveAllAndRunLastCommand.bsh

  • Save all buffers
  • Show console
  • Run last command
jEdit.saveAllBuffers(view, false);
new console.Shell.SwitchAction("System").invoke(view);
console = view.getDockableWindowManager().getDockable("console");
console.show();
console.runLastCommand();

Create shortcuts:

  • Console:System (toggle) CS-c
  • Macro: Toggle header source CS-h
  • Macro: saveAllAndRunLastCommand CS+m
  • ErrorList: Goto next error CS+n
  • ErrorList: Goto previous error CS+p
  • Tags: Follow tag C+CLOSE_BRACKET
  • Tags: Pop position C+t

Favorite shortcuts:

  • Focus Buffer Switcher A+BACKQUOTE
  • Toggle docked areas F12
  • Complete word C+b
  • Open a file C+o
  • Create a new file C+n

    No hay comentarios:

    Publicar un comentario